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.
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
Open your TestComplete project or create a new one.
Add the ReadyAPI or SoapUI collection to the project:
Right-click the project in the Project Explorer and then click Add > New Item.
In the resulting dialog, select the ReadyAPI or SoapUI item and click OK.
Depending on the API test you are going to run, add either the SoapUI item or the Secure Test item to the collection:
Right-click the added collection in the Project Explorer and then click Add > New Item.
In the resulting dialog, select the appropriate item and click OK.
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:
Specify a ReadyAPI or SoapUI project (.xml) or a composite project to run.
If needed, select a test suite, test case or a security test to run.
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.
– or –
Right-click the needed test in the Project Explorer and then click Run Test_Name.
To run the test from script
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:
To run the test as the project's test item
Right-click your project in the Project Explorer and then click Edit > Execution Plan. This will open the Execution Plan editor of the project.
Drag the needed API test to the Execution Plan editor.
Save the changes.
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:
Add the ReadyAPI or SoapUI collection to the project. See Adding and Removing Project Items and Their Child Elements.
Right-click the ReadyAPI or SoapUI project item and choose Add | Existing Item from the context menu.
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.
Integration With ReadyAPI and SoapUI
Tests, Test Items, and Test Cases