It's all about the answers!

Ask a question

Execution Variables


Dan Bocko (132) | asked Apr 26 '17, 8:33 p.m.
retagged May 19 '17, 1:35 a.m. by Minakshi Jaint (5113)

Defined these execution variables at the script level in RQM;

Execution Variables
#Wed Apr 26 19:24:08 EDT 2017
qm_soapui_project=v05.2.0 CapriBTSXDR Request WS Tests
qm_soapui_suite=Sync BTSXDRRequest_PortTypeBinding TestSuite_v5_2_0
qm_soapui_case=SyncAnkleConditionForm_EmptyRequest TestCase

This file is created when the test executes "soapui.properties".

rem This script is designed to be run from RQM command line adaptor.
 set soapui_home=C:\Program Files\SmartBear\SoapUI-5.3.0
 cd C:\Scripts\SoapUI Tests\SoapUI Scripts
 set path=%path%;"%soapui_home%\bin"
 type %qm_ExecutionVariablesFile%
 copy %qm_ExecutionVariablesFile% soapui.properties
 set errorlevel=
 call testrunner.bat -s %qm_soapui_suite% -c %qm_soapui_case% -r -a %qm_soapui_project% "C:\Scripts\SoapUI Tests\SoapUI Scripts\v05.2.0 CapriBTSXDR Request WS Tests.xml"
 exit /b %errorlevel%
 echo myFile=C:\Users\VHAISPBOCKOD\RQMCommandLineAdapter\ >>  $qm_AttachmentsFile

The batch file runs from RQM, but the Execution Variables are not in the testrunner .bat command line (see below).

RQM.out file

#Execution Variables
#Wed Apr 26 19:19:50 EDT 2017
qm_soapui_project=v05.2.0 CapriBTSXDR Request WS Tests
qm_soapui_suite=Sync BTSXDRRequest_PortTypeBinding TestSuite_v5_2_0
qm_soapui_case=SyncAnkleConditionForm_EmptyRequest TestCase

C:\Scripts\SoapUI Tests\SoapUI Scripts>copy C:\Users\VHAISP~1\AppData\Local\Temp\1\QMAdapter7865700850451152967.vars soapui.properties
        1 file(s) copied.

C:\Scripts\SoapUI Tests\SoapUI Scripts>set errorlevel=

C:\Scripts\SoapUI Tests\SoapUI Scripts>call testrunner.bat -s  -c  -r -a  "C:\Scripts\SoapUI Tests\SoapUI Scripts\v05.2.0 CapriBTSXDR Request WS Tests.xml"


SoapUI 5.3.0 TestCase Runner

Configuration:

About the Quality Management Application

Version: 6.0.1
Build Information Version Build ID
Quality Management - Core Libraries 6.0.1 I20151109_2311
The patch is active for QM. For details about the patch, see the readme.txt file. 6.0.1 iFix008
Jazz Foundation - Core Libraries 6.0.1 RJF-I20151106-1823
JTS Patch is active. Contact your system administrator for details on fixes included in this patch in readme.txt. 6.0.1 iFix008

Any suggestions to make this work are appreciated.

Thanks

Dan


Accepted answer


permanent link
Donald Nong (14.5k414) | answered May 02 '17, 3:14 a.m.

I have a quick test and believe I know what you have missed. To use the script as is (I guess from https://jazz.net/forum/questions/202981/soapui-to-rqm-commandline-throwing-error-that-cannot-find-path-is-there-an-issue-with-my-syntax), you need to set the execution variables "soapui_suite", "soapui_case" and "soapui_project", not "qm_soapui_suite", "qm_soapui_case" and "qm_soapui_project", as RQM will prefix the variables with "qm_" automatically when calling the Command Line Adapter.

This is clearly documented.
https://jazz.net/library/article/809
https://jazz.net/help-dev/clm/topic/com.ibm.rational.test.qm.doc/topics/c_execvar_overview.html

Dan Bocko selected this answer as the correct answer

One other answer



permanent link
Donald Nong (14.5k414) | answered Apr 26 '17, 10:42 p.m.

If I understand correctly what you're trying to do, you just need to read the file soapui.properties to get those execution variables. Otherwise, I don't see the point of having the file there.


Comments
Dan Bocko commented Apr 27 '17, 11:14 a.m.

Hi,

This part of the batch file came from a post on the JAZZ forum. This batch file is called from RQM and should call the SoapUI test runner using the execution variables from the soapui.properties file.

My question is why are there no properties being passed to the test runner and what needs to change in the batch file to make that happen. (see below)

set path=%path%;"%soapui_home%\bin"
 type %qm_ExecutionVariablesFile%
 copy %qm_ExecutionVariablesFile% soapui.properties
 set errorlevel=
 call testrunner.bat -s %qm_soapui_suite% -c %qm_soapui_case% -r -a %qm_soapui_project% "C:\Scripts\SoapUI Tests\SoapUI Scripts\v05.2.0 CapriBTSXDR Request WS Tests.xml"

Content of the properties file:

#Execution Variables
#Thu Apr 27 08:39:52 EDT 2017
qm_soapui_project=v05.2.0 CapriBTSXDR Request WS Tests
qm_soapui_suite=Sync BTSXDRRequest_PortTypeBinding TestSuite_v5_2_0
qm_soapui_case=SyncAnkleConditionForm_EmptyRequest TestCase

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.