JaVa
   

JUnit Expansions

The number of expansions and add-ons developed and maintained for JUnit has grown continuously. Some of them were introduced in Parts I and II of this tutorial. A current list of these additional tools is maintained on the JUnit Web page at [URL:JUnitExt]. The following list is not complete, but it includes the most important additional tools available at the time of writing this tutorial. To spare the reader from having to look up references in the bibliography, we directly list the URLs in this appendix.

JUnitX and XPTest

JUnitX offers a way to access private or protected variables, methods, and classes in test cases. The tool builds on the latest JUnit version and uses the Java reflection mechanism. XPTest combines and integrates JUnit and JUnitX in the UML modeling tool TogetherJ. This also allows automatic creation of test cases by using the pattern mechanism of TogetherJ.

URL: www.extreme-java.de/

Daedalos JUnit Extensions

The JUnit extensions of Daedalos allow you to define testing resources that are initialized only once. This can speed up some test suites. URL: www.daedalos.com/DE/djux

JFCUnit

This expansion allows testing of Swing user interfaces. , , introduced JFCUnit in an example.

URL: http://sf.net/projects/jfcunit/

JUnitPP

JUnitPP expands JUnit by a test data repository, some command line arguments, a built-in iteration counter, and multi-threading from the command line.

URL: http://junitpp.sf.net/

Mock Objects

This library offers both an extensive base of generic mock objects and some specialized packages, for example, for testing of JDBC connections and servlets. The concept of mock objects was described in .

URL: www.mockobjects.com/

MockMaker

MockMaker is a tool that serves to create source code for mock objects and builds upon the mock objects library. The tool starts from an interface and generates classes allowing both the specification of the expected behavior and return of predefined function values. URL: http://sf.net/projects/mockmaker

EasyMock

This package allows you to define simple mock objects directly in the test code, without the need to write your own mock classes. The underlying Java proxy mechanism is available from JDK Version 1.3 and higher.

URL: www.easymock.org/

JXUnit

JXUnit allows you to separate test data from the test logic by dumping the test data into XML files. This is more interesting for functional test suites than for fine-grained unit tests.

URL: http://jxunit.sf.net/

JUnitHelp

JUnitHelp offers general information and tips about the use of JUnit in HTML and JavaHelp format.

URL: www.bossicard.com/projects/junit.php

Joshua

Joshua was designed for the distributed execution of regression tests, based on Jini and JavaSpaces, in addition to JUnit.

URL: http://cs.allegheny.edu/~gkapfham/research/joshua/

JDepend

JDepend makes its way hand over hand through a set of Java class files and Java source directories and for each package, determines metrics on dependencies upon other packages. Properly interpreted, the figures provide hints about expandability, reusability, and maintainability of a package. You can test automatically for permitted tolerances of specific measurement values in JUnit test cases.

URL: www.clarkware.com/software/JDepend.html

JesTer

JesTer uses the mutation testing approach to offer a completion to conventional coverage analyses. This type of testing is based on targeted changes to the app code and subsequent checks to determine whether or not the original test suite detects these changes as errors. This means that you can identify code parts run within the suite, but with effects not verified in the tests. , , classified this approach into the classic coverage analysis.

URL: http://sf.net/projects/jester/

HttpUnit

HttpUnit is a framework to address external Web sites in a Java program. One possible use in combination with JUnit is to run automated Web function tests. , , introduced this use in an example.

URL: http://httpunit.sf.net/

JUnitEE

This package uses a test runner servlet to run server-side test suites. One possible use is testing EJBs (see , ). URL: http://junitee.sf.net/

Canoo WebTest

Canoo WebTest is a free open source tool for automated testing of Web apps. It calls Web pages and verifies the results, giving comprehensive reports on success and failure. The test scripts are specified in XML as ANT tasks and use HttpUnit behind the scenes.

URL: http://webtest.canoo.com/

Cactus

Cactus is another tool that allows you to run server-side tests. In contrast to JUnitEE, this tool uses proxy servlets, which establish the connection to client test cases. , , introduced Cactus in theory and practice.

URL: http://jakarta.apache.org/cactus/

JUnitPerf

JUnitPerf represents a collection of "test decorators" you can use to check performance and scalability.

URL: www.clarkware.com/software/JUnitPerf.html

J2ME Unit

Java 2 Microversion was designed for devices with scarce storage and resources. This means that the virtual machine may not support reflection, making it necessary to adapt JUnit. A JUnit port for this platform, J2ME Unit is available. URL: www.rolemodelsoft.com/aboutUs/products.htm

Test Mentor Java version

To my knowledge, Silvermark's Test Mentor is the only commercial software that supports the same test approach as JUnit and can even run JUnit test cases. In addition, this product offers a large number of additional functions, including graphical tools for test creation and documentation, management generic test modules, and test result management on XML basis.

URL: www.testmentor.com


JaVa
   
Comments