答案 0 :(得分:2)
在Groovy script
测试步骤中,您可以通过其名称获取SOAP testStep,并访问响应以获取所有响应标头:
// get the response headers
def headers = testRunner.testCase.testSteps['Your SOAP Request testStep Name'].getTestRequest().getResponse().getResponseHeaders();
// iterate all keys and print the key and value
headers.getKeys().each{
log.info it + headers.get(it,'default')
}