java - 通过 groovy 脚本运行测试步骤时如何解决错误“意外元素:CDATA”?
问题描述
我正在运行包含 15 个测试步骤的测试套件,其中包含 groovy 脚本和肥皂请求步骤。
当我手动运行时,它运行完美,因为它在通过 groovy 脚本执行时给出错误消息,如“意外元素:CDATA” 。
Groovy 脚本:
for(tc in testsuite.testCaseList)
{
for(stp in tc.testStepList)
{
if (!stp.isDisabled())
{
testRunner.runTestStep(stp)
def assertionList = stp.getAssertionList()
..........
}
}
}
通过另一个 groovy 脚本步骤获取响应数据:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def responseHolder = groovyUtils.getXmlHolder("requestName#Response")
def appId = responseHolder.getNodeValue("//*:application/*:applicationId")
testRunner.testCase.testSuite.setPropertyValue("AppId",appId)
谁能给我你的建议来解决这个问题?
谢谢
Karunagara Pandi G
解决方案
推荐阅读
- html - 使用 VBA 从网站提取数据,但出现运行时错误 '91'
- amazon-web-services - 为服务提供看门狗功能的 AWS 服务
- html - Google docs iframe 无法在移动设备上运行
- javascript - 如何仅在特定网址中添加 javascript 代码?
- java - RxJava 从 Openweathermap 获取多个城市天气
- node.js - 如何在 Jenkins 上更改节点版本?
- docker - Docker Mac,为什么我不能按域访问我的容器?
- xamarin.ios - 在 Xamarin.IOS 中本地存储令牌
- kubernetes - 如何在 Kubernetes 中获得特定部署的停机时间?
- c# - .net core在linux平台哪里搜索证书