Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Execute individual python test scripts from RQM

Hi

A potential client is currently running a test tool called Stormtest. Is it possible to execute individual python scripts from within RQM for integration purposes of this tool. I assume the command line adapter will be needed for integration, but will RQM will be able to execute individual python scripts as done with HP QC. I have read something about a Squish adapter, but there doesn't seem to be any proven documentation that this actually works for this type of query.

Thanks

Leesen

1 vote



2 answers

Permanent link
If you want to run a python script, you will need to run it through a batch file using command line adapter. Other than that, I don't think there is any way to run individual python script in RQM.
As RQM does not provide Squish adapter, it may be hard to find any good doc. But I do see someone did that from:
http://doc.froglogic.com/squish/4.1/qt/ao-rqmintegration.html
Looks like it is from froglogic(http://www.froglogic.com/), you may have seen this though.

0 votes


Permanent link
Yes, its possible to execute individual python scripts from within RQM. A quick and dirty way to run a python file is to configure RQM via the following steps:
(1)Create a RQM command line test script with the following values:
--Command Line Script Details -->Use test resources that are local to a test machine = true
--Command Line Script Details -->Command = C:\Python33\python.exe
--Command Line Script Details -->Arguments =C:\testscripts\pythonWrapper.py
Note, the "C:\Python33\python.exe" & "C:\testscripts\pythonWrapper.py" files need to be located on the remote automation machine where the command-line adapter is installed.

With that being said, I recently needed to run RQM command line test scripts using a python test automation framework, and I needed to make the RQM test scripts Operating System agnostic. Here are the steps I took to complete this task:
(1)Installed Python in the following directly on the remote automation machine, C:\Python33
(2)Updated the start.bat file with the following -D argument, -Djava.io.tmpdir=C:\Python33. Note, the same would need to be done in the start.sh with the exception of the filesystem path being different, eg -Djava.io.tmpdir=/opt/Python33
For example, here is how the command in the file was originally configured:
java.exe -Dlog4j.configuration=file:.\log4j.properties -classpath "%filecontent%" com.ibm.rqm.adapter.commandline.QMCommandLineAdapter %*
And here is how the command was configured after my update:
java.exe -Djava.io.tmpdir=C:\Python33 -Dlog4j.configuration=file:.\log4j.properties -classpath "%filecontent%" com.ibm.rqm.adapter.commandline.QMCommandLineAdapter %*
(3)Put the python file I want RQM to run in the following directory, C:\Python33\Lib.
(4)Create an RQM Command Line test script (eg "Python Wrapper") with the following configurations:
--Command Line Script Details -->Use test resources that are local to a test machine = true
--Command Line Script Details -->Command = python
--Command Line Script Details -->Arguments = -m pythonWrapper
--Execution Variables -->Include built-in variables = true
Note, the pythonWrapper.py file is the phython file which will be used by all RQM test cases to run tests via my python test automation framework.
(5)Created several test case, with different execution variables, and associated each of the test cases to the "Python Wrapper" RQM test script.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Nov 26 '14, 3:32 a.m.

Question was seen: 5,130 times

Last updated: Jan 04 '16, 3:45 p.m.

Confirmation Cancel Confirm