Scripts - Xray Cloud Documentation (2024)

Scripts - Xray Cloud Documentation (1)

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 standardizeTest 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).

Scripts - Xray Cloud Documentation (2)

Figure 1 - Data

Scripts - Xray Cloud Documentation (3)

Figure 2 - Scripts

You can add automatically generated expected results to your steps (Figure 3 - 2).

Scripts - Xray Cloud Documentation (4)

Figure 3 - Results

Accessing Scripts

In the Xray Test Case Designer, clickMy Test Models (Figure 4 - 1) and then click a Test model (Figure 4 - 2).

Scripts - Xray Cloud Documentation (5)

Figure 4 - Test model

Creating/Editing Scripts

Automate

Automate (Figure 5 - 2) allows you to createGherkinfeature files as behaviors for your generated Test cases.

Editing a Script

Go to Scripts (Figure 5 - 1) and then click Automate (Figure 5 - 2).

Click the pencil icon to edit the script's name (Figure 5 - 3) and the trash icon to delete the script (Figure 5 - 3).

Use the dropdown menu to select the strength of interactions (Figure 5 - 5).

Click the grey background to edit the script's text and write anything you want (Figure 5 - 6).

Once you're done editing, click the Save button (Figure 5 - 8). This button will become active as soon as you make a change in the text field (Figure 5 - 6).

You can click the Usage button (Figure 5 - 7) to see some tips on creating a script.

Creating a Script

Go to Scripts (Figure 5 - 1) and then click Automate (Figure 5 - 2).

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).

Scripts - Xray Cloud Documentation (7)

Figure 6 - Modal

Once you're finished, click Create (Figure 6 - 3).

The newly generated script will now appear in a tab (Figure 7 - 1).

Scripts - Xray Cloud Documentation (8)

Figure 7 - New script

Manual

Go to Scripts (Figure 8 - 1) and then click Manual (Figure 8 - 2).

Scripts - Xray Cloud Documentation (9)

Figure 8 - Scripts

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.

Scripts - Xray Cloud Documentation (10)

Figure 9 - Script

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).

Scripts - Xray Cloud Documentation (11)

Figure 10 - Results

Here, you’re setting up a simple “when / then” rule (Figure 11 - 1; 2; 3).

Scripts - Xray Cloud Documentation (12)

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.

  • Make sure you understand the similarities and differences between Expected Results in the manual screen and Expected Outcomes in the Forced Interactions feature. There is a significant, yet subtle, difference:
    • Expected Results in Manual scripts treats the scenario data table as a read-only precondition and generate the Then content only if the conditions are satisfied.
    • Expected Outcomes in Forced Interactions guarantees that the Test conditions to satisfy it will be included in the scenarios table at least once (which may increase the number of Test cases).

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.

Select the interaction by using the dropdown menu (Figure 12 - 3).

Scripts - Xray Cloud Documentation (13)

Figure 12 - Script


In theFinish field (Figure 12 - 4) you can add some instructions that will appear only once at the end of all of the scenario scripts.

As long as you save the field descriptions as you go, your Manual script will also be saved and updated.

If you have questions or technical issues, please contact the Support team via the Customer Portal (Jira service management)orsend us a message using the in-app chat.

Scripts - Xray Cloud Documentation (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Rubie Ullrich

Last Updated:

Views: 5583

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.