McClure, 37, who plays DI Kate Fleming in the hit drama, shared a video of the AC-12 gang showing off their moves on set in a clip uploaded to Instagram and Twitter.
She and co-star Dunbar, 62, best known as Superintendent Ted Hastings, appeared to take the lead while 36-year-old Compston, aka DS Steve Arnott, attempted to keep up in the background.
“Breaking these two gently into TikTok!” she captioned her post, adding: “When I’m down I’m gonna watch this on loop!!”
The trio recently reunited to resume filming the sixth series of the BBC One procedural, which follows an anti-corruption unit as they attempt to root out the source of police collusion with organised crime.
Production kicked off back in February but was quickly postponed due to the spread of coronavirus.
McClure, Compston and showrunner Jed Mercurio have all shared behind the scenes updates from the Belfast shoot on social media, with many showing cast and crew wearing face masks in between takes.
The new series is expected to land on our screens in 2021 after 12.1 million viewers tuned in to watch the season five finale.
The tense 90-minute episode revealed that police legal counsel Gill Biggeloe had tried to frame Hastings as the elusive ‘H,’ the corrupt officer working with an organised crime group.
A last minute discovery from Arnott also suggested that another bent copper is still at large within the force.
Kelly Macdonald will join the cast of series six as Detective Chief Inspector Joanne Davidson, described by Mercurio as “AC-12’s most enigmatic adversary yet.”