Janeway would have had to have taken the test, as she was a blue shirt science officer before she was promoted and later made captain.
Not necessarily. Picard was a whiteshirt command-path officer when graduating, yet became a blueshirt later in his career in the "Tapestry" timeline. Janeway's stint in the blue could have been part of a command path journey, too. And that journey could have begun with Janeway graduating with the same full command qualifications that Picard or Kirk had at graduation day.
Indeed, stints in other colors seem almost mandatory for those aspiring for major commands. Even Riker was yellow for a while, after having been conn-red on the Pegasus
. Kirk might have worn red when he did a Garrovick, eleven years before "Obsession".