【转载】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持续集成与自动化部署系统) 前言 相信每一位程序员都经历过深夜加班上线的痛苦!而作为一个加班上线如家常便饭的码农,更是深感其痛 ...
随机推荐
- Android handler 报错处理Can't create handler inside thread that has not called Looper.prepare()
问题: 写了一个sdk给其他人用,提供一个回调函数,函数使用了handler处理消息 // handler监听网络请求,完成后操作回调函数 final Handler trigerGfHandler ...
- JSOI2009 游戏
1443: [JSOI2009]游戏Game Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 557 Solved: 251[Submit][Stat ...
- cmd find命令
find 作用:从文件中收索字符串 格式:find 参数 "字符串" 路径\文件名 参数: /V 显示所有未包含指定字符串的行. /C 仅显示包含字符串的行数. /N 显示行号. ...
- apache开源项目--thrift
Thrift 是一个软件框架(远程过程调用框架),用来进行可扩展且跨语言的服务的开发.它结合了功能强大的软件堆栈和代码生成引 擎,以构建在 C++, Java, Python, PHP, Ruby, ...
- C# 获取word批注信息
今天在Silverlight 应用程序中实现了 获取word文档批注信息 的功能. 在wcf服务继承接口类中编写的函数如下 /// <summary> /// 获取word批注信息 /// ...
- [Jacky] 解决Ext.Net GridPanel 选择的行数据刷新后不能获取最新值
选择GridPanel中一行数据,当变更数据时并重新刷新之后不能获取最新值,需通过如下方式获取: var internalId = gridPanel.getSelectionModel().getL ...
- JS中Date.parse方法返回NaN解决方案
Date.parse()方法: //将时间字符串转换为秒数 var date_str = '2013-12-3 18:32:00'; alert(date_str.replace(/-/g,'/')) ...
- ImageMagick使用小节
ImageMagick是一个强大的开源图形处理软件,国内应该很少人用,至今仍在更新,放出全版本下载链接 http://ftp.icm.edu.pl/packages/ImageMagick/binar ...
- iOS设备的硬件适配 (关于armv6, armv7, armv7s ) <转>
<转> http://blog.csdn.net/smking/article/details/8148702 1.OpenGL ES版本支持 iPhone:iPhone 3G以下(包 ...
- nslookup、arp、netstat、traceroute
nslookup 主要用于测试DNS服务器是否正常工作,除此之外,还可以对域名和IP地址进行查询. [root@weekend110 ~]# nslookup> www.guet.edu.cn ...