Edit Deployed Virtual Services

Applies to VirtServer 3.23.0, last modified on November 18, 2024

After you deploy a virtual service (virtual API) to VirtServer, you may need to modify the virtual service functionality. On VirtServer, you can modify the port your service uses. Deeper changes to your service functionality, for example, adding a new operation, require that you have the virtual service on your computer.

Requirements

Editing steps

1. (Optional) Download the virtual service from VirtServer to your computer

For information on when you need to download the Vert and when you can skip downloading, see below.
  1. In ReadyAPI, select the APIs (Virtual) node in the Navigator panel and connect to your VirtServer (see Connect With ReadyAPI).

  2. In the VirtServer section of the APIs (Virtual) editor, right-click your virtual service and select Download from the context menu. See also Virtual Services Page in ReadyAPI.

  3. If you have the virtual service on your computer, ReadyAPI will ask you whether you want to replace the existing virtual service with the downloaded copy:

    API testing with ReadyAPI: The dialog that appears when downloading virtual service from VirtServer to your computer

    You have the following options:

    Option Description

    Create a new project

    Keeps the local virtual service. Creates a new project and copies the service along with the data files it uses from VirtServer to your computer.

    Since the virtual service is placed in the new project, ReadyAPI sees it as a new service. If you deploy this service to VirtServer, it will not replace the existing service there, it will create a β€œnew” service on VirtServer.

    Replace old virtual service

    Replaces the exiting local virtual service with the service from VirtServer.

    Abort operation

    Cancels the download.

2. Edit the virtual service

When the virtual service is on your computer, click the service in the Local Virtual Services section of the APIs (Virtual) editor and modify its properties on the left.

You can also right-click the service and select Show Virtual Service Editor from the context menu. To switch to the virtual service editor, you can also simply select your service in the project tree on the left.

3. Upload the virtual service back to VirtServer

After you update the virtual service, you can upload it back to VirtServer. To do this:

  • In ReadyAPI, select the desired VirtServer, and

  • Drag the service from the Local Virtual Services section.

See also Virtual Services Page in ReadyAPI.

When the download is needed

You need to download the virtual service to your computer if –

  • You do not have the virtual service on your machine, or

  • The deployed service was changed on VirtServer by somebody. In this case, if you download the service, you can be sure that you will not override the changes made by others.

You can skip downloading the virtual service if –

  • You have the virtual service on your computer, and

  • You are sure that nobody has changed the virtual service on VirtServer after you deployed it there.

Recommendation on sharing virtual services

If you are going to work on the functionality of your virtual service along with your co-workers, we do not recommend using VirtServer as a place for sharing the virtual service. Use a source control system instead.

Virtual service settings are stored as part of a ReadyAPI project. So, you can put your ReadyAPI project to a source control repository and work with the project in the same way you work with other files placed in source control repositories.

See Also

Virtual Services Page in ReadyAPI
User Tasks

Highlight search results