Forum Discussion

srinivas_das_l's avatar
srinivas_das_l
Contributor
16 years ago

Groovy script to disable testStep

Hi All,

Can anyone tell me how to disable/Enable  testStep using Groovyscript

Thanks,
Srinivas

2 Replies

  • Shilpa's avatar
    Shilpa
    Occasional Contributor
    Hi,

    I found some solution in Ole's blog. You can have a try with following.

    testRunner.testCase.disabled = true|false
    testRunner.testCase.testSteps["name of teststep"].disabled = true|false
    testRunner.testCase.testSuite.disabled = true|false

    and for assertions this would be:

    testRunner.testCase.testSteps["name of teststep"].assertions["name of assertion"].disabled = ...


    Hope that this will help you. I was able to disable many test steps based upon some conditions    

    Regards,

    Shilpa