我正在尝试使用空手道测试SOAP服务。通过参考git上的文档,我能够设置我的项目并做一些肥皂功能。我在断言期间遇到问题,因为响应具有特殊字符。详细信息如下:
SOAP XML响应:
<Reason Number="1">
<ReasonText>T12345</ReasonText>
</Reason>
SOAP原始响应:
<ReasonText>T844</ReasonText>
我可以在空手道功能中使用以下命令成功断言:
* def actualResponse = response
* match actualResponse contains '<ReasonText>T12345</ReasonText>'
在使用以下代码时无法断言:
* def actualResponse = response
* match actualResponse contains '<ReasonText>T12345</ReasonText>'
对此表示感谢。
答案 0 :(得分:-1)
There's something very wrong somewhere. And I have no idea what you mean by "SOAP Raw Response". If the server is actually returning what you are saying, then it is a problem with the server, not Karate.
Since no one else has reported this, I'm 99.9% sure you have a problem in your environment. Please take the help of someone from the server-side team if necessary.