/JMLUnitNG

An automated unit test framework for JML-annotated Java projects.

Primary LanguageJavaOtherNOASSERTION

JMLUnitNG

JMLUnitNG is an automated unit test generation tool for JML-annotated Java code, including code using Java 1.5+ features such as generics, enumerated types, and enhanced for loops. Like the original JMLUnit, it uses JML assertions as test oracles. It improves upon the original JMLUnit by allowing easy customization of data to be used for each method parameter of a class under test, as well as by using Java reflection to automatically generate test data of non-primitive types. An initial version of JMLUnitNG was introduced at FoVeOOS 2010 in the paper JMLUnit: The Next Generation, though some of the information in that paper is now out of date.

The tests generated by JMLUnitNG use the TestNG unit testing framework, and can be run (assuming an appropriately-configured CLASSPATH) by themselves or as part of larger TestNG suites. Currently, JMLUnitNG generates tests for OpenJML RAC, JML4 RAC (as compiled by jml4c, available from the University of Texas, El Paso) and JML2 RAC (as compiled by jmlc, part of the Common JML Tools); since only OpenJML RAC and JML4 RAC support modern Java features, the classes under test may not use such features when generating tests for JML2 RAC.

JMLUnitNG has not been under active development since 2014; however, development will likely resume in the future.