What is a shared scenario?
Many scenarios may have common part of steps (i.e. login steps). In this case, one can separate it to sub-scenario. This sub-scenarios that can be retrieved and used from other scenarios are called “shared scenarios”. For example, if you have an app that requires a login, you can write the login part as a separate scenario and store it as a shared scenario, so you can reuse it in another scenario.
Caution) Shared scenarios can only be used within the same workspace, and nesting shared scenario is prohibited currently.
💡 Let's create a scenario that launches YouTube, then load it into a shared scenario and test the YouTube functionality and use it.
Through this example, you can learn how to create and use a shared scenario.
Create a shared scenario #
Among the methods of running the app, we plan to write a scenario by using the Package Name (Bundle ID). And before running the app, first close the YouTube app that may be running in the background, and then write the app to run in the initial screen state.
Step1. To create a new step and close the YouTube app, set the action to “Terminate” and set the Package Name of Attributes to “com.google.android.youtube”.
Step2. Again, create a new step with the action set to “Launch” and the Package Name set to “com.google.android.youtube”.
Step3. In the scenario list panel, right-click the scenario you just created to bring up the context menu, and then click the “Share” button to make the scenario a shared scenario.
Step4. You can see that the scenario created with shared status disappears from the scenario list, and the scenario has been added to the shared scenario list panel below.
Using shared scenarios #
Step1. Create a new scenario and create a new step in it.
Step2. Set the action to “Shared Scenario” and click “Select a Shared Scenario” in the Attributes panel.
Step3. Select the shared scenario you want to use in the Shared Scenario List window and click the “Import” button.
Step4. Check the added sharing scenario. The shared scenario steps are blurred because the shared scenario cannot be edited in the scenario from which the shared scenario has been loaded.