lphilippe_macau
13 years agoContributor
Problem with Runner.Stop
Hi everyone,
I currently have a project with bunch of test items that are grouped up in diffferent categories. Each category has as it's parent a script that stops if a certain variable is not met, that way only a certain batch of tests are run depending on the initial project variables. To stop the tests from running we call the Runner.Stop method, but this method will generate a red "X" in the log even though no error is actually logged because the test item is not completed. Is there a way around this? We do not want errors in the log, we just want to skip a batch of tests without having to put conditions on each one.
Here's an example script I'm using to skip child tests:
function Not_TestType_Filter(TestType)
{
if(Project.Variables.TestType == TestType)
{
Log.AppendFolder("Stop execution of non-applicable tests");
Runner.Stop(true);
Log.PopLogFolder();
}
}
Thank's for you help
L-P
I currently have a project with bunch of test items that are grouped up in diffferent categories. Each category has as it's parent a script that stops if a certain variable is not met, that way only a certain batch of tests are run depending on the initial project variables. To stop the tests from running we call the Runner.Stop method, but this method will generate a red "X" in the log even though no error is actually logged because the test item is not completed. Is there a way around this? We do not want errors in the log, we just want to skip a batch of tests without having to put conditions on each one.
Here's an example script I'm using to skip child tests:
function Not_TestType_Filter(TestType)
{
if(Project.Variables.TestType == TestType)
{
Log.AppendFolder("Stop execution of non-applicable tests");
Runner.Stop(true);
Log.PopLogFolder();
}
}
Thank's for you help
L-P