Import Scripts as Component
Last updated
Last updated
When you wish to reuse scripts created in another service, this feature becomes essential. It empowers you to leverage previously developed scripts efficiently, saving time and effort in the testing process. By importing scripts from various services, you can seamlessly adapt and apply them to your current testing context.
You can import scripts from the following services:
Web Testing 🌐
Mobile Testing 📱
Desktop Testing 🖥️
Utilizing this functionality is straightforward. Let's begin by exploring how to use it.
In the first step, it is necessary to mark the scripts as components if we intend to use them within the Component service. This step is crucial because, without it, importing the scripts into the Component service is not possible.
To Mark a Web Testing Script as a Component:
Locate and choose the specific project where your Web Testing Script is stored.
Inside the project, find the module where your Web Testing Script resides. Click on it to access the module.
Within the module, identify the Web Testing Script you wish to mark as a component.
Once you've found the script, look for a menu represented by three dots (often called an ellipsis). Click on these three dots.
From the menu that appears after clicking the ellipsis, select the option labeled Mark As Component.
Click on it.
That's it! Your script is now marked as a component and can be imported into the Component service for further use.
To Unmark a Web Testing Script as a Component:
Navigate to the specific script, as explained previously. You'll notice a flag icon associated with that script, which indicates that script is 'Marked as Component'.
Click on the ellipsis(...
) next to the script.
From the menu that appears, select the option Unmark As component.
By performing these steps, the script will no longer be visible within the Component service, and you won't be able to import it.
To view all the shared tests within your project, follow these steps:
First, find and select the particular project for which you wish to review shared scripts.
Within the project, scroll down to the 'Maintain' section and click on `Shared Tests``.
Inside the 'Shared Tests' section, you'll find all the scripts that have been Marked or flagged as components.
From this point, you also have the option to Unmark As Component
if needed by clicking on the ellipsis.
It's important to note that the same process applies to other services as well.
Go to the Component service and click on Import Scripts
, located in the top-right corner of the screen.
Once you've navigated to the 'Import Scripts' screen, follow these steps to import the scripts:
In the left panel, select the service from which you want to import the scripts.
After selecting the service, you'll see a list of all the scripts from that service. To choose the specific scripts you want to import, click on the checkboxes located at the beginning of each script entry.
Locate and click the Import
button situated at the top-right corner.
After clicking the Import
button, you'll be directed to the 'Import to Projects' screen. Here, you have the option to either import the selected scripts into all projects or choose specific projects for import.
After selecting the projects, click on the Import
button located below the project list, and your chosen scripts will be imported into the selected projects.
Here are the steps for verifying or editing your imported scripts:
Choose the project where you have imported your scripts.
Once you're inside the project, locate and click on the Design
button.
Choose the category that aligns with the service where you imported the script.
You'll then have the ability to view and make edits to all the scripts you've imported in that particular category.
📝 Please make note of the following points after importing the scripts:
After importing, web and mobile scripts will be in a 'Draft' status, while desktop testing scripts will be automatically approved.
Currently, it is not possible to edit or perform a dry run for Desktop Testing scripts.
After importing web and mobile scripts, ensure that they are functioning as expected. If necessary, perform a dry run to validate their performance before submitting them for approval.