Constants
DevAssure allows you to define constants with values that vary depending on the test environment.
This enables you to write reusable test cases that can execute seamlessly across different environments (e.g., Development, Staging, Production) without modifying the core test logic.
Add or Edit Constants
-
Navigate to the Environments section in the sidebar, click on Constants.
-
Click on Add new icon that appears on hover over the constants in explorer.
-
Select New Constants and enter a file name for constants.
-
Under Default section , Click the button labeled "Add new variable" to create a new constant.
- Name: Provide a clear and descriptive name for the constant (e.g., "USERNAME").
- Type: Specify the data type of the constant (e.g., Text, Url, Number, Boolean).
- Value: Enter the value for the constant. This might be a URL, username, password, or any other data relevant to this environment.
-
Override Constants : This indicates that you're defining constants specific to an environment, overriding any global defaults that might exist.