For tests, it depends as courses vary.
For problem-based courses (In my case Functions, Chemistry, Physics) I find that the best way to study for tests is to review every "type" of question that you covered in the unit, chapter, whatever. HOWEVER, remember that I said "type" of question, meaning that you shouldn't redo all of your homework. Although, try to pick the (1 or 2) most challenging problem(s) of a specific chapter and redo them. If you did your homework, you'll be able to check over every step you made and correct any mistakes (and hopefully learn from them). Plan to study 1 or 2 chapters a night days before the test, and on the day of the test, write with confidence.
When it comes down to exams, I can't tell you how beneficial it is to study your past tests. Look over and redo the key-concept questions on the test. If you wrote the test and corrected it afterwards, you'll be able to check over your steps and make sure you did it right! Again, plan this process over a week or so and you should be well prepared for the exam!
As for homework, I try to complete it as soon as I get home. I do this because you end up having more free time than you thought. Plus, it also saves you a lot of stress compared to doing your homework at 11 o'clock! :)
"[The Universe] is written in the mathematical language... without which one wanders in vain through a dark labyrinth."
-
Galileo Galilei