|
Sponsored Link •
|
Advertisement
|
Summary
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 Testkit to help you build conformance and unit tests for Java-based projects.
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.
Unit tests are an effective way to improve robustness. 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.
Artima Testkit is a tool that facilitates the building of conformance and unit tests. I created Testkit with the help of Matt Gerrans and Franks Sommers while developing a conformance testkit 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. In this tutorial, I will show how I used Artima Testkit to build the ServiceUI Conformance Test Kit (CTK).
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 Testkit. If you are familiar with JUnit, you will recognize many of the same concepts in Testkit. (You can also use Artima Testkit to run your existing JUnit tests.) Open source projects are occasionally forked, and you can consider Testkit a "fork" of JUnit. But Testkit 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.
Sponsored Links
|