[SoapUI] Groovy获取HTTP Status

def value = messageExchange.responseHeaders["#status#"]

 

def httpResponseHeaders = context.testCase.testSteps["MarketsWidget"].testRequest.response.responseHeaders
def httpStatus = httpResponseHeaders["#status#"]
def httpStatusCode = (httpStatus =~ "[1-5]\\d\\d")[0]
log.info httpStatusCode

  

posted on 2017-10-17 16:40  张缤分  阅读(390)  评论(0编辑  收藏  举报

导航