※ Please note that parts of this page are machine translated.
This page explains how to create and manage Workspace Variables in Autify Nexus. Workspace variables allow you to define reusable values that can be referenced across multiple scenarios within a workspace. This is particularly useful for managing sensitive information like usernames and passwords, or for values that change frequently.
Creating Workspace Variables
You can create a new workspace variable directly from an input step in your scenario.
Navigate to your scenario: Open the scenario where you want to use a workspace variable.
Edit an input step: Click the edit icon next to the input step (e.g., "Enter user name" or "Enter password") where you want to use a variable.
Select "Workspace variable": In the "Edit step" dialog, click on the text input field (e.g., "given value") and select Workspace variable from the dropdown.
Create a new variable: In the "Select or create variable" dropdown, click + New variable.
Enter variable details:
Name: Type a descriptive name for your variable (e.g., "User name", "Password").
Default value: Enter the default value for the variable (e.g., "user", "password").
Secret (optional): If the variable contains sensitive information like a password, toggle on the Secret option. This will hide the value in the Nexus UI.
Add the variable: Click Add.
Confirm and save: The "Edit step" dialog will now show "Workspace variable" and the name of your newly created variable. Click Done.
Save your scenario: Click save on the main scenario screen.
Using Existing Workspace Variables
Once a workspace variable is created, you can reuse it in other scenarios within the same workspace.
Navigate to your scenario: Open the scenario where you want to use an existing workspace variable.
Edit an input step: Click the edit icon for the input step where you want to apply the variable.
Select "Workspace variable": In the "Edit step" dialog, select Workspace variable for the text field.
Choose from existing variables: Select the desired workspace variable (e.g., "User name", "Password") from the dropdown.
Confirm and save: Click Done.
Save your scenario: Click save on the main scenario screen.
Overriding Workspace Variables within a Scenario
You can temporarily override the default value of a workspace variable for a specific scenario using an "Override variable step".
Insert an "Override variable step":
Click the + icon between two steps in your scenario where you want to insert the override.
Hover over Insert step and select Override variable step.
Configure the override:
Override workspace variable: Select the workspace variable you want to override (e.g., "User name", "Password").
Override value: Type the new value you want to use for this specific scenario (e.g., "user (overridden)", "password (overridden)").
Insert the step: Click Insert.
Save your scenario: Click save on the main scenario screen.
Carrying Over Overridden Variable Values in Test Plans
You can configure a test plan to carry over overridden workspace variable values from one scenario to subsequent scenarios.
Important Notice: When running scenarios in parallel, the order in which variables are overridden becomes unpredictable. Therefore, for variable carry-over to function as expected, ensure that parallel execution is disabled in your test plan settings.
Create or edit a test plan: Navigate to Test Plans and either create a new test plan or open an existing one.
Add scenarios: Add the scenarios that use workspace variables to your test plan.
Configure Test Plan settings:
Scroll up to the Test Plan settings section.
Toggle off Enable parallel execution.
Toggle on Carry over overridden variable values to subsequent scenarios.
Save your test plan: Click Save.
When this test plan runs, the overridden values from the first scenario will be applied to subsequent scenarios within the same test plan.