I teach Java and Python intro courses at two different colleges (both < 30 per class), and the way I've developed my courses are very unit test driven. The reason is when I hand graded, it would take easily hours to finish grading everything. Likewise, students would submit code they copy/pasted from the internet and wouldn't compile. After 5 minutes of debugging their code, it begins eating into my overall grading time. Likewise, what percentage should I give them on code that doesn't compile? Now, I say a flat "if it doesn't compile, the best you get is 20% for proper formatting".
In the first few weeks, I use JUnit and System Rules (I am currently build Python unit tests) to let them only work via the main method. Once we introduce methods, I show them how I call them via my tests.
I have also started implementing typing exercises into my weekly work, so students can get a feel before getting thrown to the wolves on the week's assignments. If I head to PyCon next year, I hope to present on whether it was successful or not.
I am looking to automate grading ala Open edX style submissions, as the biggest problem I have is not being able to give students a grade/notes until around Friday when I grade.
One trick I do is lecture all of Monday (2 hour class) and then let them work on their assignment for the week on Wednesday (3 hours). Most students don't realize how much time outside of class needs to be spent in the initial semesters of programming. I use that lab time to let them work and act as a helpful tool if they have questions. For example, this week, we'd gone over building Objects, but the idea of constructors are still shaky to some people. Today, when they were working on their labs, I spent some time with the 1-2 students that needed a little extra help understanding the work to get everything.