If your application requires a login to perform tests or test cases require writing or editing or changing a database and verifying something, it is best practice to create unique test accounts for testers.

The reason for this is to avoid testers stepping on each other's toes (Situation: Tester 1 and Tester 2 log in using the same account. Tester 1 adds a product to their cart. Tester 2 adds a product to the cart. The test verifies if 1 item appears in the cart. The test fails.)

Most customers fall under two buckets when it comes to providing unique accounts to testers:

  1. The user logs in to a unique account via an email and password and is able to test within that account (For example. "staging.example.com/login" and the tester logs in with a unique email and pwd)
  2. The user logs in with a single email and password pair via a unique URL that directs them to a unique account (staging.example.com/test_account-13 and the tester always logs in with 'testerrainforestqa@example.com', for example)

The choice is up to you as to what is the best method for your QA needs.

Creating test accounts

To create these test accounts, we recommend working with a developer to write a script to create hundreds of test accounts (this makes sure no matter how many tests you run, a unique test account will be available and the run will not fail). Rainforest will require the following amount of test accounts per run:

  • # of tests * # of browsers or device types executed on * 3 possible testers who will be sent to execute each test

So if I were running 20 tests across 3 browsers and devices, I would need 180 accounts as a minimum.

Adding test accounts to your Rainforest QA account

Once you have the test accounts created, move them into a spreadsheet that can be saved as a CSV. Arrange the information similar to this example:

Testers will be able to access these accounts (or unique URLs) via a tool called Step Variables. Step Variables allow you to inject dynamic data like credentials into test steps.

Navigate to the Step Variables Settings page in Rainforest and add a new Tabular Variable with a Name like login. Upload the file and click Create.

Note: Marking a variable as Reusable will allow the variable to be re-used as testers using the variable complete tests. This is useful if creating the needed amount of variables is not possible.

The tradeoff of using this option vs adding more than enough tabular variables is the run may take longer because the variables must free up for testers are able to use them.

Using Test Accounts for Test Writing

  • Now, when you go to create a new test, you'll be able to add a Step Variable by selecting the Variables tab on the right of the test view, then select it to be used in an action like below.
  • Variables tab:
  • Step variable used in an action:
Did this answer your question?