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基于持续集成工具自动化运行的调研姿势的更多相关文章

  1. 《转载》Jenkins持续集成-自动化部署脚本的实现《python》

    本文转载自慕课网 读者须知:1.本手记本着记续接前面的两张手记内容整理2.本手记针对tomcat部署测试环境实现 最近工作比较繁忙,导致这章一直拖延,没有太抽出时间来总结.要实现Jenkins端的持续 ...

  2. 持续集成工具hudson【转载】

    第一节 我的理解 项目中使用了hudson,那么hudson是处在怎样的一个地位呢? 首先就我自己的认知,项目中hudson的作用有一下几点: 1.获取svn服务器上的最新代码: 2.把最新代码编译打 ...

  3. .NET作品集:基于svn 的.net 持续集成工具

    作品背景 这个.net 持续集成作品还是在2014年的时候从事.net 软件项目开发的时候做的,当时部门还用着vs2008用vb.net做项目(现在也是),项目代码极混乱,版本工具用的vss,而且用的 ...

  4. 轻松搭建持续集成工具jenkins

    1.Jenkins介绍1)什么是持续集成随着软件开发复杂度的不断提高,团队开发成员间如何更好地协同工作以确保软件开发的质量已经慢慢成为开发过程中不可回避的问题.尤其是近些年来,敏捷(Agile) 在软 ...

  5. 持续集成工具Jenkins学习总结

    概述 持续集成(Continuous Integration,简称CI)是一种软件开发实践,团队开发人员每次都通过自动化的构建(编译.发布.自动化测试)来验证,从而尽早的发现集成错误.持续集成最大的优 ...

  6. .NET持续集成与自动化部署之路第二篇——使用NuGet.Server搭建公司内部的Nuget(包)管理器

    使用NuGet.Server搭建公司内部的Nuget(包)管理器 前言     Nuget是一个.NET平台下的开源的项目,它是Visual Studio的扩展.在使用Visual Studio开发基 ...

  7. .NET持续集成与自动化部署之路第三篇——测试环境到生产环境的一键部署策略(Windows)

    Jenkins测试环境到生产环境的一键部署策略(Windows) 一.前言     前面我们已经初步实现了开发集成环境.测试环境的持续集成(自动化构建.自动化测试.自动化部署).但生产环境自动化部署迟 ...

  8. 持续集成工具——Jenkins

    一.jenkins简介 1.持续集成工具 2.基于JAVA环境 二.环境搭建 1.安装JDK 2.安装配置git 3.安装配置tomcat Tomcat是针对Java的一个开源中间件服务器(容器),基 ...

  9. .NET持续集成与自动化部署之路第一篇——半天搭建你的Jenkins持续集成与自动化部署系统

    .NET持续集成与自动化部署之路第一篇(半天搭建你的Jenkins持续集成与自动化部署系统) 前言     相信每一位程序员都经历过深夜加班上线的痛苦!而作为一个加班上线如家常便饭的码农,更是深感其痛 ...

随机推荐

  1. Rails3.2.3+ruby1.9.3 环境搭建,提示安全警告

    错误描述: 照着教程搭建了Rails的环境,能够正常运行,但是会但一个警告,如下: SECURITY WARNING: No secret option provided to Rack::Sessi ...

  2. Java之关键字static和final的使用

    static 在Java中声明属性.方法时,可使用关键字static来修饰. 1.static变量       按照是否静态的对类成员变量进行分类可分两种:一种是被static修饰的变量,叫静态变量或 ...

  3. USACO3.25Magic Squares(bfs)

    /* ID: shangca2 LANG: C++ TASK: msquare */ #include <iostream> #include<cstdio> #include ...

  4. 函数 flst_get_first

    /********************************************************************//** Gets list first node addre ...

  5. WPF——菜单栏及TabControl

    一.先造一个窗体,然后在窗体里面增加菜单栏及原始的TabControl选项卡 <Grid> <Menu> <MenuItem Header="文件" ...

  6. 使用vs2010进行驱动开发的补充

    看到前面的一篇文章 ,在这里http://www.cnblogs.com/wubiyu/archive/2010/05/17/1737420.html vs2010配置驱动开发基本上按照如上所说就差不 ...

  7. [POJ 1155] TELE

    TELE Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3787   Accepted: 2007 Description ...

  8. POJ 2411 Mondriaan's Dream

    思路:状态压缩dp,如果在(i,j)位置横着放砖块,那么(i,j)和(i+1.j)都是1,如果竖着放砖块,那么(i,j)为0,(i,j+1)为1,这样每行就可以用一个整数来存放状态,设dp[i][j] ...

  9. OpenStack swift安装

    由于实验室项目需要云存储系统,因此在实验室服务器上搭建一个基于OpenStack swift的云存储系统. 最开始按照官方网站上介绍的方法,使用SAIO方式安装http://docs.openstac ...

  10. centos "cannot open display"的问题

    实用技巧:在Linux下设置xhost方法步骤 第一步:用root登陆linux,启动vnc服务: 第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc ...