How Can I Set Up Authenticator-Based Authentication in Testsigma?


Testsigma supports multiple authentication mechanisms to ensure secure access and flexibility. One such mechanism is authenticator-based authentication, which leverages Time-based One-Time Passwords (TOTP) generated by authenticators such as Google Authenticator and Authy applications.

This article explains how authenticator-based authentication works and how to configure it in Testsigma.


Supported Authentication Methods

  • Username and Password.
  • Two-Factor Authentication (2FA). For more information, refer to the documentation on the mailbox and the phone number.
  • API Key Authentication - You can fetch the access key from their endpoint, store it in a runtime variable, and use it for login authentication.
  • Authenticator-Based Authentication.

Install Google Authenticator Extension

  1. Open your Chrome browser and go to the Chrome Web Store.
  2. Search for Google Authenticator. Google Authenticator
  3. Click Add to Chrome on any authenticator to install the extension. Add to Chrome
  4. After installation, the Authenticator icon appears on your browser toolbar.​

Upload the QR Code to Testsigma

  1. In the extension, click the Scan QR Code icon, take a screenshot of the QR code, and upload the screenshot to Testsigma. Scan QR Code
  2. In Testsigma, go to Test Data > Uploads. Uploads
  3. On the Uploads page, click Upload and upload this QR code image.​ Upload

Install the TOTP Add-on to Generate OTP

  1. Click on the Addons icon from the left navigation bar. Addons
  2. On the Addon Marketplace page, under New & Updated Addons, click the search bar and search for Google Authenticator Code Generator and QR Code Data Extractor. Addon Marketplace
  3. Click Install on the Google Authenticator code generator card. Google Authenticator Code Generator
  4. Click Install on the QR Code Data Extractor card. QR Code Data Extractor

Extract the Secret Key Using NLP

  1. From the left navigation bar, go to Create Tests > Test Cases. Create Tests
  2. On the Test Case Explorer page, expand a Feature and click the + icon next to a scenario. Test Case Explorer
  3. In the dialog box, enter a name for the test case and click Create. Create
  4. On the Test Case Details page, use the NLP: Extract data from QR Code file-path and store the data in a runtime variable variable-name. NLP

    • Click the file-path placeholder, and from the Test Data Types dropdown, select Upload. Upload
    • On the Uploads overlay, select the screenshot of the QR code. Uploads
    • Click the variable-name placeholder, enter a new runtime variable name such as qr_runtime, and click Create Step. Variable Name
  5. Click Run to execute the test. Run
  6. The step result displays the decoded secret key from the QR image. Secret Key

Store the Secret Key in a Test Data and Generate OTP

  1. Use the Split text from range of characters from and to and store extracted text in runtime-variable NLP. NPL 2

    • Click the text placeholder, and from the Test Data Types dropdown, select $Runtime. Runtime
    • On the $Runtime Variable overlay, select the same runtime variable used for this test case. Runtime Variable
    • Click the from placeholder and enter the character position where the secret key begins. from

      NOTE:

      You can count the character positions in the text beforehand to identify where the secret key starts.

    • Click the to placeholder and enter the character position where the secret key ends. to
    • Click the runtime-variable placeholder, enter a new runtime variable name such as secret_runtime, and click Create Step. runtime variable
  2. Use the Store test data 1 in test data 2 NLP. NPL 3

    • Click the test data 1 placeholder, and from the Test Data Types dropdown, select $Runtime. Runtime
    • On the $Runtime Variable overlay, enter the runtime variable name as secret_runtime and click Add. Add
    • Click the test data 2 placeholder, enter a new test data name such as SecretKey, and click Create Step. Create Step
  3. Use the Generate TOTP using secretkey and store it into a runtime variable test data NLP. NLP 4

    • Click the secretkey placeholder, and from the Test Data Types dropdown, select $Runtime. secretkey
    • On the $Runtime Variable overlay, select the runtime variable name SecretKey. Runtime Varibale
    • Click the testdata placeholder, enter a new runtime variable name such as TOTP_Runtime, and click Create Step. TOTP Runtime
  4. Click Run to execute the test. Run
  5. The step result of this execution will display the OTP. OTP