Page History
Include Page | ||||
---|---|---|---|---|
|
UI Expand | ||
---|---|---|
| ||
|
Introduction
Scripts define the Test steps and expected results for each Test scenario. They provide clear instructions for testers, ensuring consistency in how scenarios are executed.
By using the Xray Test Case Designer Scripts feature, you can standardize Test execution and ensure repeatability, making your Tests more reliable and well-documented.
You can quickly transform optimized Test data as depicted in Figure 1 into customizable scripts (Figure 2).
Figure 1 - Data
Figure 2 - Scripts
Info |
---|
You can add automatically generated expected results to your steps (Figure 3 - 2). Figure 3 - Results |
Operations
Accessing Scripts
UI Steps | ||||
---|---|---|---|---|
|
Creating/Editing Scripts
Automate
Automate (Figure 5 - 2) allows you to create Gherkin feature files as behaviors for your generated Test cases.
Editing a Script
UI Steps | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Creating a Script
...
UI Step |
---|
Go to Scripts (Figure 5 - 1) and then click Automate (Figure 5 - 2). |
UI Step |
---|
Click the + icon (Figure 5 - 4). |
...
A modal will open (Figure 6).
There, enter the name of the new script (Figure 6 - 1) and select a type (Figure 6 - 2).
Figure 6 - Modal
Once you're finished, click Create (Figure 6 - 3).
UI Step |
---|
The newly generated script will now appear in a tab (Figure 7 - 1). Figure 7 - New script |
Manual
...
UI Step |
---|
Go to Scripts (Figure 8 - 1) and then click Manual (Figure 8 - 2). Figure 8 - Scripts |
UI Step |
---|
The screen for the manual script will open (Figure 9). Here, you can write the script instructions by hovering and clicking the script fields (Figure 9 - 1) and entering a description. Once you're finished writing the instructions, always click Save (Figure 9 - 2) before moving to the next step. Figure 9 - Script |
UI Step |
---|
You can edit/delete a step (Figure 10 - 1) and add the expected results to it by clicking the Add Expected Results button (Figure 10 - 2). A modal will open (Figure 11). Figure 10 - Results |
...
Here, you’re setting up a simple “when / then” rule (Figure 11 - 1; 2; 3).
Figure 11 - Results
You’re not restricted to rules with just one positive condition - you could also create a rule that reads is not by clicking is (Figure 11 - 2).
If when (Figure 11 - 1) is blank, the expected result from the then field (Figure 11 - 3) will apply to that step in all Test cases, regardless of the Test data.
Once you're finished, click Add (Figure 11 - 4).
...
Expected Results Feature
...
This feature provides a partial solution for straightforward Expected Results, allowing you to avoid manually typing many simple results. However, it is not designed to handle particularly complex rules.
...
If you need to define an Expected Result that requires three or more specific values to appear in a single Test script (and you are creating pairwise sets of Tests), use the Forced Interactions feature or a higher combination strength to ensure the scenario is included in your suite. Then, use the Manual scripts feature to document the Expected Result for export.
Xray Test Case Designer Automate scripts can leverage the last column in Forced Interactions directly as an internal variable.
If your Expected Result requires two or fewer specific values to appear in a single Test script (and you're creating pairwise sets of Tests), use the Manual scripts feature without additional prep work.
UI Step |
---|
Select the interaction by using the dropdown menu (Figure 12 - 3). Figure 12 - Script |
UI Step |
---|
In the Finish field (Figure 12 - 4) you can add some instructions that will appear only once at the end of all of the scenario scripts. |
Info |
---|
As long as you save the field descriptions as you go, your Manual script will also be saved and updated. |
...
title | Support/Troubleshooting |
---|
...