在模拟中 - 空手道正在扔com.intuit.karate.core.scriptbridge.xmlpath(scriptbridge.java:421)xml身体路径中的null指针异常匹配
在模拟中,我有一种情况:
我已经通过了XML Bodypath,只有早些时候才起作用,现在它给我错误的
Scenario: pathMatches('/some/end/point/v8')
&& methodIs('POST') && bodyPath('/xml/path/values/text()') == "4000758341"
&& bodyPath('/xml/path/value/text()') == "2"
&& bodyPath('/xml/request/path/value/text()') == "P"
* def responseStatus = 200
* print request
* def responseHeaders = { 'Content-Type': 'text/xml' }
* def response =
"""
"""
But I am getting error -
**com.intuit.karate.core.ScriptBridge.xmlPath(ScriptBridge.java:421)
10:06:39.027 [nioEventLoopGroup-3-1] 613209444 WARN com.intuit.karate - scenario match evaluation failed: evaluation (js) failed: pathMatches('/some/end/point/v8')
&& methodIs('POST') && bodyPath('/xml/path/values/text()') == "4000758341"
&& bodyPath('/xml/path/value/text()') == "2"
&& bodyPath('/xml/request/path/value/text()') == "P", java.lang.NullPointerException**
人可以帮助我,我在做错了什么
In mock, I have one scenario :
I have passed xml bodypath like this only earlier it worked, now it is giving me error
Scenario: pathMatches('/some/end/point/v8')
&& methodIs('POST') && bodyPath('/xml/path/values/text()') == "4000758341"
&& bodyPath('/xml/path/value/text()') == "2"
&& bodyPath('/xml/request/path/value/text()') == "P"
* def responseStatus = 200
* print request
* def responseHeaders = { 'Content-Type': 'text/xml' }
* def response =
"""
"""
But I am getting error -
**com.intuit.karate.core.ScriptBridge.xmlPath(ScriptBridge.java:421)
10:06:39.027 [nioEventLoopGroup-3-1] 613209444 WARN com.intuit.karate - scenario match evaluation failed: evaluation (js) failed: pathMatches('/some/end/point/v8')
&& methodIs('POST') && bodyPath('/xml/path/values/text()') == "4000758341"
&& bodyPath('/xml/path/value/text()') == "2"
&& bodyPath('/xml/request/path/value/text()') == "P", java.lang.NullPointerException**
Can anyone help me, what i am doing wrong
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论