How can we help?

Best practices for handling logins

You are here:

Authentication should be configured as an individual test, containing just the login steps. Record it like a regular test. Make sure to logout from your application before starting to record the test. Otherwise you will be already authenticated 🙂

It is best practice to use an incognito window, to ensure that there are no previous logins active and the inputs are not pre-completed with data from the browser’s “remember me” functionality”.

Run it at least once to make sure it doesn’t fail. When creating test suites, set that authentication test separately as a pre-hook. It will run before each test, providing authentication for the following steps.

If you need to test with multiple accounts, simply create more authentication tests and choose the proper one for each new test suite down the line.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Need help?