The REST Discovery feature allows you to capture REST traffic by simply using the service through a browser or client.
After recording, you can view the traffic log and filter it for traffic type according to your needs. You can also manually select groups of requests or single instances as needed.
After you have filtered and selected relevant traffic, they can be converted into services for use in your project.
Optionally, you can immediately create TestSuites containing TestCases with the services for further use.
The services can be used to create mock services as needed.
REST Discovery can be done either through the SoapUI internal browser, or through an external client, provided that the client is set to use SoapUI as proxy.
Discover Using Internal Browser
When using the internal browser, REST Discovery is done simply by turning on the recorder, selecting an URI and then browsing to the resources as needed. When all needed resources have been visited, turn off recording and you are done.
The proxy allows SoapUI to act as a standard proxy forwarding messages back and forth between the client to the specified host.
The proxy does not need to be started explicitly, it runs immediately when you open the window.
The port for the proxy is configurable and changes apply in real time.
Discover Using Client
Alternatively to using the internal browser in SoapUI, a client can be used. This can be a client on the same network (for example a mobile device on wi-fi, or a client on a different computer). Alternatively, a client on the same computer can be used (client application or browser).
In either case, the client must be configured to use SoapUI as a proxy. Exactly how this is done depends on the client environment.
REST Discovery Request Selection
Recorded traffic is displayed in SoapUI as a structure containing the requests, where you can review them.
The requests can be selected manually but checking them. It is also possible to filter out only the content types you are interested in.
When you have selected the requests you are interested in, they can be used to automatically create services in the project.
When generating services in the project from the captured requests, you can choose to immediately create a TestSuite with a TestCase containing the requests.
The services created can also be associated with previously created TestSuites in the project.
It is possible to combine SOAP requests and REST requests in the same project.
Note: Capture of SOAP requests through the REST Discovery feature is currently not supported. If you need this, use the HTTP Recording feature instead.