Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

error attempting to retrieve test parameter values from a test using OTA

$
0
0

Trying to retrieve test parameter values from a test using OTA, found that the test.Params method is deprecated, so attempting to utilize TestParameterFactory, based on a similar posts but receiving error.  

http://community.hpe.com/t5/Unified-Functional-Testing/Retrieving-Parameter-Actual-values-from-Test-Instance-properties/td-p/4826963

http://answertohelp.com/ota-update-test-instance-execution-setings-test-iteration-parameters-hp

All other properties test.Name and test.HasParms seem to work, but having no luck with the parm values themselves. Any help or thoughts would be greatly appreciated.

C#

TestFactory testFactory = (TestFactory)qctd.TestFactory;
TDFilter tffilter = (TDFilter)testFactory.Filter;
tffilter["TS_NAME"] = "LenderX_Settings_Add_User";
List testList = (List)testFactory.NewList(tffilter.Text);
//trace through each test cases to get the status and parms
foreach (Test test in testList)
{
ISupportParameterValues aParam;
IBaseFactory paramValueFct;
ParameterValue ramava;
Test aTS;
List aList;
aTS = test;
aParam = (ISupportParameterValues)aTS;
paramValueFct = aParam.ParameterValueFactory;
TDAPIOLELib.List lst = paramValueFct.NewList(""); // throws exception {"Failed to Get Simple Key Entity"} System.Exception {System.Runtime.InteropServices.COMException}

ramava = (ParameterValue)lst[1];
string test3355 = ramava.ActualValue.ToString();

Console.WriteLine("Name:" + test.Name + "hasParms" + test.HasParam + "Parms:" + test.Params);


Viewing all articles
Browse latest Browse all 5491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>