Monito now tests beyond login: roles, 2FA and repeatable setup
Test authenticated workflows with Monito: roles, saved sessions, 2FA, email login, setup and cleanup. Includes 11 example scenarios.
Monito now tests beyond login: roles, 2FA and repeatable setup
The test you want to run often starts several steps inside your application. A manager needs to approve a request. A new user needs to confirm their email. A customer needs an existing order before they can request a return.
To test those flows, the browser needs the right account, the right permissions and the right starting data.
Monito now supports saved login roles, reusable login sessions, authenticator codes, email codes and magic links, plus reusable setup and cleanup for configured test resources. You can test more of the work your users actually do, with less preparation between runs.
The scenario stays in plain language. Describe what to do and what should happen. Monito finds the controls, performs the actions and records the evidence.
Here is what that makes possible, with scenarios you can adapt to your application.
Test the same feature with different permissions
Save your test accounts as named Login roles in a project's environment. For example, manager, member and viewer. Select the role when you create a scenario.
A role tells Monito which saved account to use. The account's permissions still come from your application. You can configure different accounts for staging and production without putting passwords in the scenario.
Suppose your app lets managers edit tasks while viewers can only read them. Save two scenarios against the same prepared workspace.
Select the manager role:
Select the viewer role:
Use your application's expected access-denied behavior in the second scenario. Some applications show a permission message; others deliberately show a not-found page. State the behavior you expect.
These are separate runs, each with one selected role. They give you a practical way to check both the allowed journey and the restricted one.
Reuse a login when you are testing work inside the app
If a test is about editing a task, signing in is a prerequisite. If a test is about signing in, login is the feature under test.
You can now make that choice explicitly.
Enable Reuse login sessions on a saved role to let Monito reuse its encrypted login state. Each run still gets a separate browser. Saved state is scoped to the account, project and environment, and retained for up to one hour.
This lets several scenarios reach the authenticated part of your app without repeating a fresh login on every run.
For a login regression test, select Start logged out in the scenario. That makes the run exercise sign-in even when the role allows saved sessions.
A separate browser keeps browser state separate. If several tests change the same records in your application, use separate test data too.
Complete authenticator-based two-factor login
Monito can now complete login flows that use time-based one-time passwords, or TOTP: the rotating codes shown in authenticator apps.
Configure the test account's authenticator secret in its login role. Monito generates and enters the current code through its protected credential handling. The AI does not need the secret or a code pasted into the scenario.
Select Start logged out when you want the test to cover both login steps.
You can also save a separate scenario that checks the boundary before the code is entered:
This support is for authenticator codes. SMS codes, push approvals and hardware security keys use different authentication methods.
Test email verification with a real test inbox
Email authentication spans your application and the inbox. Monito can now follow that journey using a configured Resend test inbox.
Monito creates a fresh receiving address for each login attempt. It looks for a new message addressed to that attempt, from the configured sender, with the configured subject prefix. It can use either a one-time code or a magic link.
That gives each attempt its own email destination and keeps an old message from being mistaken for the current login email.
The inbox setup belongs in the login role: a dedicated receiving domain, a Resend API key that can read received email, the expected sender, the subject prefix, and the message type. Keep those credentials out of the scenario.
Example: email-code signup
Use a disposable test-inbox role configured for one-time codes. Your application must allow signup with the generated address. If signup requires a password, configure that password in the role too.
This exercises requesting the email, receiving it, submitting its code and continuing into the application.
Example: magic-link entry into a new account
Use a disposable test-inbox role configured for magic links. This example fits an application that creates an account when a new email address signs in.
The current inbox integration uses disposable addresses. For an existing account with a fixed email address, use the existing-account login method where supported; this inbox flow does not read that account's personal mailbox.
Prepare a starting state once and reuse it
Many scenarios share the same first steps: sign in, select a workspace, open a project and find a record.
You can keep those steps in each scenario, or save them as Reusable setup in the project's Environments area. The setup is also plain language. Monito runs it before the selected test and checks that it succeeded.
For example, save a setup named Open the QA workspace:
Select that setup for scenarios that check filtering, task editing or assignment. Each scenario can focus on its own behavior:
The test's starting data must match those expectations. Prepare the task with the required priority, rather than depending on a previous test to leave it that way.
If setup fails, Monito stops the test and records the setup failure. A missing workspace should be explained as a missing prerequisite before the task-filtering test starts.
Give each run its own data and clean it up afterward
For workflows that create or change records, shared starting data can cause interference. Two tests that edit the same order are still editing the same order, even in separate browsers.
Monito now supports configured test resources with setup and cleanup. A developer connects the application's test-data endpoints through the CLI/API. Monito gives each run a unique identifier so those resources can be created and removed within that run's scope.
For example, a configured setup could create a disposable workspace with a draft order. The scenario then tests the browser flow:
Afterward, Monito runs cleanup for the configured resources. Cleanup recovery can continue if the test executor stops unexpectedly. The report shows when cleanup remains unresolved so you can act on it.
Automatic cleanup covers the resources declared in that setup. A browser-created record needs its own cleanup strategy; Monito does not infer which records in your database are safe to delete. A disposable workspace can be useful when deleting it also removes the records created inside it.
The reusable browser setup works without test-data endpoints. Add the resource integration when your tests need isolated data and cleanup that can recover after an interruption.
Keep reruns tied to the setup they used
Reusable setup is versioned. Editing it creates a new revision, while existing scenarios retain their saved selection until you choose the updated setup.
That matters when investigating a failure. You can see which setup the test used, instead of finding that a shared prerequisite changed between runs.
Monito's existing rerun controls also let you choose the original or current scenario configuration. The original configuration now includes its saved setup references.
An original-configuration rerun preserves that test configuration. The application and its external services can still change between runs.
Inspect the journey without exposing login secrets
Authentication tests need useful evidence. They also need to protect the credentials used during the run.
Monito keeps configured passwords, authenticator secrets and inbox API keys out of AI requests. Protected authentication capture masks private fields. These runs can use a replay assembled from masked checkpoints, so the report remains useful without exposing a continuous recording of sensitive input.
Setup results, test results and cleanup status help explain where a run stopped. You can also read the evidence through the Monito CLI:
The output includes evidence completeness and screenshot references. Check any reported missing artifacts alongside the verdict.
Run your first authenticated scenario
Start with one journey your users depend on:
- Open your project's Environments area and add a Login role for a test account.
- Add authenticator or disposable-inbox settings if that journey needs them.
- Create a scenario and select the role under Saved login and setup (optional).
- Select Start logged out if you are testing sign-in itself. Attach reusable setup if the test needs it.
- Write the actions and expected result in the scenario, then run it and inspect the report.
For a saved scenario, you can also launch it from the CLI:
The first command returns the new run ID. Use that ID in the second command to read its current result and evidence as the run completes.
Open Monito and create your authenticated test. Choose the account, describe the journey and tell Monito what a successful result should look like.