Using TestManager datasets with HCL OneTest UI

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

For information about how to use datasets 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 datasets with HCL OneTest UI, add the following import statement to the Functional Test script:

 		import com.rational.test.tss.*; 

To use a TestManager dataset with HCL OneTest UI, the dataset name must contain the complete path using double backslashes where the dataset resides. If you use UNIX, the file separator is a forward slash.

Note: This version of HCL OneTest UI has new dataset features. You can import a TestManager dataset into a new dataset to use the new dataset features of HCL OneTest UI. For more information, see Creating a dataset.
CAUTION:
If you run a script with a dataset from TestManager, use only the filename of the dataset. Do not use the full path name to the dataset, because if you use the full path name of the dataset, 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 dataset object 
TSSdataset dp = new TSSdataset(); 
//open dataset named testdpool 

		dp.open("testdpool");
				//Fetch first row of data from dataset 
				test = dp.fetch(); 
				//Loop 5 times through dataset for(int i = 0; i<5; i++) 
				{ 
				//Get string value from custname column 
				datasetValue 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