Could you use "sprawdzian" here as well, like in the context of studying for a school exam?
In school, not final exam, I think always. When I was at school "test" was either ABC test or one sentence answer test. Long esseys and math exercises were not "tests". And Exams are at the end of schools (like after end of 3 years of school)
For me "Uczę się na test" is more of a slang and "uczę się do testu" is better.
why 'uczmy się dla ocen' and uczę się na test' (I am asking about the preposition)
"uczmy się' would be imperative (let's learn), so I guess you meant simple "uczymy się" (we are learning)
I don't know if there's any specific reason. I'd say that 'dla ocen' is like a reason, and 'na test' like a purpose... but I don't know if this makes it different. It's just how we'd say it. Plus you have 'do testu' as someone wrote above...