The JUnit++ Testing Tool 
by Siegfried Goeschl

Listing One
public class FooTest extends ConfigurableTestCase {
    public FooTest ( String name ) {
        super(name);
    }
    public void testFoo() {
        String stringValue   = getString( "key1" );
        Boolean booleanValue = getBoolean( "key2" );
        Integer integerValue = getInteger( "key3" );
        Double doubleValue   = getDouble( "key4" );
    }
}


Listing Two
public class AllTests extends ConfigurableTestCase {
    public AllTests ( String name ) {
        super(name);
    }
    public static Test suite() {
        // load property file
        initTestProperties( AllTests.class );

        TestSuite suite= new TestSuite();
        suite.addTest( FooTest.class );
        suite.addTest( BarTest.class );
        return suite;
    }
}

Listing Three
public class JDBCTestSetup extends ConfigurableTestSetup {
    static private Connection connection = null;
    public JDBCTestSetup () {}
    public void setUp() {
       connection = DriverManager.getConnection(
            getString( "url" ), 
            getString( "user" ),
            getString( "password" ); 
    }
    public void tearDown() {
        connection.close();
    }
    public Connection getConnection() {
        return connection;
    }
  }
}



Example 1:
(a)
java -Djunit.data=MyFooTest.ini junit.swingui.TestRunner FooTest
java -Djunit.data=./test/data junit.swingui.TestRunner FooTest

(b)
# FooTest.ini
foo.FooTest.testFoo.key1=XYZ
FooTest.testFoo.key2=true
FooTest.key3=9999
Key4=3.1415927

(c)
 # AllTests.ini
 .default.0=FooTest.ini 
 .default.1=BarTest.ini

Example 2:
(a)
java -Djunit.data.class=xyz.JDBCTestProperties
junit.extensions.TestRunnerEx  sds.corba.datasource.AllTests

(b) 
java junit.extensions.TestRunnerEx -X 10 sds.corba.datasource.AllTests.

(c)
java junit.extensions.TestRunnerEx -X 10  -W 100  sds.corba.datasource.AllTests

(d)
java junit.extensions.TestRunnerEx -X 1000 -T 10 sds.geos.datasource.AllTests

(e)
java -Djunit.argv="-c foo.ini" junit.textui.TestRunner FooTest
java -Djunit.argv=-c|foo.ini junit.textui.TestRunner FooTest

(f)
java junit.extensions.TestRunnerEx -V junit.extensions.test.ConfigurableTestCaseTest

2
