When working with a Web Test Case that contains sensitive or secure information, such as API keys, username or password credentials, these elements should be encrypted within the Test Case itself. When the Test Case is run, these values are decrypted by the Test Case coordinator. This process allows you to create Test Cases with secure information that remains hidden within the Cyara Web Portal.
To create a secure value for a Web Test Case, create an Attribute with a prefix of "Secure", the attribute key syntax is as follows:
Secure.XYZ
(Where XYZ is the value to obscure)
The test case step usage syntax is:{Insert
TestCase.<attribute key>}
Note: that the attribute key values are only encrypted after the test case is saved.
You can then reference this value within a Test Case by using the Insert tag. Below is an example using this tag:
Login("{Insert TestCase.Secure.ApiUsername}",{Insert
TestCase.Secure.Password}")
When you first enter the Clear Text value to be hidden, the Test Case will encrypt this and will only ever reveal the clear text version when the step containing this Attribute is run.
For more information on how to create and format Attributes for a Web Test Case, read the Creating a Web Test Case article.
Comments
0 comments
Please sign in to leave a comment.