Using TestManager datapools with HCL OneTest UI

If you have TestManager installed, you can use TestManager datapools with HCL OneTest UI through Rational® Test Script Services (TSS) support.

For information about how to use datapools through the TSS, see the API documentation.

To display the TSS documentation:

  • Click Start > Rational Product > Rational Test API > TSS for Java.

To use TestManager datapools with HCL OneTest UI, add the following import statement to the Functional Test script:

 		import com.rational.test.tss.*; 

To use a TestManager datapool with HCL OneTest UI, 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: This version of HCL OneTest UI has new datapool features. You can import a TestManager datapool into a new datapool to use the new datapool features of HCL OneTest UI. For more information, see Creating a Datapool.
CAUTION:
If you run a script with a datapool from TestManager, use only the filename of the datapool. Do not use the full pathname to the datapool, because if you use the full pathname of the datapool, you cannot run the script from TestManager.

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");
				} 


				} 
				} 
				} 
Feedback