For information about how to use datapools through the TSS, see the API documentation.
To display the TSS documentation:
To use TestManager datapools with Functional Tester, add the following import statement to the Functional Tester script:
import com.rational.test.tss.*;
To use a TestManager datapool with Functional Tester, the datapool name must contain the complete path using double backslashes where the datapool resides. If you use UNIX®, the file separator is a forward slash.
Note: To view the Rational TestManager version that can be integrated with Rational Functional Tester, see List of supported domains for functional testing by releases of Rational Functional Tester versions 8.0 and 8.1 tech. note.
Example:
import resources.testOutHelper;
import com.rational.test.ft.*;
import com.rational.test.ft.object.interfaces.*;
import com.rational.test.ft.script.*;
import com.rational.test.ft.value.*;
import com.rational.test.ft.vp.*;
import com.rational.test.tss.*;
public class testOut extends testOutHelper
{
public void testMain (Object[] args)
{
boolean test;
String strval2;
try{
//create datapool object
TSSDatapool dp = new TSSDatapool();
//open datapool named testdpool
dp.open("testdpool");
//Fetch first row of data from datapool
test = dp.fetch();
//Loop 5 times through datapool for(int i = 0; i<5; i++)
{
//Get string value from custname column
DatapoolValue dpv = dp.value("custname");
strval2 = dpv.toString();
System.out.println("Name is " + strval2);
test = dp.fetch();
}
}
catch (Exception e) {
System.out.println("Exception occurred");
}
}
}
}