3. Running and Testing Virtual Service

Applies to VirtServer 3.19.0, last modified on March 28, 2024

1. Running the Virtual Service

After you deploy your virtual service to VirtServer and configure it there, you can run it. To run your service, simply click its Run button:

API testing with ReadyAPI: Running a virtual service on VirtServer

VirtServer will run your virtual service on the port you specified for it.

Tip: You can also start your virtual services from your browser by using the VirtServer Web Interface.

2. Testing the Virtual Service

After you run the virtual service, you can send test requests to it from your ReadyAPI test project in the same way you do this with any other API.

Tip

When creating tests for a virtual service, you may not know the port it will use on VirtServer. If you hard-code the port number in your tests, you will need to change it after the service is deployed to VirtServer. As a workaround, you can create a project-level or test-suite-level property that will store the virtual service address and port values and specify this variable as the Endpoint property of your test requests. If the port number changes, you will need to modify the project-level (or test-suite-level) property, rather than update the Endpoint properties in all the requests:

API testing with ReadyAPI: Setting endpoint

Click the image to enlarge it.

Prev     Next

See Also

VirtServer Tutorial

Highlight search results