Configuring the initial test environment
You can configure the initial test environment by creating a security group and adding secrets for sensitive values used in Salesforce tests with HCL DevOps Test Hub (Test Hub) variables.
Before you begin
- Ensured that you have a Test Hub project.
- Ensured that you are assigned a Team Space Owner, Project Owner, or Member with a Tester role to create or edit a test resource.
- Ensured that you have administrative credentials for the Salesforce sandbox.
About this task
You can use the Test Hub dashboard to select your project
and configure the Security section, where security groups and
individual secrets are stored for use by your tests. After you record or build a Salesforce
test scenario, some steps enter sensitive values, such as a password or a one-time
verification code. Instead of entering these values as text in the test, you can refer to
them by using variable syntax, such as ${Password} and
${Verification_Code}.
At run time, Test Hub resolves the actual values from a configured environment file, and masks them in the console, so the same test can run for different users or environments without exposing credentials in the script.
Procedure
-
Log in to Test Hub.
The Projects page of the initial team space is displayed.
-
Click to open the project that contains the Salesforce application.
The Overview page of the project is displayed.
- Click .
-
Click + Create Security Group, and then enter a name for the
security group
The Create Security Group dialog is displayed.
- Enter a name for the security group. For example, MySecrets.
-
Click Create.
The security group is created.
- Click + Add Secret.
- Enter an identifier for the secret in the Identifier field. For example, Password or Verification_Code.
-
Click Create
The secret is added to the project-level security group.
When you record a test for a Salesforce application on the Test Editor page, replace the sensitive values with variables, such as${Password}and${Verification_Code}.Note:The variable names must match the names of the identifiers of the secret created in the project-level security group.
Results
You have configured the initial test environment by creating a security group and adding the secrets required by the test.