This page contains some rough design notes and ideas. Eventually we'll describe the actual design here.
The current design concept is to use XML specifications to describe the tests while still supporting *.java files on disk as the actual test inputs. The XML test specfications could indicate the expected results of running the test at a variety of levels of detail.
Below are some of very rough examples to give an idea of what this might look like. (These are just intended to give a flavor for the idea. Dominique Schneider's work, posted to the jmlspecs-developers list on June 4, 2009 is also informative.)
Using XML-based test specifications would allow (reasonably) writable tests but simplify the task of creating test adapters for individual projects. For example, one could extend the appropriate JUnit framework classes to create a JUnit adapter that ran the XML-specified tests. Developers of individual JML-based tool good extend these adapters to use the JMLTests for their tools.
<testcase>
<input>
<file name="Requires1.java">
</input>
<output type="positive" />
</testcase>
<tests>
<testcase>
<input>
<file name="Requires1.java">
</input>
<output type="positive" />
</testcase>
<testcase>
<input>
<methodspec>
//@ requires x != \old(x);
public void foo() {}
</methodspec>
</input>
<output type="negative">
<contains>
not in scope
</contains>
<exact tool="JAJML">
<file name="NotInScope.java" />
</exact>
</output>
</testcase>
</tests>
<tests>
<testcase>
<input>
<file filter="*OK.java />
</input>
<output type="positive" />
</testcase>
<testcase>
<input>
<file filter="*Bad.java />
</input>
<output type="positive" />
</testcase>
</tests>
Here's an idea for how we might structure the subdirectories of the project and how a client project might use the tests.