You can ask "How was the test?" (note the word order) but that asks about the test itself. Was it hard? Was it easy? It doesn't ask how the person did.
"How did you do on the test?" asks whether the person did well or not.
[not a teacher]
Student or Learner