This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: Ashcroft: Dictating your unit tests
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Is there something that talks about the seperation of church and tech?
Even if there was, we are in a time of ignoring those types of things anyway ;)
I had to laugh when I saw that Codehaus now has a project called Ashcroft:
Regardless of your political beliefs, as an agile and test-infected Java developer, we'd like you to consider the benefits of adhering to strict, some might say "dictatorial", limits on the way that you write your unit tests.
We should clarify, right up front, that these restrictions apply only to unit tests and not system tests or integration tests, which are also of great importance to the success of any project. However, your unit tests, at least one for each class in your codebase, should be clean, decoupled from one another, and run ultra-fast. We think you should be able to run thousands of unit tests and get your green bar in a few seconds. Achieving that kind of performance takes major discipline on the part of the developer, and Ashcroft helps you learn that discipline by failing tests which stray from best practices.
Sad but true. There has been a lot of talk on unit tests in the last couple of days too:
Martin Fowler: JunitNewInstance
Matt Raible: One-time setUp() with TestSetup
Cedric Beust: TestSetup and evil static methods