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:
-
Open the Virtual Service Editor
In the Navigator panel, select the virtual service containing the VirtAction you want to move or copy.
-
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.
-
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.
-
Select the Target Project and Virtual Service
Click Select project to specify the target 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. -
Confirm and Complete the Action
After selecting the target project and virtual service, click OK to finalize the move or copy action.
The VirtAction will now appear in the selected project or virtual service.
Note: When moving or copying VirtActions, their signatures and matches are also transferred.
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 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
-
Go to the Virtual API containing the virtual actions to move or copy.
-
Select one or more virtual actions and click the Move or Copy VirtActions button.
-
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.
-
-
Click OK to proceed.
-
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 there are Virtual Action duplicates detected during the copying/moving process, an additional window will pop up asking you to choose whether the duplicates should be kept or overwritten.
Conditional Match
If 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.