Creating the OTP secret in Test Hub

You can create the otpauth:// secret URI in Test Hub to map it to the Verification_Code variable, so that the OTP value resolves automatically at run time.

Before you begin

You must have completed the following tasks:

About this task

You store the otpauth:// secret URI as a secret in the project's security group, and then reference that secret from the Verification_Code variable in your environment file. Test Hub uses the secret to generate the matching OTP value at run time.

Procedure

  1. Log in to Test Hub.
    The Projects page of the initial team space is displayed.
  2. Click My projects > project_name to open the project that contains the Salesforce application.
    The Overview page of the project is displayed.
  3. Click Manage > Security.
  4. Click + Add Secret.
  5. Enter an identifier for the secret in the Identifier field. For example, salesforceOtpSecret.
  6. Paste the copied otpauth:// secret URI in the Value field.
  7. Click Create to save the secret.
  8. Open the environment file. For example, SFEnv.dte.yaml in the Test Editor page.
  9. Add a Verification_Code entry with the following values:
    • Set expr to the identifier of the secret that you created. For example, salesforceOtpSecret.
    • Set type to secret.

    You can configure different OTP secrets for different users in the same environment file.

Results

You have created the OTP secret in the project's security group.