Applies to ReadyAPI 2.8, last modified on October 18, 2019

TeamCity is a build management service based on Java. It supports a number of convenient features, such as code inspection, running multiple builds, integration with various IDEs, and so on.

To learn more about TeamCity, please visit its official website:

https://www.jetbrains.com/teamcity/

This topic explains how you can integrate ReadyAPI SoapUI with TeamCity and run your API functional tests from TeamCity builds.

About

To integrate ReadyAPI SoapUI with TeamCity, you need to install the SoapUI Pro Functional Testing plugin provided by SmartBear into TeamCity. It uses the SoapUI TestRunner to execute tests remotely, and enables you to call this runner from TeamCity builds. The runner generates JUnit-style HTML reports, which you can use to analyze results of the run.

You can download the plugin from the official TeamCity plugin repository:

https://plugins.jetbrains.com/teamcity

The plugin is shipped as a ZIP package that can be installed directly in TeamCity via the web interface. See below for details.

Requirements

Before using the plugin, make sure the following requirements are met:

  • The project you want to run remotely must be saved in ReadyAPI version 2.1.0 or later.

  • The TeamCity agent you want to use for test runs must have ReadyAPI installed with an active SoapUI Pro license.

Install the plugin

To install the plugin on your TeamCity server:

  1. Open the SoapUI Pro Functional Testing plugin page in your preferred browser.

  2. Download the plugin .zip package.

  3. Open the web interface of the TeamCity server.

  4. Log in using the administrator account.

  5. Once logged in, click Administration:

    TeamCity: The Administration button

    Click the image to enlarge it.

  6. On the Administration page, click Plugins List in the Server Administration section on the left:

    TeamCity: The Administration screen

    Click the image to enlarge it.

  7. The server will redirect you to the Plugins List page. Click Upload plugin zip:

    TeamCity: The Plugins List screen

    Click the image to enlarge it.

  8. In the subsequent dialog, click Choose File and navigate to the plugin .zip file you have downloaded:

    TeamCity: The Upload plugin zip dialog

    Click the image to enlarge it.

  9. Click Upload plugin zip.

    The server will import the zip file and install it. A record about the newly installed plugin will appear on the Plugins List page:

    TeamCity: The installed SoapUI plugin

    Click the image to enlarge it.

  10. Restart the TeamCity server in order for the changes to take effect.

Configure the test run

1. Create a TeamCity build

To run your SoapUI test via TeamCity, you need at least 1 TeamCity project and 1 build. To learn how to create them, see the TeamCity documentation:

https://confluence.jetbrains.com/display/TCD18/Setting+up+and+Running+Additional+Build+Agents

2. Add the SoapUI test runner to your build

  1. Open the web interface of the TeamCity server.

  2. Log in using the administrator account.

  3. Once logged in, click Administration:

    TeamCity: The Administration button

    Click the image to enlarge it.

  4. The Projects section of the Administration page will open. If you don't see it, click Projects in the Project-related Settings section on the left:

    TeamCity: The Project screen

    Click the image to enlarge it.

  5. Expand your project, then click the name of the needed build:

    TeamCity: The Projects screen with the project expanded

    Click the image to enlarge it.

  6. On the edit form of the build, switch to the Build Steps tab:

    TeamCity: The Build Steps tab link

    Click the image to enlarge it.

  7. Click Add build step:

    TeamCity: The Add build step button

    Click the image to enlarge it.

  8. On the subsequent page, select SoapUI Pro: Run Functional Test in the Runner Type drop-down list.

  9. The options that will appear allow you to configure your run:

    TeamCity: The New Build Step form

    Click the image to enlarge it.

    Option Description
    Step name Optional. The step name used in TeamCity.
    Path to testrunner The path (fully-qualified name) to the folder where the SoapUI test runner is located (that is, testrunner.bat on Windows or testrunner.sh on Linux or macOS).
    Example: C:\Program Files\SmartBear\ReadyAPI-2.5.0\bin
    Path to SoapUI Pro Project The path to the ReadyAPI project file (XML) or to the folder where the ReadyAPI composite project is located.
    Examples:
    D:\projects\swagger-single.xml
    D:\projects\composite-project
    Test Suite The name of the test suite you want to run. Leave it blank to run all the test cases of the project.
    Test Case The name of the test case you want to run. Leave it blank to run all the test cases of the specified test suite, or, if Test Suite is blank as well, all the test cases of the project.
    Project Password The encryption key the user must use to access the project if the project or some of its custom properties are encrypted.
    Environment The ReadyAPI environment you want to use during the test run.

    Additionally, you can click Show Advanced options in the Execute Step drop-down list to modify the execution rule:

    TeamCity: The Execute Step drop-down list

    Click the image to enlarge it.

  10. Click Save.

Now, you can run your SoapUI test using the TeamCity web interface.

Run builds

When the plugin is installed and the build is configured, you can use the TeamCity web interface to remotely run SoapUI functional tests. To do that:

  1. In the TeamCity web interface, go to Projects.

  2. Find your project and build.

  3. Click Run next to your build:

    TeamCity: The Run button

    Click the image to enlarge it.

TeamCity will perform a test run. During the test run, you can check how it is going on the Agents screen.

After the test run is over, its result will appear on the Projects screen.

TeamCity: The finished run

Click the image to enlarge it.

You can click it to get information on the test run:

TeamCity: The run overview

Click the image to enlarge it.

View results

The SoapUI plugin for TeamCity automatically generates a report for each test run. You can find it in the TeamCity data directory, which you specify during the TeamCity installation. For example:

C:\TeamCity\buildAgent\work\4f750434e10a8680\ReadyAPI_report

To view the report, click index.html in the folder. This will open the report in your preferred browser.

If the plugin generates a report from an agent, it always replaces the existing report generated from that agent. Currently, there is no way to generate multiple reports from an agent in the folder.

The reports are similar to in-product JUnit-style HTML reports.

See Also

TeamCity – Official Website
JUnit-Style HTML Reports For Automation
Integrations

Highlight search results