Running ReadyAPI and SoapUI Tests

Applies to TestComplete 15.45, last modified on December 01, 2022

In TestComplete, you can run functional and security API tests created with ReadyAPI or SoapUI testing tools.

This topic explains how to add an API test to your TestComplete project and run it.

Prerequisites

  • In ReadyAPI or SoapUI, create your API tests. Copy your ReadyAPI or SoapUI test project to your test computer.

  • Make sure that both the computer where you will run the tests and TestComplete meet the requirements described in the Requirements topic.

  • In the TestComplete ReadyAPI Options dialog, specify the path to the folder where ReadyAPI or SoapUI testing tools are installed.

1. Add Your API Test to a TestComplete Project

  1. Open your TestComplete project or create a new one.

  2. Add the ReadyAPI or SoapUI collection to the project:

    1. Right-click the project in the Project Explorer and then click Add > New Item.

    2. In the resulting dialog, select the ReadyAPI or SoapUI item and click OK.

    Adding ReadyAPI or SoapUI item to a project

    Click the image to enlarge it.

  3. Depending on the API test you are going to run, add either the SoapUI item or the Secure Test item to the collection:

    1. Right-click the added collection in the Project Explorer and then click Add > New Item.

    2. In the resulting dialog, select the appropriate item and click OK.

    Adding API tests to a project

    Click the image to enlarge it.

2. Configure the API Test

Double-click the added test item to open it in the ReadyAPI Test editor and configure the item to run the needed test:

  1. Specify a ReadyAPI or SoapUI project (.xml) or a composite project to run.

    Editing SoapUI test properties

    Click the image to enlarge it.

  2. If needed, select a test suite, test case or a security test to run.

  3. Specify other test parameters, if needed.

For a description of the test parameters you can configure in the editors, see ReadyAPI Test Editor.

3. Run the Test Item

To run the test from the TestComplete IDE

Open the needed tests in the ReadyAPI Test editor and click Run Test on the editor’s toolbar.

Running SoapUI tests from the editor

Click the image to enlarge it.

– or –

Right-click the needed test in the Project Explorer and then click Run Test_Name.

Running SoapUI tests from TestComplete UI

Click the image to enlarge it.

To run the test from script

Call the ReadyAPIorSoapUICollection_Name.Test_Name.Execute method:

JavaScript, JScript

ReadyAPI1.Test1.Execute();

Python

ReadyAPI1.Test1.Execute();

VBScript

Call ReadyAPI1.Test1.Execute

DelphiScript

ReadyAPI1.Test1.Execute;

C#Script

ReadyAPI1["Test1"]["Execute"]();

In the example, ReadyAPI1 is the name of the ReadyAPI or SoapUI collection to which the Test1 test belongs.

To run the test from a keyword test

Use the Run Test operation to execute your API test:

Running ReadyAPI tests from keyword tests

Click the image to enlarge it.

To run the test as the project's test item
  1. Right-click your project in the Project Explorer and then click Edit > Execution Plan. This will open the Execution Plan editor of the project.

  2. Drag the needed API test to the Execution Plan editor.

  3. Save the changes.

Running SoapUI tests from the execution plan

Click the image to enlarge it.

When you run the project, TestComplete will run the API test.

To run the test from another project

The easiest way to run the API test created in another project is to add an existing API test to your project, and then run it. Adding an existing API test does not create a copy of this test, it just adds a test reference to the project.

To add an existing API test to your project, do the following:

  1. Add the ReadyAPI or SoapUI collection to the project. See Adding and Removing Project Items and Their Child Elements.

  2. Right-click the ReadyAPI or SoapUI project item and choose Add | Existing Item from the context menu.

  3. In the displayed standard Open File dialog, specify the API test file.

Now, TestComplete will add the API test to your project, and you can run this test as described above.

Viewing Test Results

After the test run is over, you can view the results of your API test. For information on ReadyAPI and SoapUI test results, see ReadyAPI Test Logs.

See Also

Integration With ReadyAPI and SoapUI
Execute Method
Tests, Test Items, and Test Cases

Highlight search results