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 About TestManager Integration: Functional Tester is integrated with Rational TestManager version 7.0.1.2. If you have the 7.0.1.2 version of TestManager, you will be able to use the integrated features of Functional Tester and TestManager. See Understanding Functional Tester integrations for important information on using the products together.
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");
}
}
}
}