To create a new virtual service (virt):
Select File > New > Virtual API from the main menu:
In the subsequent New Virtual API dialog, you select the way in which you will create operations in your virt. Click Start under REST Resources. This means we will create the operations manually:
If you have an OpenAPI, Swagger, WADL or WSDL specification of your API, you may click Description File. In this case, ServiceV will create operations based on the information it loads from the specification. You may also select Record Traffic and send requests to your live API in the subsequent window. ReadyAPI will record the traffic and create operations in the virt based on the recorded requests and responses. See Recording Virts (Discovering) for more information.
In the following dialog, you can specify the operations to virtualize. Leave the GET operation type that is selected in the drop-down list by default, and enter /login in the edit box. Make sure you start the operation name with a slash (
Do not enter query parameters (they follow the question mark (
?) in the URL path). The operation paths should not contain these parameters.
You can add more operations any time later in the virt editor (see Creating Requests (Operations)). Click Next to continue.
At this stage, you can select the project to which the new virt will be added. Leave the <New Project> item selected in the drop-down list by default and click Finish:
ReadyAPI will create a new project and add the virt to it. Then, it will ask you about further actions:
Let’s edit the virt before running it, because the operation we created does not return any response. Click Modify Virt.
ReadyAPI will open the virt editor:
On the next step of this tutorial, we will configure the virt functionality and define response contents.