Spock is a nice groovy based testing framework and all though it can be very easy to get you started with spock, this blog will show some non-standard things that you can do as well with spock. For more information about the spock framework (and you should definitely check this out if you are not familiar yet with this great framework), see the Spock framework link
Continue reading “Advanced spock testing.”
Category: testing
Test driven development, my way
We all do it, or at least some of us do it, trying to write test cases for a good code coverage of all the possible solutions for a complex problem. Some of us even try to drive the design for programs through a test driven approach. That is something that I am not a fan of because I think that once you start
programming for a while and start doing test driven development, you are capable enough of overseeing a problem and knowing the general direction for a solution, so the test driven design in my opinion can lead to waste. Waste as in test cases that are not needed anymore and if those test cases are not cleaned out might even lead to misunderstandings. Mind you, most of the time that won’t happen of course, because good test driven developers will clean away the waste. Continue reading “Test driven development, my way”
JRebel for fast development
JRebel, also known in the past as java-rebel, is a class reloading tool, that will automatically reload your classes when you change anything in it. And with anything, I mean anything (well almost anything, but the exceptions will follow shortly).
Normal hot-swapping containers can also reload classes in some occasions, but those occasions are limited to the content of existing methods (and for a number of times. After a couple of times of reloading classes in tomcat, you might or might not start to see different results then you are expecting). JRebel however can reload many more situations, for instance when methods are added or removed, or when the signature of the method is changed. In all of these situations JRebel can reload your classes without requiring a restart of the container. And that is a huge time safer.
Continue reading “JRebel for fast development”