SoapUI命令行方式运行
来源:互联网 发布:冰川网络客服 编辑:程序博客网 时间:2024/06/07 05:43
SoapUI支持用命令行方式运行测试用例并生成测试报告,因此使用SoapUI可以很好地进行接口测试自动化测试以及持续集成。
执行完成后将生成JUnit格式的xml报告文件,可在Jenkins中生成测试报告及接口响应性能趋势图等
首先查看testrunner.sh脚本支持哪些选项
直接执行testrunner.sh将给出帮助手册:
soapUI Pro 4.5.2 TestCase Runner
usage: testrunner [options] <soapui-project-file>
-F Report format. Used with -R. Valid options PDF, XLS, HTML, RTF,
CSV, TXT, and XML (comma-separated)
-v Sets password for soapui-settings.xml file
-t Sets the soapui-settings.xml file to use
-A Turns on exporting of all results using folders instead of long
filenames
-D Sets system property with name=value
-E Sets the environment
-G Sets global property with name=value
-I Do not stop if error occurs, ignore them
-M Creates a Test Run Log Report in XML format
-P Sets or overrides project property with name=value
-R Report to Generate
-S Saves the project after running the tests
-a Turns on exporting of all results
-c Sets the testcase
-d Sets the domain
-e Sets the endpoint
-f Sets the output folder to export results to
-g Sets the output to include Coverage HTML reports
-h Sets the host
-i Enables Swing UI for scripts
-j Sets the output to include JUnit XML reports
-m Sets the maximum number of TestStep errors to save for each
testcase
-o Opens generated report(s) in a browser
-p Sets the password
-r Prints a small summary report
-s Sets the testsuite
-u Sets the username
-w Sets the WSS password type, either 'Text' or 'Digest'
-x Sets project password for decryption if project is encrypted
usage: testrunner [options] <soapui-project-file>
-F Report format. Used with -R. Valid options PDF, XLS, HTML, RTF,
CSV, TXT, and XML (comma-separated)
-v Sets password for soapui-settings.xml file
-t Sets the soapui-settings.xml file to use
-A Turns on exporting of all results using folders instead of long
filenames
-D Sets system property with name=value
-E Sets the environment
-G Sets global property with name=value
-I Do not stop if error occurs, ignore them
-M Creates a Test Run Log Report in XML format
-P Sets or overrides project property with name=value
-R Report to Generate
-S Saves the project after running the tests
-a Turns on exporting of all results
-c Sets the testcase
-d Sets the domain
-e Sets the endpoint
-f Sets the output folder to export results to
-g Sets the output to include Coverage HTML reports
-h Sets the host
-i Enables Swing UI for scripts
-j Sets the output to include JUnit XML reports
-m Sets the maximum number of TestStep errors to save for each
testcase
-o Opens generated report(s) in a browser
-p Sets the password
-r Prints a small summary report
-s Sets the testsuite
-u Sets the username
-w Sets the WSS password type, either 'Text' or 'Digest'
-x Sets project password for decryption if project is encrypted
命令行格式:testrunner [选项] soapui工程的xml文件
主要命令选项说明:
-D 设置system property,即可以设置SoapUI——Help——System properties菜单下的属性值
例如命令行指定-Dfile.encoding=UTF-8
-I 设置为用例执行中出现错误时不停止,继续执行
-a 默认SoapUI只会在用例执行时有错时(如断言有错),才会生成.txt的包含请求、响应的详细日志信息,便于查看当时请求出 错的详细情况,若加上-a选项,则不论出错与否都将生成该报告文件。
-f 设置报告输出的路径,不指定则默认为输出到当前目录下
-j 生成JUnit格式的XML报告文件
-r 打印简略的总结报告
-s 指定要执行的用例集名称
因此命令行执行SoapUI用例可以如下:
sh testrunner.sh-Dfile.encoding=UTF-8 -I -s $testsuit -r -j-f $REPORTS_PATH $TESTSUIT_PATH/soapui_example.xml
出错时生成的.txt格式的包含详细请求参数及响应数据的日志报告文件可以邮件附件形式发送,进行及时反馈及出错时问题定位
0 0
- SoapUI命令行方式运行
- SoapUI命令行方式运行
- 命令行方式运行JMeter
- 命令行方式运行PHP脚本
- 命令行方式运行PHP脚本
- 命令行方式运行php脚本
- SoapUI传递数组方式
- 使用命令行方式运行 JMeter 脚本
- 使用命令行方式运行 JMeter 脚本
- 使用命令行方式运行 JMeter 脚本
- 使用命令行运行程序的方式
- hadoop-quickstart-命令行方式打包运行wordcount
- C++命令行方式编译、链接、运行程序
- 使用命令行方式运行 JMeter 脚本
- [转]命令行方式运行PHP脚本
- hadoop2.6 命令行方式运行WordCount
- 以命令行的方式运行activity
- 使用命令行方式运行 JMeter 脚本
- 小程序
- SoapUI用groovy脚本提取json数组数据
- extern "c"用法解析
- PHP判断当前是否utf-8
- Android 常用参考文档
- SoapUI命令行方式运行
- 极光IM简单的聊天测试
- 基于STM8的小型操作系统
- LeetCode91. Decode Ways
- PHP检查是否BOM头
- SoapUI对于Json数据进行属性值获取与传递
- 每天学一点linux(9)--文件与目录的默认权限与隐藏权限
- soapUI(groovy脚本作用1)请不要问为什么系列1
- android lrucache使用