Generating SoapUI tests with REST discovery (Pro)

In this recipe, we take a look at how to generate tests for RESTful web services that already exist. The pro version of SoapUI has the REST discovery functionality to allow interactions with a RESTful API to be recorded and used to generate tests.

Getting ready

To provide an example of a RESTful web service, I have extended the previous recipe's invoice service to have full CRUD functionality. The interface now looks like this:

Resource: http://localhost:9000/invoiceservice/v1/invoice 
Supported Methods:
POST   invoice      - Create Invoice. 
GET    invoice/{id} – Get (Read) Invoice.
PUT    invoice/{id} – Update Invoice.
DELETE invoice/{id} – Delete Invoice.

The invoice document is as follows:

{"Invoice": { "id": ...

Get SoapUI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.