https://www.soapui.org/test-automation/running-from-command-line/functional-tests.html

TestRunner Command-Line Arguments

To run functional tests from a command line, you use the testrunner.bat/.sh file that is located in the <SoapUI>\bin folder. The runner uses the following command-line arguments:

  • a : Commands the runner to export all generated test results. If you skip this argument, the runner will export only error messages.

  • A : Commands the runner to organize files with test results into directories and subdirectories that match the test suites and TestCases the runner executes.

    If you skip the -A argument, the runner will save all result files to the directory that the -f argument specifies. The file names will include the test suite's and test case's names.

    The runner can ignore this attribute depending on the -R command-line argument value.

  • c : Specifies the TestCase to run. Use this argument to narrow down the tests to be executed. If you do not specify this argument, the runner will launch all the tests that relates to the parent test suite.

  • D : Specifies a value of a system property for the test run. The specified value will override the variable's value during the run. Usage: -D=. If the value includes spaces, enclose the entire argument in quotes. To override several variable values, specify the -D argument several times.

  • d : Specifies the domain that the simulated requests will use for authorization. This argument overrides the authorization domain specified in your test properties.

  • e : Specifies the endpoint to use in test requests. The specified endpoint should include the protocol part (for example, https://).

    This argument overrides the endpoints specified for TestSteps in your test project. See also description of the -h argument.

  • E : Specifies the environment to use in the test run (SoapUI Pro only).

  • F : Specifies the format of the exported reports. Usage: -F<FormatName>. Supported formats include PDF, XLS, HTML, RTF, CSV, TXT and XML. If the parameter is not specified, PDF is used.

    To export results in several formats, separate them with commas. For example, -FPDF,XML,CSV.

    The runner can ignore -F argument depending on the value of the -R argument. See the description of this -R argument below.

    To export results in various formats, you need a SoapUI Pro license. Sign up for a free trial to check how it works.

  • f : Specifies the root directory, where the runner will save test result files. If the specified directory does not exist, it will be created.

    Important: if the directory exists, reports’ files in it will be overwritten.

  • G : Specifies a value of a global property for the test run. The specified value will override the variable's value during the run. Usage: -G<variable>=<value>. If the value includes spaces, enclose the entire argument in quotes. To override several variable values, specify the -G argument several times.

  • g : Commands the runner to generate a coverage report (HTML format). To use this argument, you need a SoapUI Pro license. Sign up for a free trial to check how it works.

  • h : Specifies the host and port to use in test requests. Usage: -h<host>:<port>. You can specify the host by using its IP address or name.

    This argument overrides endpoints specified in the project file. See also description of the -e argument.

  • I : Commands the runner to ignore errors. If you put this argument to the command line, the test log will contain no information on errors that occur during the test run. If you skip this argument, the runner will stop the run on the first error that occurs and will post full information about the error to the log.

  • i : Commands to the runner to enable UI-related components. Use this command-line argument, when you use the UISupport class in your tests.

  • J : Commands the runner to create JUnit-style reports with test case properties in them. Meaningful only if the -j argument is also specified (see below).

  • j : Commands the runner to generate JUnit-compatible reports. This argument is similar to the -R"JUnit-style HTML Report" command-line argument.

  • M : Commands the runner to create an XML file with brief test results. This argument does not depend on the other command-line arguments that concern result export: -F, -R and -A.

  • m : Sets the maximum number of TestStep errors to log for each TestCase.

  • o : Commands the runner to open the generated reports in your default web browser after the test run is over. To use this functionality, you need a SoapUI Pro license. Sign up for a free trial to check how it works.

  • P : Specifies a value of a project property for the test run. The specified value will override the variable's value during the run. Usage: -P<variable>=<value>. If the value includes spaces, enclose the entire argument in quotes. To override several variable values, specify the -P argument several times.

  • p : Specifies the password to use during the run for authorization. This argument overrides the authorization password settings specified in your test project.

  • R : Specifies the type of the report data. Usage: -R. Report type can be one of the following:

    • TestCase Report - Generates a report in the format that is specified by the -F argument. The runner will save the report files to the directory that the -f argument specifies. Depending on the -A argument value, the files can be organized into subdirectories.
    • JUnit-Style HTML Report - Generates a report as JUnit-style HTML files. See JUnit-Style HTML Reports. When this value is used, the runner ignores the -F and -A arguments.
    • Data Export - Generates XML files with report data. When you use this argument, -F must be XML or must not be specified.

    Use the -f argument to specify the directory, where the runner will save generated report files.

    Note that to use reports in your tests, you need a SoapUI Pro license. If you do not have it, sign up for a free trial to try how it works.

  • r : Commands the runner to include a summary report into the test log.

  • S : Commands the runner to save the test project after the test run finishes. This command-line argument may be useful, if you store data during the test within the project.

  • s : Specifies the test suite to run. if you skip this argument, the runner will execute all the test suites in your project.

  • t : Specifies the workspace settings filed to be used during the test run. If you skip this command-line argument, the runner will use the default file – soapui-settings.xml - that is located in your user directory.

    Use this argument to specify another settings file for the run. It helps you use different proxy, SSL, HTTP and other settings without changing them in your test project.

    See also description of the -v argument.

  • u : Specifies the user name to be used in test request authorizations. This argument overrides user names specified in your test project.

  • v : Specifies the password for your settings XML file. See also description of the -t argument.

  • w : Specifies the WSS password type. Usage: -w<password type>, where <password type> is of the following:

    • Text - Corresponds to the PasswordText WSS password type.
    • Digest - Corresponds to the PasswordDigest WSS password type.
  • x : Specifies the project password, in case the project is encrypted.

Examples

  • The following command runs all functional tests from the specified project:

    testrunner.bat "c:\my projects\my-project.xml"

  • The following command runs the 'my test case' TestCase in your project and creates HTML files in a JUnit-style format:

    testrunner.bat -FPDF -R"JUnit-Style HTML Report" -c"my test case" c:\my projects\my-project.xml

[SoapUI] SoapUI命令行方式运行的更多相关文章

  1. SoapUI命令行方式运行

    http://stackoverflow.com/questions/9220132/soapui-groovy-script-calls-to-command-line SoapUI支持用命令行方式 ...

  2. 使用命令行方式运行 JMeter 脚本

    For non-interactive testing, you may choose to run JMeter without the GUI. To do so, use the followi ...

  3. JMeter命令行方式运行时动态设置线程数及其他属性(动态传参)

    在使用JMeter进行性能测试时,以下情况经常出现: 1.测试过程中,指定运行的线程数.指定运行循环次数不断改变: 2.访问的目标地址发生改变,端口发生改变,需要改写脚本. 上面的问题在GUI中,直接 ...

  4. php 命令行方式运行时 几种传入参数的方式

    1. url方式 $param = array(); if ($argc > 1) { parse_str ( $argv [1], $param ); foreach ( $param as ...

  5. jmeter - 命令行方式运行

    命令格式: jmeter -n -t <testplan filename> -l <listener filename> 参数说明: -n 非 GUI 模式 -> 在非 ...

  6. 命令行方式运行hadoop程序

    1,写一个java代码.*.java.(这里从example 拷贝一个过来作为测试) cp src/examples/org/apache/hadoop/examples/WordCount.java ...

  7. java打包/命令行方式运行jar(命令行进行程序测试)

    public class Testtmp { public static void main(String[] args) { // TODO Auto-generated method stub f ...

  8. 命令行方式运行yii2程序

    测试环境,yii 2.0.3版本 web访问方式,控制器放在controllers目录下 ,浏览器访问如下地址 http://127.0.0.1/index.php?r=[controller-nam ...

  9. 从命令行模式运行Windows管理工具。

    从命令行模式运行Windows管理工具. 分类: Play Windows 2004-08-06 16:39 6076人阅读 评论(3) 收藏 举报 1.可以直接在开始-〉运行里面输入的管理工具: 文 ...

随机推荐

  1. 黄聪:免费C#反编译软件工具。Reflector已经out了,试试ILSpy吧

    转载自:http://www.cnblogs.com/JamesLi2015/archive/2011/09/08/2170519.html Reflector是.NET开发中必备的反编译工具.即使没 ...

  2. Cousera 无法播放视频 解决办法 widows 和 linux

    查资料得知,Cousera无法播放课程视频原因在于DNS污染. 尽管通过FQ软件把视频看完了,在最后一课找到了这个解决办法,现在拿出来分享给大家: Windows: 请参照以下链接: http://j ...

  3. kotlin学习一:kotlin简介

    kotlin是JetBrains公司出品的基于JVM的语言,和其他JVM语言一样,目的在于提供比JAVA更加简介的语法, 同时提供函数式编程,不需要再像JAVA一样所有的一切都要依托于类. kotli ...

  4. zookeeper的四种类型的节点

    znode创建类型(CreateMode),有以下四种: PERSISTENT 持久化节点 PERSISTENT_SEQUENTIAL 顺序自动编号持久化节点,这种节点会根据当前已存在的节点数自动加 ...

  5. Vim编辑器基本操作学习(二)

    操作符+位移 x命令可以删除一个字符,4x可以删除4个字符. dw可以删除一个word,w事实上是向后移动一个word的命令:dw可以接上一个任意一个位移命令,它将删除从当前光标开始到位移终点处的文本 ...

  6. 【洛谷】P1892 团伙(并查集)+ 求助

    题目描述 1920年的芝加哥,出现了一群强盗.如果两个强盗遇上了,那么他们要么是朋友,要么是敌人.而且有一点是肯定的,就是: 我朋友的朋友是我的朋友: 我敌人的敌人也是我的朋友. 两个强盗是同一团伙的 ...

  7. zoj-3433-Gu Jian Qi Tan

    /* Gu Jian Qi Tan -------------------------------------------------------------------------------- T ...

  8. Julia - 字符串

    字符 字符使用单引号括起来,字符是 32 位整数 julia> 'a' 'a': ASCII/Unicode U+0061 (category Ll: Letter, lowercase) ju ...

  9. PHP中composer的安装和使用

    $ composer ______ / ____/___  ____ ___  ____  ____  ________  _____ / /   / __ \/ __ `__ \/ __ \/ __ ...

  10. question?