REST API Sample Project in SoapUI

User rating:
2.3 (82 ratings)

An example of REST API Testing with SoapUI

Step1: Open MockService

1. Double click on MockService:

Start MockService


2. Click Run Mock Service to start the mockservice.

You will see mockservice "running on port 8080".

Running on port 8080



Configure MockService using MockService Option

Step2: REST Request TestCase

1. Expand the "Test account creation" and the nodes below until you reach View Forum. Double click it and you will see REST Request TestCase Viewer open:

Open Request

2. Click Submit request to send a request. You will see REST Test Response on the right.

REST Test Response


REST Request and Response View.

3. You can change the view of your request and response by clicking on figure13a_icon and figure13a_icon9.

Change layout

figure13a_icon - toggle to tab based layout

figure13a_icon9 - changes the orientation to request pane split

Step3: Adding Assertion

1. Click Assertions to open the assertions tab:

Open Assertion tab

2. Click Add to add a new assertion:

Adding a New assertion

3. Select the Contains assertion in the Add Assertion dialog:

Select the Contains assertion

4. Enter the content that the response message must contain:

Configure Contains assertion

5. You may run the test step by clicking Submit REST Request:

Passed Contains assertion