How to Use Variables and Secrets
Variables and secrets are essential for test automation to securely store sensitive data such as API keys or passwords and dynamically adapt to changing test environments, to ensure robust and confidential test execution.
Note
Note that Scale Call-to-test, parameters and test data will not work with the automation feature.
In Reflect, we use Secrets to store sensitive values securely. These are like Variables, but they're stored separately and encrypted for added security.
Using Secrets
You need secrets in an automated test with passwords (for example in a login test). Instead of putting the password in plain text where it could be seen, you can use Secrets to keep it secure.
In the Reflect app, navigate to the Tests section and click on Secrets link:
Add a new secret, in this case a ‘Password’. Set a default value and save.
In Zephyr Scale you can call this secret using the notation ${sec(Password)}
Using Variables
In the Reflect app, go to Account Variables.
Add new variables and click Add Function.
Go back to Zephyr Scale you can call this secret using the notation ${var(randomEmail)}
To learn more, check Reflect’s documentation on Variables and Functions: Variables & Parameters | Reflect