Get Started with Functional API Testing

NOTE: This page contains information on SoapUI Pro, part of the ReadyAPI suite of applications.
To try enhanced functional testing, with data-driven capabilities, download a trial of SoapUI Pro.

Why use SoapUI Pro for Functional Testing?

While the Open Source version can be seen as the Swiss Army knife for testing, SoapUI Pro is the tool with the sharpest edge. Applied to the functional testing area, SoapUI Pro focus on enhancing efficiency and usability. With Point and Click Testing, you can drag and drop instead of manually writing the code. The Form Editor creates a form from your request, further eliminating the need for you to spend time on repetitive coding. These functions make, in combination with the Outline Editor who simplifies and exposes the XML structure, your testing more fun and less time consuming. If creativity, flow and speed are important to you as a tester, SoapUI Pro is too.

Get Started with Functional Testing | Download SoapUI Pro

Watch the video tutorial:

The step-by-step guide:

1. Create a test from a request in your WSDL

Click on the plus sign next to the  in the navigator to expand the web service in the project tree and select the request:

Web Services in the navigator

In SoapUI Pro, the request editor comes up to the right. SoapUI Pro has an Outline Editor that simplifies the hierarchical structure of the XML, both in requests and responses, and at the same time is customizable.

SoapUI Pro

Learn more about The Form Editor and The Outline Editor.


If you are using SoapUI Open Source, you have to enter your data manually in the code editor as shown below. To benefit fully from this tutorial you should use the Pro version. You can download the Pro Trial version for free here, giving you 2 weeks access.

Open source view of SoapUI

2. In the request editor, select Add This Request to TestCase. SoapUI Pro takes the definition of the request and makes a form for you to enter information in. This may be especially useful when doing manual testing or if you want non-technical staff to enter a request.

Add This Request to TestCase


3. Adding a request to a test case will open the Create TestSuite dialog box. Enter a name for your test suite and click OK.


Create TestSuite


4. After clicking OK, you will be asked to create a test case. In the Create TestCase dialog, enter a name for your test case and click OK.


Create TestCase


5. Next, the dialog box Add Request to TestCase will appear. Click OK.


Add Request to TestCase


6. SoapUI will now generate a test suite and test case for you while the request will be added as a test request. Below is a copy of the request that appears in the interface. A test case editor will also open with your new test request.




The next step is to validate the response in your test by adding an assertion.


2. Add an Assertion to the test

Now that we've created and run our first test, we are going to add a validation of the response. In SoapUI, this is called adding an assertion. SoapUI Pro contains several functions that enhances automation for those who spends their days (and nights) testing and are in need of extensive assertions.

Examples of assertions that is possible in SoapUI are:

  • Schema Compliance
  • Simple Contains
  • Simple Not Contains
  • SOAP Fault
  • Not SOAP Fault
  • SOAP Response
  • Response SLA
  • XPath Match
  • XQuery Match
  • Script Assertion
  • WS-Security Status
  • WS-Addressing Response Assertion
  • WS-Addressing Request Assertion


1. Close all windows you have open in soupUI before starting. Double Click on your Test Request as shown below. This will open the request editor.



2. In the request editor, Click the Add an Assertion to Test Request button.


Test Request

3. Select Response SLA from the drop down in the Select Assertion dialog box.

Add an assertion to test request


4. In the Configure Response SLA Assertion dialog box, write 500 and click OK. This will validate that the response of the SLA is under 500 (This is measured in milliseconds, 500 should be half of a second).


Select assertion


5. Now that you've added the assertion, you are going to run the request to validate the response. If all assertions are successful, the SOAP icon should turn green in three places as shown below.


How Many Assertions


Tip: You can see how many assertions you have in a test by looking at the assertions tab. The number of assertions is written on the tab "Assertions (2)".


6. You can also validate the response by adding an XPath Match assertion.

Select assertion - XPath Match


7. In SoapUI Pro you can open the Select XPath dialog, which let's you select nodes to assert using point-and-click. As a result SoapUI creates the matching XPath expression that refers to the selected node.


XPath Match - Select XPath Pro

Select XPath - Chosen Node

8. SoapUI Pro automatically populates the expected result to match what's in the response. But of course, you can change this to what's relevant for you.

XPath Match Expected Results

Learn more about Point and Click Testing.


9. Now let's try and enter the FromCurrency SEK (for Swedish KRone) and ToCurrency USD (for US Dollars) as a request, and execute the test


Search for SE

10. You will now see that all assertion are "VALID".


Now that you know what an assertion is and how you add one to the test, it is time for the final exam of this guide - to run the actual test.


3. Run a test

There are several different places in SoapUI where you can run the test. You can do it on a TestStep level, which is what we have done in this guide.

You can also try running the TestCase from the TestCase Editor…

TestCase Editor


…or from the TestSuite Editor.


TestSuite Editor