This lesson is intended for users who want to find an approach for handling credentials and logins in their mabl tests.
Make sure you are comfortable with the following lessons:
By the end of this lesson you will:
Login flows are an important part of test automation, but not every team uses the same authentication scenarios. Whether you use the same username and password, multiple sets of credentials per environment, or some other combination, there are options in mabl that can help with managing credentials and maximizing reusability. 🙌
A login flow incorporates credentials (e.g. username and password) into a parcel of reusable steps that can be applied as needed to your mabl tests.
mabl provides a designated place for storing usernames and passwords in the Configuration -> Credentials section.
While this is a natural first choice for many users setting up their login flows, depending on your current setup, there may be another option that better suits your situation.
Note: If your application uses basic auth login, you should refer to this help doc for handling authentication.
As you consider the following options for setting up credentials, ask yourself the following question:
"Which option would be the easiest for our team to manage?"
How to associate credentials with a plan or test:
You can find more information on credentials here.
Steps to create an environment variable:
Note: You should create these variables with the same name in each environment that uses them.
*Helpful tip: Following the convention of using all caps for environment variables (e.g. ADMIN_PASSWORD) can help distinguish them from the other variables while training a test. 🤓
Designated login flows
Steps to record and save a designated login flow:
To update credentials, you can go to one of the tests using the flow, click "Edit steps" and update within the test. (The flow will be updated across all tests that use it.)