Applies to ReadyAPI 3.0, last modified on November 12, 2019

This topic explains how you run a virtual API (virtual service) on the computer, where ReadyAPI is installed. For information on running virtual services on some other machine, for instance, on a server, see Running Virtual Services on Remote Computers.

You can start a virtual service from various places in the ReadyAPI user interface.

Virtual Service Editor

  1. Select your virtual service in the Navigator panel to open the service for editing.

  2. Click on the toolbar to run the virtual service:

    Service virtualization and API testing: Running virtual service from the service editor

    Click the image to enlarge it.

ServiceV Project Page

ReadyAPI displays virtual services on the project page in ServiceV. You can run a service from this page:

Service virtualization and API testing: Running virtual service from the ServiceV editor

Click the image to enlarge it.

Dashboard

You can run a virtual service from the Virtual APIs in the Dashboard (if you do not have this tile on the Dashboard, you can add it any time):

Service virtualization and API testing: Running virtual service from the Dashbaord

Click the image to enlarge it.

Virtual Service Main Menu

  1. Select a virtual service in the Navigator.

  2. On the main menu, select Virtual Service > Start:

    Service virtualization and API testing: Running virtual service from the main menu

    Click the image to enlarge it.

Running From Test Cases

It may be convenient to run a virtual service from SoapUI functional tests. To do this, you add the Virtual Service Runner test step. Put this step to the beginning of your test case to run the virtual service before the test sends any request to it. See About Automating Virtual Service Runs for details.

Running From the Command Line

To run a virtual service from the command line, you use the VirtRunner.bat/.sh file. See VirtRunner Command Line for information on using it.

Stopping Virtual Services

After you started a virtual service, the button is replaced with . Click it to stop the service.

The Virtual Service Runner step can also be used for stopping virtual services. To do this, simply place the test step to the end of your test case and configure the step properties to stop the virtual service.

Running Multiple Virtual Services

You can run multiple virtual services from the ReadyAPI UI if these services do not use request routing. If you have a virtual service that routes requests to some real API, you can run only one service at a time from ReadyAPI. To run multiple virtual services that use request routing, install VirtServer on your machine or on a remote computer and run these services on VirtServer.

See Also

Running Virtual Services
VirtRunner Command Line

Highlight search results