Groovy 是否从SoapUI中测试套件的所有测试用例中删除属性值?

Groovy 是否从SoapUI中测试套件的所有测试用例中删除属性值?,groovy,soapui,Groovy,Soapui,我在一个测试套件中有108个测试用例。 在每个测试用例中,它都有某些属性,以r\uu开头(表示它是来自其他测试用例的返回变量)。我想删除所有以r\u开头的属性值 我可以在每个测试用例中通过TearDown脚本来实现这一点。但是,这需要很多时间 是否可以从套件级别的拆卸脚本执行相同的操作?是的,这是可能的 下面是套件级别的拆卸脚本 //Define the pattern of property names which you want to clear the values def patter

我在一个测试套件中有108个测试用例。
在每个测试用例中,它都有某些属性,以
r\uu
开头(表示它是来自其他测试用例的返回变量)。我想删除所有以
r\u
开头的属性值

我可以在每个测试用例中通过
TearDown脚本
来实现这一点。但是,这需要很多时间

是否可以从套件级别的拆卸脚本执行相同的操作?

是的,这是可能的

下面是套件级别的拆卸脚本

//Define the pattern of property names which you want to clear the values
def pattern = 'r_'
//Loop thru each case of the suite and find those matching properties and clear them
testSuite.testCaseList.each { kase ->
    def props = kase.propertyNames.findAll { it.startsWith(pattern) }
    def msg = props ?: 'None'
    log.info "Matching properties for ${kase.name} test are : ${msg}"
    props?.each { prop -> kase.setPropertyValue(prop, '')}
}