views:

91

answers:

3

it's good practice to write Unittests to

  • be independed of the whole spring application context
  • automate the test you are doing for continuous integration
  • avoid dependency on the Servlet Container

I guess with JRebel there's a temptation to test everything in the running application and 'forget' to write Unittests. What's your experience?

A: 

I think that would be a big mistake. Sure it is faster, but you have no assurance that you aren't breaking things.

So it is faster to do manual unit testing, but the disadvantages aren't just about speed. You can't retest everything on every change without automated tests.

JRebel does make in-container unit tests more viable, though.

Yishai
agree it would be a big mistake to disregard Unittest
Martin Dürrmeier
A: 

I tend to think that writing and running unit tests is a good way to compile the appropriate classes so that JRebel can reload them.

David
+1  A: 

I like to think that you're not writing unit tests because of the slow turnaround cycle but for other reasons. The moment the turnaround cycle goes to zero there is still benefits of unit tests.

toomasr
without a doubt unittest are needed, it's just a fear.
Martin Dürrmeier