Class is the period of time during which you learn stuff. It can take place in the classroom, or out in the garden, or somewhere else. You can have your history class in classroom A, biology class at the lab, etc.
So when you say something happened during class, you mean it happened during that period of time. If your friend pushed you in the classroom, that doesn't necessarily mean that it took place during class.
As for the other questions:
They had a test last Thursday.
They had a test in last Thursday's class.
They had a swimming test in PE last Thursday.
- For Teachers