Assertion Extensions for JUnit
By Tony Morris2005-05-05
Getting Started with JUnitX
Effective use of JUnitX requires a minimal learning curve. If you know how to use JUnit automated unit testing framework directly, you'll find it easy to use the JUnitX extensions package. The following steps will get you started:
1. If you haven't already done so, set up an environment for running JUnit test cases. You might consider following the process detailed in "Automating the build and test process" (see Resources).
2. Download the JUnitX package (see Resources) and extract the JUnitX archive to a directory of your choice.
3. Make the lib/junitx.jar file available to the class loader that will perform the JUnit tests.
Now you can make method calls on the junitx.framework.Assert class to assert functionality in a way similar to how you'd use the junit.framework.Assert class in a typical JUnit test environment. The JUnitX online API documentation (see Resources) provides a detailed description of the available method calls on the junitx.framework.Assert class.
Another JUnitX
The JUnitX package described in this article is unrelated to another project of the same name from Extreme Java, which allows testing of private and protected classes, methods, and variables.
Tutorial Pages:
» AlphaWorks Package Allows you to Perform Unit Testing with Complex Assertions More Easily
» Getting Started with JUnitX
» Use Case Scenario
» Conclusion
» Resources
First published by IBM DeveloperWorks
