Forum Discussion

autoscout24's avatar
autoscout24
Contributor
15 years ago

Disable Teardown - of the Disable test case

Hi guys,
I have a scenario in my test case. In the setUp method of the test case we have the following script but we don't know how to disable the tearDown of that test case. The script inside the tearDown always works...

Any suggestions ?

Script we are using so far

def Prjcountry = testRunner.testCase.testSuite.project.getPropertyValue("sTestRunCountry")
if(country.equals(Prjcountry))
{
testRunner.testCase.disabled = false;
testRunner.testCase.getTestStepList().each()
{
testRunner.testCase.getTestStepByName( it.getName() ).disabled = false;
}
testRunner.testCase.setPropertyValue( "TestRunDisable", "false");
}

1 Reply

  • Hi!

    Maybe you could just add the following to your tearDown:

    if( testCase.disabled )
    return;

    ?

    regards,

    /Ole
    SmartBear Software