In case the same kind of processing appears in multiple test cases, by defining such processing as shared steps, it can also be used in other test cases. If it is necessary to make modifications to the processing content, only one shared step needs to be rewritten, which reduces the time and effort required for test case maintenance.
Table of contents
- Create shared steps
- Use shared steps
- Edit shared steps
- Shared step variables (Connecting connectors)
Create shared steps
Choose Create a shared step from the edit test case screen (figure 1), select the command you want to make into a shared step, and click Done (figure 2).
Figure 1. Create steps.
Figure 2. Select commands.
When you click Done, an error message stating Line*: You need to make the The UI shared to use for the shared step may be displayed.
UI that can be used within shared steps need to be Shared UI that can be used in all project tests, so drag and drop the UI at the line for which an error appeared in figure 3 to make it a shared UI.
Figure 3. Share UI.
After you make all required UIs into shared UIs and click Done again, the dialog box to create the shared step will be displayed. If you input the Name in this dialog box and click Create.
And the processing content shall become a shared step, as shown in figure 4.
Figure 4. Created shared step.
Use shared steps
After creating the shared step, reload the Edit test case screen. Once done, you will be able to select the shared step created in the command selection pop-up window, as shown in figure 5.
Figure 5. Use shared steps.
Edit shared steps
For test cases using shared steps, click Edit shared step (figure 6), and click Shared steps > Edit (figure 7) on the project page.
Figure 6. The Edit shared step button.
Figure 7. The Shared steps tab on the project page.
Figure 8. The shared step page.
Then, you will be taken to the Edit shared steps screen, as shown in figure 9.
Figure 9. The edit shared step screen.
Although you can correct the content of shared steps on the edit screen, you cannot upload a screen capture.
Shared step variables (Connecting connectors)
When using shared steps, there may be times when you want to specify parameters externally when calling. For example, in case of the “Register test user” step above, you may want to call this step by specifying different usernames for each test.
In such a case, you can use the shared step variables feature.
To specify this variable, first connect the input column and variable definition list for the command in the edit screen of shared steps(figure 10). Note that you cannot connect to a value input column without a connect button.
Figure 10. Connect to the value input column and variable definition list.
Once you connect, specify the appropriate parameter name corresponding to the value as shown in figure 11. The variable value is the value that is initially set when the shared step is used, and this can be left blank.
Figure 11. Specify the variable name.
Similarly, you can continue to create.
You can also create it from the Shared step creation popup window instead of from the edit screen of shared steps(figure 12,13)
Figure 12. Connect to the value input column and variable definition list.
Figure 13. Specify the variable name.
The common steps created this way can specify the value of the variable based on the test cases used, as shown in figure 14.
Figure 14. Specify the shared step variables in the test case.
If you need to modify the contents of a variable after creating a shared step, you can do so on the Edit shared steps screen, as shown in figure 15.
Figure 15. Edit variables from the Edit shared steps screen.
Shared step variables can use UI elements like a button as well as input strings. You can use this, for example, if you want to tap all of the screen menus in order, to check transitions. As in the case of a value input column, connect the UI element and variable and give the variable an appropriate name. You can connect to one variable with either a string or a UI element, but not both.
Figure 16. Set UI elements as shared step variables.
If you want to associate a separate UI element in the test case, drop the element in the parameter name section.
Figure 17. Link separate UI elements.