Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
16 years ago

removing groovy test step across all project

would it possible to write a load script that can delete a groovy step from all test cases in the project.

I have a project with a many groovy steps called 'debug'. I want to remove all instances of this step in the project.


Thanks

Ali

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Ali,

    you could try this script:

    import com.eviware.soapui.support.xml.XmlUtils;
    import com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep;
    import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep;
    for(i in project.testSuiteList) {
      for(o in i.testCaseList) {
        for(r in o.testStepList) {
          if(r instanceof WsdlGroovyScriptTestStep && r.name.equals("debug"))
          o.removeTestStep((WsdlTestStep) r);
        }
      }
    }


    regards!

    /Dragica
    eviware.com