ReadyAPI Test Testing With Maven - Example

Applies to ReadyAPI 3.8, last modified on May 05, 2021

This example demonstrates how to use a sample pom.xml file that is shipped with ReadyAPI to run the Sample-SOAP-project.xml project.

  1. Create a new pom.xml file and copy the sample code to it.

    Make sure to enter the same version as the ReadyAPI version you have.

  2. Copy the Sample-SOAP-project.xml project file from the ReadyAPI installation directory to the folder where the pom.xml file is located.

  3. Run the Maven build by using the mvn test command.

To enter more test properties, remove comments on elements you do not use or add parameters from Maven Plugin Configuration Reference.

If you already have a pom.xml file, copy the elements to it to include a test in the build.

<project xmlns="" xmlns:xsi=""

   <!-- Add the SmartBear ReadyAPI plugin repository. -->
   <!-- Maven will download the plugin from the specified URL. -->


            <!-- Plugin groupID used to uniquely identify the project with the plugin. -->

            <!-- Plugin artifactId used to find the plugin in the project. -->

            <!-- Specifies your ReadyAPI version. Maven will use the appropriate plugin version. -->
            <!-- IMPORTANT: Must be the same as your ReadyAPI version. -->

            <!-- Add a JDBC driver dependency if your tests use JDBC. -->
            <!-- Maven imports and installs the driver automatically. -->
            <!-- <dependencies>
            </dependencies> -->


                  <!-- Specifies the lifecycle phase to run ReadyAPI tests. -->
                  <!-- We recommend using the test phase. -->
                     <!-- Do not change. Commands the Maven plugin to run a functional test. -->


                     <!-- Required. Specifies the path to the project to execute. -->
                     <!-- For composite projects, specify the folder that contains the project. -->

                     <!-- Required for reports. -->
                     <!-- Only available in ReadyAPI Pro. -->

                     <!-- Sets the output folder for reports. -->

                     <!-- Specifies the format of the report. Possible values: PDF, XLS, HTML, RTF, CSV, TXT and XML. -->

                     <!-- Specifies the folder to store reports in. -->

                     <!-- Specifies the report type. Only available in ReadyAPI Pro. -->
                     <!-- Click Reporting on the ReadyAPI toolbar to find available reports. -->
                     <reportName>Project Report</reportName>

                     <!-- Commands Maven to create a printed report. -->

                     <!-- Provides access to ReadyAPI properties. -->

                           <!-- Required. A folder with ReadyAPI executable files. -->
                           <!-- Used to run a local installation of ReadyAPI. -->
                           <value>C:/Program Files/SmartBear/ReadyAPI-3.8.0/bin</value>

                        <!-- <property> -->
                           <!-- Optional. Controls whether the test runs launched from Maven are saved to the test history database. By default, the property is not specified, and the history is not saved. -->
                           <!-- If it is set to false, the results will be saved. -->
                           <!-- <name>test.history.disabled</name> -->
                           <!-- <value>false</value> -->
                        <!-- </property> -->

                     <!-- ========= Additional elements ============= -->

                     <!-- Commands ReadyAPI to generate JUnit-style reports. -->

                     <!-- Specifies the name of the test suite to be run. -->
                     <!-- <testSuite></testSuite> -->

                     <!-- Specifies the name of the test case to run. -->
                     <!-- <testCase></testCase> -->

                     <!-- Specifies the tags of the test cases to be run. -->
                     <!-- Use the '&amp;&amp;', '||', and '!' operators to apply the AND, OR and NOT conditions to tags respectively, or list tags separated by commas to apply the AND condition. To change the order of operations, use parentheses. -->
                     <!-- <tags><param>TestCase tag1 &amp;&amp; (tag2 || tag3) !tag4</param></tags> -->

                     <!-- Overrides the service endpoints specified in the test. -->
                     <!-- <endpoint></endpoint> -->

                     <!-- Overrides the host specified in the the test. -->
                     <!-- <host></host> -->

                     <!-- Overrides the user name for all requests. -->
                     <!-- <username></username> -->

                     <!-- Overrides the passwords for all requests. -->
                     <!-- <password></password> -->

                     <!-- Overrides the domain used for requests. -->
                     <!-- <domain></domain> -->

                     <!-- If true, commands Maven to export all the requests. -->
                     <!-- <exportAll></exportAll> -->

                     <!-- Specifies the SoapUI settings file to use. Required for custom ReadyAPI reports. -->
                     <!-- <settingsFile></settingsFile> -->

                     <!-- Specifies the type of the WSS password. -->
                     <!-- <wssPasswordType></wssPasswordType> -->

                     <!-- Specifies the password for an encrypted project. -->
                     <!-- <projectPassword></projectPassword > -->

                     <!-- Specifies the password for an encrypted settings file. -->
                     <!-- <settingsPassword></settingsPassword> -->

                     <!-- Specifies the value of a global property for the test run. -->
                     <!-- <globalProperties>
                        <value>Sample Project Property=My sample value</value>
                     </globalProperties> -->

                     <!-- Specifies the value of a project property for the test run. -->
                     <!-- <projectProperties>
                        <value>Some Property=My Sample Value</value>
                     </projectProperties> -->

                     <!-- Saves the project after the test run. -->
                     <!-- <saveAfterRun></saveAfterRun> -->

                     <!-- If true, commands Maven to continue -->
                     <!-- the test run even if an assertion triggers. -->
                     <!-- <testFailIgnore>true</testFailIgnore> -->

                     <!-- Enables HTML coverage reports. Only available in ReadyAPI Pro. -->
                     <!-- <coverage></coverage> -->

                     <!-- Specifies the environment to use in the test run. -->
                     <!-- Only available in ReadyAPI Pro. -->
                     <!-- <environment></environment> -->

                     <!-- If true, ReadyAPI will not send usage statistics. -->
                     <!-- <optOutUsageStatistics></optOutUsageStatistics> -->

                     <!-- ========= /Additional elements ============= -->





See Also

Maven Plugin Configuration Reference
Headless Machines

Highlight search results