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 Creating shared steps
Figure 2 Selecting commands
When you click the “Done” button, 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 Sharing UI
After you make all required UIs into shared UIs and click the “Done” button 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 Using shared steps
Edit shared steps
For test cases using shared steps, click the “Edit shared step” button (Figure 6), and click "Shared steps" > “Edit” (Figure 7) on the project page.
Figure 6 “Edit shared steps” button
Figure 7 “Shared steps” on the project page
Then, you will be taken to the Edit shared steps screen, as shown in Figure 8.
Figure 8 Edit shared steps 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 “variable” function.
To specify this variable, first connect the input column and variable definition list for the command in the edit screen of shared steps(Figure 9). Note that you cannot connect to a value input column without a connect button.
Figure 9 Connecting 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 10. The "Variable value" is the value that is initially set when the shared step is used, and this can be left blank.
Figure 10 Specifying 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 11,12)
Figure 11 Connecting to the value input column and variable definition list
Figure 12 Specifying 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 13.
Figure 13 Specifying 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 14.
Figure 14 Editing 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 13 Setting 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 14 Linking separate UI elements