【转载】soapui基于持续集成工具自动化运行的调研姿势
soapui中的testrunner.bat调研姿势,用于自动化测试
副标题:soapui基于持续集成工具自动化运行的调研姿势
各位亲爱的同仁们,大家好吗?
最近项目在搞持续集成工具,我们的测试用例都是基于soapui工具(webservice restful)。
持续集成工具我们使的是jenkins。
我们需要使用工具来自动更新项目代码->自动构建->自动发布->自动RUN测试用例->自动发邮件等等功能。
jenkins支持用户添加运行bat文件来执行用户想让他执行的各种需求。
(其实其他的持续集成工具也都大同小异)
因此我们使用bat文件来调用soapui的testrunner.bat文件来达成这一需求!!!
以下为具体实现步骤:
0.首先请下载最新版本的soupui-pro,记住不要破解版,soupui-pro可以生成详细的测试结果文档,
而普通版本的soupui则没有此功能,并且更有趣的是,soupui官方竟然允许用户通过命令调用testrunner.bat
在用户没有购买license的情况下。(不好意思,英语写多了。)
官方地址为:http://www.soapui.org/,自己去下吧,亲。
1.下载完成后安装soupui-pro,之后你甚至都不用去运行soapui-pro。
假设你的安装目录在:C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin
2.编写一个bat文件,内容如下:
@Echo Off
CD\
C:
CD C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin
testrunner.bat -r -j D:\251Test-soapui-project.xml -f c:\temp\reports -FPDF
之后运行这个bat即可。
3.下面来详细说明这个bat文件
首先我需要进入soapui-pro的安装目录,其目的是要以命令的方式去运行testrunner.bat文件。
(什么?你不知道这个文件是做什么的?好吧他是用来RUN测试用例的工具)
之后调用testrunner.bat,并在其后加入若干个参数。
关于testrunner.bat:
soapUI提供了一个命令行工具testrunner.bat来运行一个项目中的TestSuit,可以在<soap_ui_home>/bin下找到它,
它的使用非常简单,只需要设置下面的几个常用参数即可:
-s 指定要运行的 TestSuite
-f 指定运行结果的输出目录
-j 生成 junit 风格的 report
-r 运行完成以后打印一个简单的 summary
下面这行命令就是运行251Test-soapui-project.xml这个soapUI项目中的PushPoiTestSuite,
把结果输出到c:\temp\reports中。
testrunner.bat -s PushPoiTestSuite -r -j D:\251Test-soapui-project.xml -f c:\temp\reports
如果我想运行xml里的所有测试用例怎么办?好说,删掉-s PushPoiTestSuite即可。
testrunner.bat -r -j D:\251Test-soapui-project.xml -f c:\temp\reports -FPDF
为什么我要加上一个-FPDF呢?这是pro的特性之一,可以将测试结果生成html,试想一下没有html展现是多么恐怖的事情!
自动运行结束后,c:\temp\reports目录中会有运行结果以及一个index.html,打开他!
以下为其余的参数(请原谅我没有翻译成中文)
e : The endpoint to use when invoking test-requests, overrides the endpoint set in the project file
h : The host:port to use when invoking test-requests, overrides only the host part of the endpoint set in the project file
s : The TestSuite to run, used to narrow down the tests to run
c : The TestCase to run, used to narrow down the tests to run
u : The username to use in any authentications, overrides any username set for any TestRequests
p : The password to use in any authentications, overrides any password set for any TestRequests
w : Sets the WSS password type, either 'Text' or 'Digest'
d : The domain to use in any authentications, overrides any domain set for any TestRequests
r : Turns on printing of a small summary report (see below)
f : Specifies the root folder to which test results should be exported (see below)
j : Turns on exporting of JUnit-compatible reports, see below
a : Turns on exporting of all test results, not only errors
o : Opens the generated report in a browser (SoapUI Pro only)
i : Enables SoapUI UI-related components, required if you use the UISupport class for prompting or displaying information
t : Sets the soapui-settings.xml file to use, required if you have custom proxy, ssl, http, etc setting
x : Sets project password for decryption if project is encrypted
v : Sets password for soapui-settings.xml file
D : Sets system property with name=value
G : Sets global property with name=value
P : Sets project property with name=value, e.g. -Pendpoint=Value1 -PsomeOtherProperty=value2
S : Sets to save the project file after tests have been run
I : Do not stop if error occurs, ignore them
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)
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)
g : Sets the output to include Coverage HTML reports ( SoapUI Pro only )
E : Sets which environment to use (SoapUI Pro only)
官方说明传送门:http://www.soapui.org/Test-Automation/functional-tests.html
SoapUI命令行方式运行 http://blog.csdn.net/hunterno4/article/details/38425077
【转载】soapui基于持续集成工具自动化运行的调研姿势的更多相关文章
- 《转载》Jenkins持续集成-自动化部署脚本的实现《python》
本文转载自慕课网 读者须知:1.本手记本着记续接前面的两张手记内容整理2.本手记针对tomcat部署测试环境实现 最近工作比较繁忙,导致这章一直拖延,没有太抽出时间来总结.要实现Jenkins端的持续 ...
- 持续集成工具hudson【转载】
第一节 我的理解 项目中使用了hudson,那么hudson是处在怎样的一个地位呢? 首先就我自己的认知,项目中hudson的作用有一下几点: 1.获取svn服务器上的最新代码: 2.把最新代码编译打 ...
- .NET作品集:基于svn 的.net 持续集成工具
作品背景 这个.net 持续集成作品还是在2014年的时候从事.net 软件项目开发的时候做的,当时部门还用着vs2008用vb.net做项目(现在也是),项目代码极混乱,版本工具用的vss,而且用的 ...
- 轻松搭建持续集成工具jenkins
1.Jenkins介绍1)什么是持续集成随着软件开发复杂度的不断提高,团队开发成员间如何更好地协同工作以确保软件开发的质量已经慢慢成为开发过程中不可回避的问题.尤其是近些年来,敏捷(Agile) 在软 ...
- 持续集成工具Jenkins学习总结
概述 持续集成(Continuous Integration,简称CI)是一种软件开发实践,团队开发人员每次都通过自动化的构建(编译.发布.自动化测试)来验证,从而尽早的发现集成错误.持续集成最大的优 ...
- .NET持续集成与自动化部署之路第二篇——使用NuGet.Server搭建公司内部的Nuget(包)管理器
使用NuGet.Server搭建公司内部的Nuget(包)管理器 前言 Nuget是一个.NET平台下的开源的项目,它是Visual Studio的扩展.在使用Visual Studio开发基 ...
- .NET持续集成与自动化部署之路第三篇——测试环境到生产环境的一键部署策略(Windows)
Jenkins测试环境到生产环境的一键部署策略(Windows) 一.前言 前面我们已经初步实现了开发集成环境.测试环境的持续集成(自动化构建.自动化测试.自动化部署).但生产环境自动化部署迟 ...
- 持续集成工具——Jenkins
一.jenkins简介 1.持续集成工具 2.基于JAVA环境 二.环境搭建 1.安装JDK 2.安装配置git 3.安装配置tomcat Tomcat是针对Java的一个开源中间件服务器(容器),基 ...
- .NET持续集成与自动化部署之路第一篇——半天搭建你的Jenkins持续集成与自动化部署系统
.NET持续集成与自动化部署之路第一篇(半天搭建你的Jenkins持续集成与自动化部署系统) 前言 相信每一位程序员都经历过深夜加班上线的痛苦!而作为一个加班上线如家常便饭的码农,更是深感其痛 ...
随机推荐
- common.css 值得学习的css样式布局
正常的项目当中,应当有一个common.css,就是把一些常用的样式,写入其中. 然后再结合一些特性的css,构造漂亮的页面. 下面欣赏一些海盗商城的common.css. /***样式初始化***/ ...
- 函数page_cur_search_with_match
/****************************************************************//** Searches the right position fo ...
- bzoj1196
带有限制的生成树 首先不难想到二分答案转化为判定性问题 假设二分出了一个答案p, 首先我们先考虑建一级公路. 由于一级公路费用是大于二级公路的,所以对于那些一级公路花费<=p的道路, 不难想到让 ...
- 六月计划#2B(6.10-6.16)
4/7 STL set 数学 快速傅立叶(FFT) 高斯消元 动态规划 斜率优化
- 定制属于自己的自动化安装的linux系统镜像
使用软件和平台 1.基于平台: Vmware workstation 8.0 2.基于系统镜像: rhel-server-5.8-i386 ...
- 安装 Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ...
- oracle删掉重复数据的语法
--查询重复数据-- ) --删掉重复数据-- ) );
- HTTP协议分析及攻防方法
HTTP协议简介 应用层协议,无状态协议(可设定为维持TCP连接,但服务器端的资源会释放).默认HTTP的端口号为80,HTTPS的端口号为443. 基于HTTP协议的客户机访问包括4个过程,分别是建 ...
- JZ2440开发笔记(8)——FCLK、HCLK和PCLK
S3C2440中有三种时钟,分别是FCLK,HCLK和PCLK.这三种时钟的功能各不相同,其中FCLK主要是为ARM920T的内核提供工作频率,如图: HCLK主要是为S3C2440 AHB总线(Ad ...
- 最近用unity5弄的一些渲染
unity5 人皮渲染 Skin Shading 换了一种方法,优化了一下代码,unity5效果很好,消耗不大 点开可查看大图 加入了次表面散射的阴影与自阴影 unity5 ocean real- ...