How to remove Custom Properties from a SoapUI TestCase using Groovy?

后端 未结 4 688
长情又很酷
长情又很酷 2021-01-13 00:29

I have created some list of properties under the TestCase. For example look at the following screenshot.

\"SoapU

4条回答
  •  有刺的猬
    2021-01-13 00:51

    you can also use the following:

    data = context.testCase.getTestStepByName("Test Case Name");
    
    String[] propToRemove = new String[data.getPropertyCount()];
    propToRemove = data.getPropertyNames();
    for ( int i = 0 ; i < propToRemove.size(); i++ ){
        data.removeProperty( propToRemove[i] );
    }
    

    Hope this helps. Now you can remove more than one prop.

提交回复
热议问题