我试着用下面的代码从响应,在qazxsw POI文本得到附件。
Groovy
它包含了一些二进制信息太多,所以它不是完全可读,但在输出得到了以下几点:
Java.IO.byte array input stream@5哦擦74
这是很容易简单地将其编码为Base64并将其存储为一个属性值。
def testStep = testRunner.testCase.getTestStepByName("getData")
def response = testStep.testRequest.response
def ins = response.attachments[0].inputStream
log.info(ins);