Command Line Adapter - return code
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
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, |
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. |
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. 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.
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
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.