TestSetGenerator Task

This page gives an overview of the parameters should can be used with the TestSetGenerator task and its elements. The following diagram shows the relations between the task and the elements.

TestSetGenerator Task

Attribute Description Required
description Description of the collection of TestSets No
file The name of the property file that will be created. Yes
driver Class name of the jdbc driver Yes
url Database connection url Yes
userid Database user name Yes
password Database password Yes
classpath Classpath used to load driver No (use system classpath)

Note: because the TestSetGenerator is an extenstion of the ANT SQL task , all the attributes of the SQL Task can be used.

TestSet Element

Attribute Description Required
name The name of the TestSet Yes
rowtoselect Define which row(s) should be used from the resultset. Possible values are first and all Yes

Entry Element

Attribute Description Required
key The name of the property in the property file Yes
column The column value from the database that will be assigned to the property Yes
createproperty Flag to indicate if an ant property has to be created. The name of the property is the key. No
type The data type of the property (String / Long / Integer). (Default String) No

Validation Element

Attribute Description Required
className The classname of the validator Yes

Parameter Element

Attribute Description Required
name The name of the validation parameter Yes
column The column value from the database that should be validated Yes

Output Element when generating a PropertyFile

Attribute Description Required
type Should be 'PropertyFile' Yes
file The name of the output file Yes

Output Element when generating an XML file

Attribute Description Required
type Should be 'XML' Yes
file The name of the output file Yes
root The name of the root element Yes

Output Element when generating a Java class

Attribute Description Required
type Should be 'Java' Yes
destination The location where the files should be generated. (Default current directory) No
packageName The name of the of the package where the class should be generated. No
className The name of the Java class that should be generated. Yes
onlyxml Flag that indicates that only the xml file should be generated, and not Java class. (Default false) No