【问题标题】:Capturing response to a soapUI test run捕获对soapUI 测试运行的响应
【发布时间】:2011-12-15 18:30:33
【问题描述】:

我正在使用soapUI 的testrunner.bat 从命令行执行测试。我想检查对 Web 服务调用的响应。这可以从 UI 轻松完成,但我还没有看到将响应转储到文件的选项。 这是我正在使用的命令:

testrunner.bat -sSuite -cPingProduction -r -I "C:\Program Files\eviware\Projects\Project-webchecker-soapui-project.xml"

此命令会生成一个日志文件,但其中没有响应/请求。

谢谢。

【问题讨论】:

    标签: web-services soapui


    【解决方案1】:

    我通过创建一个测试步骤(在一个测试用例中)并使用这个 Groovy 脚本来做到这一点:

    def response = context.expand( '${request#Response}' ) 
    // where request is the name of your request
    new File( "C:/response.txt" ).write( response )
    

    您调用 testrunner.bat 的语法是正确的,我已经验证它对我有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-05
      • 2015-09-29
      • 2022-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多