Configuring JTestConnect

JTestConnect uses the jtestconnect.xml configuration file specified in your Ant task to determine how the test for this method should look. Lets take another look at the one we used in our example.

<!-- Configures JTestConnect -->
<jtestconnect>

	<defaults>
		<property name="package" value=""/>
		<property name="classPrefix" value=""/>
		<property name="classSuffix" value="Test"/>
		<property name="methodPrefix" value="test"/>
		<property name="methodSuffix" value=""/>
	</defaults>
	
</jtestconnect>
        

This file defines a naming convention that describes how we name our tests. JTestConnect uses this files to generate expected test names. Let examine what each of these values actually mean:

With this information, JTestConnect will determine that we need a test class called: "MyServiceTest" with a method "testPerformAction". If this method is not found in your test code, JTestConnect will complain.