It's all about the answers!

Ask a question

RFT adapter with -var or -varfile in execution command received from Rational Quality Manager(CLM5.0)


Iverson Hu (611) | asked Nov 13 '14, 3:20 p.m.
 Hi,
I have integrated an RFT adapter with RQM and set up several test scripts with some execution variables in RQM. When I kicked off tests from RQM, I noticed that in adapter console, the execution command it received sometimes uses "-var" and some other time it uses "-varfile".

I wonder if there is a way to configure RQM or RFT to use "-var" consistently?

Thank you!

2 answers



permanent link
Reshma Ratnani (1.1k1) | answered Nov 17 '14, 5:50 a.m.
JAZZ DEVELOPER
Hi Iverson,

Does this happen for same RFT TestScript? Which version of RFT and RQM are you using?
Can you provide a sample RFT script and exec variables you use so that we can check the issue

Thanks

permanent link
Iverson Hu (611) | answered Nov 17 '14, 11:28 a.m.
 Hi Reshma,

No, it happens to different scripts. Actually these scripts were created as VB.NET project. Here comes the details:

Automation Scripts: (Visual Studio 2005)
- Created as VB.NET project.
- Uses RFT APIs GetVariablesManager() and GetInputParameter(variableName) to get parameters from RQM execution variables

RQM: (recently upgraded from CLM 4 to CLM5)
- Test scripts: imported from a shared location containing all automaton scripts and messages
- Test cases: have corresponding test scripts and each test cases has 3 Execution Variables: MSG_PATH, ASSEMBLY_PATH, ENV_URL.
- There was no change made to any test script or case during the upgrade.

RFT: (v 8.3.0.2)
- RFT adapter has default configuration and is connected to RQM


Symptoms:
- Before CLM upgrade, everything worked fine. 
- After the upgrade, for some test cases, RFT adapter receives execution command with "-var" option, i.e execution variable is appended in the command. For some other cases, RFT adapter receives execution command with "-varfile" option, i.e. putting all variables in a temp csv file. 
- When adapter receives command with -var option, the test script is executed without any issue. When adapter receives command with -varfile option, an exception is thrown and test script cannot be executed. Here is an example:

-var option:
11:05:06 AM Received the execution request: \\10.69.1.128\QA\OLIS\Regression\Testcases\OLTP_Assembly\RQ_AR_0023.ART_0023_AP02_EP10
11:05:07 AM Executing RFT command "C:\Program Files (x86)\IBM\SDP\FunctionalTester\bin\rational_ftw.exe"  -datastore "\\10.69.1.128\QA\OLIS\Regression\Testcases\OLTP_Assembly" -rt.log_format xml  -iterationcount -1 -rt.bring_up_logviewer false  -execmode rqm  -playback RQ_AR_0023.ART_0023_AP02_EP10 -var "RQM_LABRESOURCE_WEBID=764;RQM_TESTSCRIPT_WEBID=5;RQM_CREATEDBY_USER_WEBID=iverson.hu;RQM_TESTCASE_NAME=RQ_AR_0023.ART_0023_AP02_EP10;RQM_PROJECT_NAME=OLIS (Quality Management);RQM_PROJECT_ALIAS=OLIS+%28Quality+Management%29;ASSEMBLY_PATH=\\10.69.1.128\QA\OLIS\Regression\Testcases;RQM_CREATEDBY_USER_NAME=Iverson Hu;RQM_CONFIGURATION_OS=Windows;ENV_URL=http://10.69.8.101/ssha.olis.webservices.ER7/OLIS.asmx;RQM_TESTCASE_EXECUTIONRECORD_NAME=RQ_AR_0023.ART_0023_AP02_EP10_ITE2-64bits;MSG_PATH=\\10.69.1.128\qa\OLIS\Regression\ITE2\TestData\R320;RQM_TESTCASE_EXECUTIONRECORD_WEBID=4843;RQM_TESTSCRIPT_NAME=RQ_AR_0023.ART_0023_AP02_EP10;RQM_CONFIGURATION_NAME=ITE2-64bits;RQM_TESTCASE_WEBID=2;RQM_CONFIGURATION_CPU=x86-64;RQM_LABRESOURCE_NAME=olisqatm1"
11:06:42 AM Execution of script RQ_AR_0023.ART_0023_AP02_EP10 done

-varfile option:
4:13:52 PM Received the execution request: \\10.69.1.128\QA\OLIS\Regression\Testcases\OLTP_Assembly\RQ_AR_0034.ART_0034_AP05_EP08
4:13:52 PM Executing RFT command "C:\Program Files (x86)\IBM\SDP\FunctionalTester\bin\rational_ftw.exe"  -datastore "\\10.69.1.128\QA\OLIS\Regression\Testcases\OLTP_Assembly" -rt.log_format xml  -iterationcount -1 -rt.bring_up_logviewer false  -execmode rqm  -playback RQ_AR_0034.ART_0034_AP05_EP08 -varfile C:\Temp\1\execTmpVars.csv
4:14:29 PM Execution of script RQ_AR_0034.ART_0034_AP05_EP08 done

FAIL 14-Nov-2014 12:46:00.231 PM RQ_AR_0034.ART_0034_AP05_EP08.TestMain(System.Object[]) had an unhandled exception.
  • System.IndexOutOfRangeException
  • Index was outside the bounds of the array.
  • Script Name = RQ_AR_0034.ART_0034_AP05_EP08
  • Script Id = RQ_AR_0034.ART_0034_AP05_EP08.vb
  • Line Number = 27
  • at Rational.Test.Ft.Script.Internal.VariablesManager.Init(FileInfo varFile) at Rational.Test.Ft.Script.RationalTestScript.GetVariablesManager() at RQ_AR_0034.ART_0034_AP05_EP08.TestMain(Object[] args) in C:\AutomatedTesting\OLTP_Assembly\RQ_AR_0034\ART_0034_AP05_EP08.vb:line 27 at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) 


- Workaround or temp solution:
For the failed script above (0034_AP05_EP08), if the variables are appended in the command (similar to script 0023_AP02_EP10) and executed locally, the script can be executed without any issue. 

Hope this clarifies my issues.

Thanks for the help!

BR,
Iverson









Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.