From the Java class, TPTP JUnit Test automatically identifies methods whose names begin with 'test' and maps these onto Test Methods. For example, the source of the class SimpleTest is as follows:
package junit.samples;
import junit.framework.*;
/**
* Some simple tests.
*
*/
public class SimpleTest extends TestCase
{
protected int fValue1;
protected int fValue2;
protected void setUp()
{
fValue1= 2;
fValue2= 3;
}
public static Test suite()
{
/*
* the type safe way
*
TestSuite suite= new TestSuite();
suite.addTest(new SimpleTest("add")
{
protected void runTest() { testAdd(); }
});
suite.addTest(new SimpleTest("testDivideByZero")
{
protected void runTest() { testDivideByZero(); }
});
return suite;
*/
/*
* the dynamic way
*/
return new TestSuite(SimpleTest.class);
}
public void testAdd()
{
double result= fValue1 + fValue2;
// forced failure result == 5
assertTrue(result == 6);
}
public void testDivideByZero()
{
int zero= 0;
int result= 8/zero;
}
public void testEquals()
{
assertEquals(12, 12);
assertEquals(12L, 12L);
assertEquals(new Long(12), new Long(12));
assertEquals("Size", 12, 13);
assertEquals("Capacity", 12.0, 11.99, 0.0);
}
public static void main (String[] args)
{
junit.textui.TestRunner.run(suite());
}
}
There are 3 methods whose names begin with 'test': testAdd, testDivideByZero, and testEquals, and these are listed in the Test Methods pane of the Overview tab:

Note that, if the user adds a test method using the test editor, a new method will be added to the code.
Also, a requirement for being able to run a JUnit class in TPTP is that this class must have a static "Test suite()" method (which is a standard JUnit practice). When the behavior check box is unchecked, this suite() method and its content are automatically generated (and updated when the user saves the test using the test editor). When the check box is checked, the user has to implement this suite() method.
If the Test Methods tab is selected then the view switches to the Test Methods section of the editor:

Selecting a test method reveals its Name and Description (if present) in the right-hand pane.
To alter a test method name, select the test method (in the left-hand pane) then edit the Name text box. To alter a test case description, select the test method (in the left-hand pane) then edit the Description text box. Use the Add and Remove buttons to add test methods and to remove existing (selected) test methods respectively. Use the Up and Down buttons to change the order of test methods.
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.