Applies to ReadyAPI 2.2, last modified on November 17, 2017

To create a new virtual service (virt):

  1. Select File > New > Virtual API from the main menu:

    Service virtualization and API testing: Creating a new virtual service

    – or –

    In the Dashboard New Test tile, select All Tests and click Virtual API:

    Service virtualization and API testing: Creating a new virtual service
    Note: The New Test tile you see on your screen may differ from the description above because the tile content depends on the ReadyAPI license you have. For details, see the tile description.
  2. 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:

    Service virtualization and API testing: Creating a new virtual service

    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.

  3. 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 ( / ):

    Service virtualization and API testing: Defining a new operation

    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.

  4. 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:

    Service virtualization and API testing: Selecting a project for the new Virt
  5. ReadyAPI will create a new project and add the virt to it. Then, it will ask you about further actions:

    Service virtualization and API testing: 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:

    Service virtualization and API testing: Virt editor

    Click the image to enlarge it.

On the next step of this tutorial, we will configure the virt functionality and define response contents.

Prev          Next

See Also

Creating Your First Virtual Service