Re: bowing etiquette for testing?
I'm sure it depends on the dojo and the traditions therein. Best to ask your instructor about things like this.
Just as a data point, though, folks testing at our dojo when they begin their test go up with their partner (sometimes assigned, sometimes random) to the middle of the mat, bow to the shomen, then to the people conducting the test, and then to each other. At the conclusion, the process is reversed -- bow to each other, then to the people conducting the test, and then to the shomen.