soapui groovy执行testRunner并基于断言传递执行辅助测试

soapui groovy执行testRunner并基于断言传递执行辅助测试,groovy,soapui,test-runner,Groovy,Soapui,Test Runner,我有一个groovy测试,它执行一些JSON slurper操作,其中一个操作是从响应中提取一个id。然后在groovy脚本中执行jdbc测试步骤。我的问题是: 我需要访问jdbc测试步骤中的断言结果——换句话说,如果我从jdbc测试中得到肯定的响应,那么我希望在原始groovy步骤中执行另一个步骤 有什么建议我可以这样做吗 以下是我目前掌握的情况: for(platform in segments.platformIds) { if (platform.system==

我有一个groovy测试,它执行一些JSON slurper操作,其中一个操作是从响应中提取一个id。然后在groovy脚本中执行jdbc测试步骤。我的问题是:

我需要访问jdbc测试步骤中的断言结果——换句话说,如果我从jdbc测试中得到肯定的响应,那么我希望在原始groovy步骤中执行另一个步骤

有什么建议我可以这样做吗

以下是我目前掌握的情况:

for(platform in segments.platformIds) {
            if (platform.system=='ABC') {
                def platformId = "${platform.id}"
                log.info "current Id = ${platform.id}"
                testRunner.testCase.getTestStepByName("pass platformId").setPropertyValue("platformId", platformId)
                testRunner.runTestStepByName("Verify ID exists in DB")
                ** I want to perform another test based on the result of the above TestStep **
            }
        }
找到解决方案:

import com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus

myTestStepResult = testRunner.runTestStepByName("Verify ID exists in DB")
myStatus = myTestStepResult.getStatus(
                     if( myStatus ==TestStepStatus.OK)
                     ** execute the next testRunnerStep **