Forum Discussion

Manimaran's avatar
Manimaran
Occasional Contributor
11 years ago

How to find a test step is enabled or disabled?

Hi,
i want to know in a test case, if any test step is disabled. if so how can i find a particular test step or test case is enabled or disabled?

4 Replies

  • SiKing's avatar
    SiKing
    Community Expert
    The way I solved this problem is to use Composite Project http://www.soapui.org/Working-with-Proj ... pport.html and then grep through the entire thing for the word "disabled".
    I also filed an enhancement request with SmartBear to be able to search for exactly this kind of information, but I am pretty sure it gets a pretty low priority.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    You could just run this Groovy code:

    log.info testRunner.testCase.getTestStepByName("Test Step Name").disabled

    Thanks,
    Michael Giller
    SmartBear Software
  • SiKing's avatar
    SiKing
    Community Expert
    project.testSuiteList.each {
    it.testCaseList.each {
    if (it.disabled) log.info "Disabled testCase: ${it.name}"
    it.testStepList.each {
    if (it.disabled) log.info "Disabled testStep: ${it.name}"
    }
    }
    }
  • Manimaran's avatar
    Manimaran
    Occasional Contributor
    Thank you. I am able to use the above code and get what i need.