Share and Enjoy
David Saff's blog of technological joys.
Wednesday, March 08, 2006
Getting started with JUnit 3.8.2
There will be cool things posted here soon about JUnit 4.0, and actually 4.1, which will be released as soon as SourceForge gets its servers back in shape. Trust me. In the meantime, there's another problem I need to address.Recently, we released JUnit 4.0, which uses annotations (from Java 5), years of added experience (from Kent and Erich), and some new ideas which could never work (from me) to provide the simplest and best unit test development framework out there. Seriously. Try it. It's very compatible: JUnit 4 tests can be run by JUnit 3 runners, and JUnit 3 tests can be run by JUnit 4 runners.However, it turns out that
So, we released JUnit 3.8.2, and the world is good. However, this creates an awkward situation. We now have two versions of JUnit out there, but only one body of online documentation. So most online resources are either applicable only to JUnit 4 (The FAQ, for example), or mostly to JUnit 3 (junit.sourceforge.net, for example, although everything said there also applies to the JUnit-3-compatible part of JUnit 4).This situation will persist until more effort can be put into reviewing and clarifying the documentation. In the meantime, I'll try to post snippets of useful information here. For example, here's how to get started with JUnit 3.8.2:
- Kent and Erich had put time into a more incremental release after JUnit 3.8.1.
- Not every developer and manager in the world is ready for Java 5, even if it allows them to use the simplest and best unit test development framework out there.
java -classpath .;junit.jar junit.textui.TestRunner junit.samples.AllTests
- Download it
- Unzip it
- From the junit3.8.2 directory, run the tests by running
Share and enjoy!
Subscribe to Posts [Atom]