[英]How to get the assertion data in SoapUI using Groovy script?
enter image description here在此处输入图像描述
I have a SOAP request.我有一个 SOAP 请求。 Some times it gives a null/empty response.
有时它会给出一个空/空响应。 I have added assertion for the request and I am getting the assertion status and description.
我已经为请求添加了断言,并且我得到了断言状态和描述。 But how can I get the message "null/empty response"(screen shot of the message is attached) using the Groovy script.
但是如何使用 Groovy 脚本获取消息“空/空响应”(附加消息的屏幕截图)。
def assertionsList = testRunner.getTestCase().getTestStepByName(""+testStep[i]+"").getAssertionList()
assertioncounter = assertionsList.size()
for( e in assertionsList){
log.info e.status
log.info e.DESCRIPTION
}
assertioncounter = assertionsList.size()
for(e in assertionsList)
{
log.info e.status
log.info e.DESCRIPTION
error = e.getErrors()
if (error != null)
{
log.info e.error[0].getMessage()
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.