Any such officer must take the test simply to advance beyond the rank of Lieutenant Commander
This is highly unlikely - or in other words, it is highly unlikely that Admiral McCoy or Commander Pulaski ever took this test, given the nature of their characters.
More probably, the test can be undertaken at any point of a blueshirt's career, and passing it results in a number of brownie points that can be used for furthering one's career - say, getting a promotion from LtCmdr to Cmdr, or from Ensign to Lt(jg), or just securing a meatier assignment.
Also probably, there are any number of tests a blueshirt can take to collect the brownie points, so that Pulaski might have gathered them by writing enough scientific papers, McCoy by completing a course on Vulcan physiology, and so forth.
let alone actually *get* command experience.
Now this is more like it. And I'm convinced that Bashir took the test early on, just because he could, and thus qualifies for all sorts of command-your-own-runabout assignments where an ordinary medic would require a chaperon. Other high-performing students probably opt for a course like this early on, too, to get important command positions: one wonders if Elizabeth Lense didn't have to have training like this to get accepted as the CMO of a mighty Nebula straight from the Academy.
Of course, we also know that one can wear blue and still have full command training akin to Kirk's. Picard switched to blue in the alternate reality of "Tapestry". Spock wore blue after starting out with command gold. Saavik wore sciences grey (overlaid on command white) after taking what looked like Command School, and apparently served as Chief Science Officer on the Grissom - probably a situation nearly identical to that of Spock in TOS.
Timo Saloniemi