What was the purpose of the test of the sticks?
Rashi (on Pasuk 25): To prove that Hashem had chosen the Kohanim to serve in the Mishkan. 1
Since there was a stick also for Sheivet Levi, why were there only 12 sticks?
Ramban, Moshav Zekenim: Because Yosef was counted as one tribe. 1
Ramban, Moshav Zekenim: Since Yisrael are always counted as 12 tribes - never 13. Consequently, whenever Levi is counted, Efrayim and Menasheh are counted as one tribe.
What, exactly, was written on each stick?
Ramban #1 (citing some commentaries): The name of the tribe 1 was written on each stick - Reuven, Shimon, Levi ...
Ramban #2: They wrote on the stick the name of the Nasi of the tribe - hence on Levi's staff they wrote 'Aharon'.
"Shmo" implies the Nasi's name! And verse 18 explicitly says Aharon's name! Presumably, this is why the Ramban prefers to say the name of the Nasi. (PF)
Rashi writes that this was to prove that Hashem had chosen the Kohanim. This was not needed. Korach and his congregation, who were Leviyim, died for requesting Kehunah. Only Aharon offered Ketores and lived!
Hadar Zekenim (16:5): They complained that only Aharon had a Kadosh incense pan. Now they will see that Aharon's stick, which is Chulin, will sprout.
Ramban (25): Perhaps Rashi agrees that the sticks proved that Levi was the chosen tribe, and once Levi was chosen, it followed automatically that Aharon, who was the Nasi of the tribe, was the Kohen Gadol. 1
See Ramban's objection to his own suggestion.
Rashi writes that this was to prove that Hashem had chosen the Kohanim. How is this a proof? Perhaps also if another Levi gave his stick, it would have sprouted!
Refer to 17:17:1:2.