【转载】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持续集成与自动化部署系统) 前言 相信每一位程序员都经历过深夜加班上线的痛苦!而作为一个加班上线如家常便饭的码农,更是深感其痛 ...
随机推荐
- VIM 及其插件使用快捷键汇总
我的博客:www.while0.com vim搜索取消高亮 :nohl
- mapreduce: InputFormat详解 -- RecordReader篇
InputFormat是MapReduce中一个很常用的概念,它在程序的运行中到底起到了什么作用呢? InputFormat其实是一个接口,包含了两个方法: public interface Inpu ...
- 结构体dict_field_t
typedef struct dict_field_struct dict_field_t; typedef struct dict_field_struct dict_field_t; /** Da ...
- NOI2008 志愿者招募
1061: [Noi2008]志愿者招募 Time Limit: 20 Sec Memory Limit: 162 MBSubmit: 1859 Solved: 1169[Submit][Stat ...
- JAVASCRIPT中RegExp.$1是什么意思
RegExp 是javascript中的一个内置对象.为正则表达式. RegExp.$1是RegExp的一个属性,指的是与正则表达式匹配的第一个 子匹配(以括号为标志)字符串,以此类推,RegExp. ...
- 为SharePoint网站创建自定义导航菜单
转:http://kaneboy.blog.51cto.com/1308893/397779 相信不少人都希望把SharePoint网站内置的那个顶部导航菜单,换成自己希望的样式.由于SharePoi ...
- SharePoint Services 数据库表
转:http://dugan.bokee.com/630446.html 以下是Microsoft Windows SharePoint Services架构中数据库列表. Configuration ...
- C#图片处理之: 另存为压缩质量可自己控制的JPEG
处理图片时常用的过程是:读入图片文件并转化为Bitmap -> 处理此Bitmap的每个点以得到需要的效果 -> 保存新的Bitmap到文件使用C#很方便的就可以把多种格式的图片文件读到B ...
- MVC3中Action返回类型ActionResult类型
MVC3中Action返回类型ActionResult在System.Web.Mvc命名空间中.这些包含在控制器中的方法,我们称为控制器中的 Action,比如:HomeController 中的 I ...
- JD-GUI反编译后代码逻辑分析
一,用jd-gui.exe等工具查看源代码.如何你不会,可以参看此文章: http://blog.csdn.net/hp_2008/article/details/8207879 可以到以下连接下载可 ...