It's all about the answers!

Ask a question

Command Line Adapter - return code


Anders Malmberg (1121214) | asked Mar 25 '11, 7:33 a.m.
Hi,
when you run a script from the command line adapter, is there a way to manipulate the return code?
If I start a any test tool from the adapter, checks the result in the script, I then want to send a return code to RQM. In this case the result is always "Passed" though the command script was executed successfully.
BR,
Anders

3 answers



permanent link
SimonP T (5622) | answered Mar 25 '11, 10:18 a.m.
Hi mate,

I noticed this as I stepped in. Have time for a quick reply on this.

Firstly, you can open the jar file and modify the code for the Command Line Adapter yourself.

Secondly, RQM looks for standard output in order to log the results. You see these attached to the Execution Result as they are attached if they exist. You can tweak your test script to direct output to standard error output (.err). This will be picked up too and reported as a fail.

RQM developers presume that the finer detail of this will be an adjustment to the weight. However, you can export the Execution Result to XML, modify the pass/fail count and re-import. This requires you to know the Execution Result UID.

I have had similar problems and am on the cusp of raising an enhancement request so that the Execution Result UID created to capture the results of the Command Line Adapter is exposed, so that it can report pass/fail/untested counts etc like Manual testing.

Hope this makes sense, Simon


Hi,
when you run a script from the command line adapter, is there a way to manipulate the return code?
If I start a any test tool from the adapter, checks the result in the script, I then want to send a return code to RQM. In this case the result is always "Passed" though the command script was executed successfully.
BR,
Anders

permanent link
Kurtis Martin (1.4k11) | answered Mar 27 '11, 11:05 p.m.
JAZZ DEVELOPER
In RQM 2.x if the program invoked by command-line adapter return an exit code of 0 then the RQM Execution Result would be set to passed, but if exit code was anything other than 0, the Execution Result would be set to failed.

In RQM 3.0 there's a commandline.properties file in the same directory as the command-line adapter, that provides more control over this behavior. Essentially allowing you to configure the adapter to map various exit codes to the actual result for the Execution Results that are created.

permanent link
christopher cramer (6) | answered Dec 05 '11, 2:31 p.m.
In RQM 2.x if the program invoked by command-line adapter return an exit code of 0 then the RQM Execution Result would be set to passed, but if exit code was anything other than 0, the Execution Result would be set to failed.

In RQM 3.0 there's a commandline.properties file in the same directory as the command-line adapter, that provides more control over this behavior. Essentially allowing you to configure the adapter to map various exit codes to the actual result for the Execution Results that are created.


I am looking for a simple explanation of how to return 'Fail' instead of 'Pass' from the command-line adapter. From what I read my doStuff.bat file that I am calling would have to finish with a return code other than 0.


doStuff.bat contains:
echo Starting automation suite with parameters %1 and %2
java com.ibm.wlm.ppm.fvt.AutomationSuite %1 %2


Is there any way to set the 'Weight' in RQM 2.x, and where can I find the CommandLine Adapter program for newer

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.