Regarding Beverly, I also assumed she was always a full Commander.
The command test doesn't have to be tied to a promotion, nor even "brownie points" towards one.
I've always interpreted that test as a) mandatory for command officers upon promotion to Commander; b) optional for science & operations officers ranked Commander or higher: you don't take (or pass) it, you can still be a Cdr Doctor/Security/Tactical/Conn/Science officer but not take command turns on the bridge, barring death or adbuction of all superior officers; you take it you can take a command rotation on the bridge.
Come to think, Harry Kim must've taken the test long before reaching Cdr rank since he regularly takes the big chair during the night shift... then again, exceptional circumstances call for exceptional measures.