It's all about the answers!

Ask a question

RQM test case always shows Pass, even when test script returns non-0 value


Kevin Morfitt (1111) | asked Aug 05 '13, 10:10 a.m.
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

2 answers



permanent link
Stephane Leroy (1.4k149) | answered Aug 05 '13, 11:20 a.m.
JAZZ DEVELOPER
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

permanent link
Kevin Morfitt (1111) | answered Aug 05 '13, 11:37 a.m.
It looks like a similar problem except that it's using JUnit test scripts and I'm using Windows test scripts. It looks like that one's not fixed yet anyway.

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.