Moving or Copying VirtActions

In ReadyAPI, you can move or copy your VirtActions between projects and virtual services. This process allows you to quickly duplicate endpoints and VirtActions in one step. This functionality helps eliminate repetitive setup tasks and maintains consistent configurations across projects.

Steps to Move or Copy a VirtAction:

  1. Open the Virtual Service Editor.

    In the Navigator panel, select the virtual service containing the VirtAction you want to move or copy.

    Selecting Virtual Service
  2. Select the VirtAction.

    In the virtual service editor, select the VirtAction that you want to move or copy, and then click the Move or Copy VirtActions button.

    Moving or Copying VirtActions
  3. Choose the Move or Copy Action.

    In the subsequent Move or Merge Selected VirtActions dialog, use the Method dropdown to select one of the following options:

    • Move to: To transfer the VirtAction to another project or virtual service.

    • Copy to: To create a copy of the VirtAction in a different project or virtual service.

    Move to or Copy to Selection
  4. Select the Target Project and Virtual Service.

    Click Select project to specify the target project.

    Selecting Project

    From the Move to or Copy to dropdown (depending on the selected action), choose the target virtual service.

    Note

    Only virtual services using the same protocol are displayed in the list. For example, if you are working with a REST virtual service, SOAP virtual services will not appear.

  5. Confirm and Complete the Action.

    After selecting the target project and virtual service, click OK to finalize the move or copy action.

    Note

    When moving or copying VirtActions, their signatures and matches are also transferred.

    The VirtAction will now appear in the selected project or virtual service.

Merging Virtual Services

As of ReadyAPI version 3.57.0, you can merge two virtual services during the move or copy operation.

Merging involves additional validations when a Conditional Match is detected as a dispatch strategy. Here's how it works:

  • Source Virt: The virtual service from which items are moved or copied.

  • Target Virt: The virtual service to which items are moved or copied.

  • Conditional Match Validation: Ensures there are no duplicate matches, responses, or signatures in the target virtual service. For more details, see Duplicates → Conditional Match.

Steps for Merging Virtual Services
  1. Go to the Virtual API , which contains the virtual actions to move or copy.

  2. Select one or more virtual actions and click the Move or Copy VirtActions button.

    RAPI-screenshot-select-move-copy-virtactions.png
  3. Adjust the operation settings:

    • Method: Select either Move to or Copy to, as described in the previous steps.

    • Target Project: Specify the project, defaulting to the origin project of the Source Virt.

    • Target Virt: Select the target Virtual API.

    RAPI-screenshot-adjust-operation-settings-virtactions.png
  4. Click OK to proceed.

  5. Resolve Conflicts: If ReadyAPI detects duplicates in the Source and Target virtual services, a prompt will appear to help you resolve the conflict.

Handling Duplicates

If Virtual Action duplicates are detected during the copying/moving process, an additional window will pop up asking you to choose whether to keep or overwrite them.

Conditional Match

If a Conditional Match is detected as a dispatch strategy for one of the Virtual Actions, an additional duplicate check will be performed on matches, responses, and signatures. Users can choose to keep the items from the Target Virt or overwrite them with the duplicate items from the Source Virt.

Change Log

After the move or copy action is performed on a Conditional Match-enabled Virtual Action, users will be able to view a complete log of changes made. You can save it to a file on your local machine starting with ReadyAPI 3.59.0.

See Also

Configuring Virtual Services

Publication date: