Runner.Stop(true) coded in OnStartTestCase() event open a "test item failed to run" dialog box
Hello everyone,
In a context of "dynamically" selected tests coded in javascript, I would like to condition the execution of my tests items according to a defined list I have in memory.
I don't want to use the "enable/disable" checkbox of the test item because the state can't be changed during execution, so all my test items all selected...
I also don't want to generate an error to move to the next test (to avoid the error mark in the logs as it is not an error but a non-selection).
I was thinking of using the Runner.Stop(true) command which seemed to meet my need. This command works well as long as it is directly in the test script, however, in order not to have to copy the condition in each script, I would like to place it in the OnStartTestCase() event allowing to shunt the test before it even runs.
In the latter context, the command does the right thing but displays a dialog box asking for confirmation to continue after the test fails to run (both in TestComplete and TestExecute).
Does anyone have an idea or a solution to allow me to get around this problem without having to place this code directly in the test script?
Thanks in advance for your help,
Loïc