Sponsored Link •
Conformance tests are an important aspect of publicly specified APIs. Unit tests are an effective way to improve software robustness. In this tutorial, Bill Venners shows you how to use Artima SuiteRunner to help you build conformance and unit tests for Java-based projects.
Artima SuiteRunner is a free, open source tool that can help you build unit and conformance tests. A unit test verifies that a piece of an application's functionality is working correctly. Writing unit tests help you achieve a robust application by improving the robustness of the parts (the small units) out of which you build the application. Conformance tests are an important aspect of publicly specified APIs. If someone implements an API directly from the specification, or makes changes to an existing implementation of the API, a conformance test may point out areas where the new implementation of the API doesn't conform to the specification.
I created Artima SuiteRunner with the help of Matt Gerrans and Franks Sommers while developing a conformance test kit for the ServiceUI API. The ServiceUI API, which defines a standard way to attach user interfaces to Jini services, arose out of an open design process within the Jini Community. I initially wrote the ServiceUI CTK with JUnit, a popular open source unit testing tool written by Kent Beck and Eric Gamma. In the process of developing the CTK, however, I ended up essentially refactoring the design of JUnit into what is now Artima SuiteRunner.
If you are familiar with JUnit, you will recognize many of the same concepts in Artima SuiteRunner. (You can also use Artima SuiteRunner to run your existing JUnit tests.) Open source projects are occasionally forked, and you can consider Artima SuiteRunner a "fork" of JUnit. But Artima SuiteRunner is a design fork of JUnit, not a code fork, because we didn't reuse any of the JUnit code. We refactored the JUnit design and wrote the code from scratch.
Throughout this tutorial, I will show code from the account example included in
example directory of Artima SuiteRunner's distribution ZIP file.
If you do not already have it, you can download Artima SuiteRunner free of charge.