The ways you add virtual requests to a virtual API are different for REST, SOAP, JMS and JDBC virtual services.
Select your virtual service in the Navigator panel to open the virtual service editor.
In the virtual service editor, click one of the following commands:
This will invoke the dialog, where you can specify properties of the new request. For detailed information, see topics of the Virtual Service Specifics section.
If you have an OpenAPI, Swagger, WADL or WSDL specification added to your ReadyAPI project, you can automatically create virtual requests for the operations defined in that specification:
In the Navigator panel on the left, right-click your service and select Generate Virtual Service from the context menu.
In the subsequent dialog:
Select the operations you would like to add to your service.
Select Add to existing virtual service and then choose your service in the Virtual Service drop-down list:
Cloning helps you quickly create a new operation using an existing operation as a base. To clone an operation:
Find the desired “base” operation in the virtual service editor, and click Duplicate VirtAction:
The new operation will be added at the end of the operation list.
Select the operation name in the list, and in the editor on the right, change the resource path:
If you keep the resource path, this will mean you have two virtual operations for the same resource (for the same page). Your virtual service will use only one operation – the operation it will find earlier in the list.
To add requests based on a real API operation, you need to configure your virtual service to use recording and to record non-virted operations. For complete information, see Add Recorded Operations to Virtual Service.