RQM test case always shows Pass, even when test script returns non-0 value
I have an RQM test case that calls a command line test script (Windows batch file) via the RQM Command Line Adapter. My test script returns 0 if successful or 1 if failed, however when I run the RQM test case it always shows Passed, even when the test script returns 1.
To debug it I've modified my test script, CLI_Run_Jenkins_Job.bat, so it just returns 1. If I call this script from another test script, test.bat, that checks its result, it does return 1, so test.bat proves that CLI_Run_Jenkins_Job.bat is working as expected. However when I run CLI_Run_Jenkins_Job.bat from an RQM test case via the Command Line Adapter the RQM test result always says Passed.
Do I need to do anything special with the Command Line Adapter to make it return the result of CLI_Run_Jenkins_Job.bat? If not, is there anything else I need to do?
I'm using RQM 4.0.1 with RQM-Extras-CommandLineAdapter-4.0.1.
The batch files are:
CLI_Run_Jenkins_Job.bat:
exit /b 1
test.bat:
echo START
set errorlevel = 0
call CLI_Run_Jenkins_Job.bat Checkout_TCISDemo_Source
if errorlevel 1 goto error
echo PASSED
:error
echo FAILED
To debug it I've modified my test script, CLI_Run_Jenkins_Job.bat, so it just returns 1. If I call this script from another test script, test.bat, that checks its result, it does return 1, so test.bat proves that CLI_Run_Jenkins_Job.bat is working as expected. However when I run CLI_Run_Jenkins_Job.bat from an RQM test case via the Command Line Adapter the RQM test result always says Passed.
Do I need to do anything special with the Command Line Adapter to make it return the result of CLI_Run_Jenkins_Job.bat? If not, is there anything else I need to do?
I'm using RQM 4.0.1 with RQM-Extras-CommandLineAdapter-4.0.1.
The batch files are:
CLI_Run_Jenkins_Job.bat:
exit /b 1
test.bat:
echo START
set errorlevel = 0
call CLI_Run_Jenkins_Job.bat Checkout_TCISDemo_Source
if errorlevel 1 goto error
echo PASSED
:error
echo FAILED
2 answers
Hi Kevin,
a (very similar) question was asked on the Forum (about 10 days ago):
https://jazz.net/forum/questions/120628/how-to-return-exit-codes-through-command-line-adapterfrom-junit-test-scenarios-to-rqm-test-results
I'd advise you check it (+ associated references to library)
Regards,
Stéphane
a (very similar) question was asked on the Forum (about 10 days ago):
https://jazz.net/forum/questions/120628/how-to-return-exit-codes-through-command-line-adapterfrom-junit-test-scenarios-to-rqm-test-results
I'd advise you check it (+ associated references to library)
Regards,
Stéphane