[SoapUI]怎样配置SoapUI运行的不同环境,并在Jenkins上面通过命令调用不用的环境

配置SoapUI运行的不同环境

Groovy 脚本来控制environment

在Jenkins上面通过命令调用不用的环境

http://www.soapui.org/Test-Automation/cli-functional-tests.html

通过运行参数E指定environment

 

Running functional tests from the command-line is straightforward using the included testrunner.bat/.sh script, which takes a number of arguments to control which tests to run, output, etc:

  • a : Turns on exporting of all test results, not only errors
  • A : Turns on exporting of all results using folders instead of long
  • c : The TestCase to run, used to narrow down the tests to run
  • D : Sets system property with name=value
  • d : The domain to use in any authentications, overrides any domain set for any TestRequests
  • e : The endpoint to use when invoking test-requests, overrides the endpoint set in the project file
  • E : Sets which environment to use (SoapUI Pro only)
  • F : Sets the format of the report specified with the -R option, for Printable reports this is one of PDF, XLS, HTML, RTF, CSV, TXT, and XML. For Data Export this is either XML or CSV (SoapUI Pro only)
  • f : Specifies the root folder to which test results should be exported (see below)
  • G : Sets global property with name=value
  • g : Sets the output to include Coverage HTML reports ( SoapUI Pro only )
  • h : The host:port to use when invoking test-requests, overrides only the host part of the endpoint set in the project file
  • I : Do not stop if error occurs, ignore them
  • i : Enables SoapUI UI-related components, required if you use the UISupport class for prompting or displaying information
  • j : Turns on exporting of JUnit-compatible reports, see below
  • M : Creates a Test Run Log Report in XML format
  • m : Sets the maximum number of TestStep errors to save for each
  • o : Opens the generated report in a browser (SoapUI Pro only)
  • P : Sets project property with name=value, e.g. -Pendpoint=Value1 -PsomeOtherProperty=value2
  • p : The password to use in any authentications, overrides any password set for any TestRequests
  • r : Turns on printing of a small summary report (see below)
  • R : Selects which report to generate for the test objects executed, for example if running the entire project, this could specify the name of a test-suite-level report that would be generated for each TestSuite. The report is saved as specified with the -F option to the folder specified with the -f option. (SoapUI Pro only)
  • S : Sets to save the project file after tests have been run
  • s : The TestSuite to run, used to narrow down the tests to run
  • t : Sets the soapui-settings.xml file to use, required if you have custom proxy, ssl, http, etc setting
  • u : The username to use in any authentications, overrides any username set for any TestRequests
  • v : Sets password for soapui-settings.xml file
  • w : Sets the WSS password type, either 'Text' or 'Digest'
  • x : Sets project password for decryption if project is encrypted

So for example:

testrunner.bat -FPDF -R"Project Report" c:\projects\my-soapui-project.xml

Runs all tests in the specified my-soapui-project.xml file and creates the default project report available with SoapUI Pro.

posted on   张缤分  阅读(4250)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示