If you need to test OTP / Google 2 factor auth, this article will help you out

If you would like to test users which have existing 2 factor auth setups. Rainforest allows you to issue the OTP by passing us the secret for a particular user. Normally you would pass this a via step-variable.

Note, this should only be used for test-accounts and or environments as the secret is exposed.

To get started:

  1. Add a base32 encoded secret to a step variable. We'll assume this is named #{{logins.otp_secret}} for the rest of the example.
  2. Instruct the tester to:
    > Open https://otp.rainforestqa.com/code/#{{logins.otp_secret}} in a new tab. Copy the code shown when there is more than 15 seconds left. Paste it in to the box on the previous tab.
    > Was the code accepted / were you logged in?

For an example of what this looks like for a tester, checkout this example:


Did this answer your question?