We’ve got something new in useMango – Cloning of Components across projects – a thoughtful upgrade that’s about to make your useMango experience even better!
Introduction
We have released a new feature to enable the cloning of user components across different projects. When you clone a component across projects, all associated artefacts, such as composite components, scripted components, scanned components, project variables, and environment variables are also cloned into the target project.
Additionally, the user is allowed to select whether they would wish to reuse cloned artefacts in the destination project or create new copies of these artefacts.
Note
Please note that this feature is exclusively accessible to account administrators via the useMango™ app website.
In this blog, we will take a look at how to clone components from one project to another. Let’s get started!
Cloning Components across Projects
To clone components across projects, you need to log in to the app website and access the administrative actions.
Once logged in, hover over your Profile Icon and click on Administration.
The Administration window will look like this:
To clone components , follow the steps below:
- Select the “Clone” option under the Action dropdown.
- Select the “Component” option under the Entity dropdown. Once Entity type is selected more dropdown menus will appear.
- Select the specific type of component you want to clone from the “Component Type” dropdown menu. (For this Blog we will be selecting Composite)
- Select your desired Source Project from which you wish to clone components under the Source Project dropdown.
- Select your desired Destination Project from the Destination Project dropdown.
- Click on the checkboxes in the components table below to select the components from the Source Project that you wish to clone. You can use the filtering and searching capability to effectively search for components.
- We will leave the
Reuse unchanged artefacts in destination project
checkbox alone for now. We will explore it in more depth in the next section. - Click on the Next button to view the summary of the components; you can remove components or go back and add more components if you wish to
- Select Submit to clone the components.
If you head to the destination project in useMango, you’ll see the cloned components and its artefacts.
Reuse Unchanged Artefact Checkbox
We have already seen what happens when the Reuse unchanged artefacts in destination project
checkbox is unchecked. New artefacts are always created in the destination project.
The next time you attempt to clone components to the same destination project, you might encounter linked artefacts that are shared between these and previously cloned components. Consequently, these artefacts will already exist in the destination project, and you may wish to avoid creating duplicate copies of them. You can opt to reuse the unchanged artefacts in the destination project by utilising the “Reuse unchanged artefacts in destination project” checkbox.
The important point to note here is that artefacts are only reused if they remain unmodified in both the source and destination projects. If any changes are identified in the artefacts of either the source or destination projects, new copies are produced.
This checkbox only affects composite components. For other components it will have no effect.
To understand the functionality of the reuse checkbox, let us have a look at a scenario
The diagram below illustrates the components in two projects following the completion of the cloning operation. In this scenario, we have a composite component Login Component
which has been cloned to the destination project, and as it was utilising Scripted Component Verify Login
, this component has also been cloned.
The yellow colour here is used to show the linked scripted component.
You may now choose whether to utilise the Reuse unchanged artefacts in destination project checkbox or not. Let’s see what occurs in both circumstances.
If you do not choose the Reuse unchanged artefacts option, fresh copies of both the composite and scripted components are produced.
The diagram below illustrates this, with new scripted component being created(shown in blue colour).
However, if you do use the Reuse unchanged artefacts checkbox then new copy of Composite component created in destination project and the scripted component is reused.
The diagram below illustrates this, with the scripted component from the previous clone operation (shown in yellow colour) being reused.
Conclusion
Component Cloning Across Projects offers a significant efficiency gain by eliminating the need to manually recreate identical components across different projects. This new feature streamlines the testing process for complex applications, saving valuable time and effort.
We encourage you to explore this new feature and discover its time-saving potential firsthand. For detailed information, refer to the useMango documentation.