Hi,
I am running several tests on an unatteded machine, controlled by a PowerShell script. The tests are compiled elsewhere, and the test executable file and it required dlls are then copied into the test system. The script launches the tests in sequence and logs the resulting errorlevels (exit codes).
Errorlevels are documented at https://www.ranorex.com/help/latest/ran ... execution/. Errorlevel 0 means "Successful test run", and that is what I see most of the time, fortunately.
Errorlevel -1 means "Test run aborted due to error." When I open the corresponding rxzlog file, I see failures and can try to find reasons. This is ok.
Today, I found that a test execution exited with errorlevel -1, but the rxzlog file showed 4 out of 4 tests succeeded. When I look into the results uploaded into TestRail, I see the same pattern: All 4 tests succeeded. How can that be?
This is Ranorex 10.1.7 running under Windows 10 22H2.
Cheers
Hans
Successful test, error level -1
Re: Successful test, error level -1
Hi, do any of the actions in those 4 tests have "continue on failure" enabled? Or any other kind of advanced error handling?
Re: Successful test, error level -1
Hi @IvanF, yes "Continue on Error" may be enabled on some actions. What else could be "advanced error handling"?
If an error occurred which is ignored due to "continue on error", wouldn't there be a warning in the protocol?
If an error occurred which is ignored due to "continue on error", wouldn't there be a warning in the protocol?
Re: Successful test, error level -1
Advanced error handling = any user code modules that perform functions beyond what's available through the Actions UI. E.g., enable-continue-on-fail-without-warning-t11938.html - this thread mentions a Try...Catch block that ignores the warning for Continue on Fail.
If nothing like that is used, do you pass the "/reportlevel:" argument explicitly in the PowerShell script or do you use the default values?
If nothing like that is used, do you pass the "/reportlevel:" argument explicitly in the PowerShell script or do you use the default values?
Re: Successful test, error level -1
@IvanF, thanks for your reply. I think I don't explicitly catch exceptions, but I'll recheck that. I am passing the following command line options to the test: -agent:... -testrail -truser=... -trpass=... -trvideo -trrunname=... -zrf=... (I don't remember why -agent requires a colon and the others want an equals sign, but it works that way).
Re: Successful test, error level -1
There's lot of user code involved, and some of it has try-catch blocks, but I see no indication that any exception was thrown during test execution.
Re: Successful test, error level -1
I see, i'd suggest trying to run the command line execution once more with the "/reportlevel:debug", just to make sure it would display all the relevant info and not skip the info/warning levels.
If that doesn't produce any additional hints, a direct support ticket sharing more about the Actions/user code setup may be the best bet.
If that doesn't produce any additional hints, a direct support ticket sharing more about the Actions/user code setup may be the best bet.
Re: Successful test, error level -1
Will do that, and then wait to see when the problem shows up again Thanks!