When the mabl agent, a coding agent, or a teammate edits a browser test, the test can keep passing even after it stops checking what it's meant to. An objective guards against that. It describes what the test exists to verify, so mabl can check whether the steps still cover it. The mabl agent checks its own edits against the objective, and you can check any other change yourself.
This article covers adding and editing an objective, checking a test against it, and reviewing objectives before you merge a branch. To learn what an objective is and how checks work, see How test objectives work.
Add or edit an objective
You can write an objective yourself in the mabl app, or work it out with the mabl agent:
- In the mabl app: add or edit it in quick edit, following the steps below.
- In chat: when you ask the mabl agent to build a test, it drafts an objective with you and shows it to you before it starts. You can also ask it to change an existing test's objective.
- From your AI coding agent: when you start an authoring session through the mabl MCP, pass the objective with it.
To add or edit an objective in the mabl app:
- Open the test's objective in quick edit:
- To add an objective: in the Objective section of the test details page, click Add objective.
- To edit an objective: open the test in quick edit. If a check found a gap, you can also click Update objective on the test details page. If mabl wrote the objective and no one has checked it yet, click Edit next to "Written by mabl from your steps."
- In the Objective row, describe the outcome the test verifies, such as "A returning customer can check out with a saved card and sees the order confirmation." For tips on wording, see Write objectives that hold up.
- Optional: check the steps against the objective before you save.
- Save the test. The objective and any step changes save together as one new version. To remove an objective, clear the field and save.
Check a test against its objective
When the mabl agent builds or edits a test, it checks its changes against the objective on its own. Other changes, such as a teammate's edit or a direct edit from your AI coding agent, aren't checked until someone runs a check. Each check uses one agent run, and its result is recorded on the version it checked. You can also ask the mabl agent in chat to check a test against its objective.
Check a saved version
- On the test details page, find the note in the Objective section, such as "Not checked since version 4."
- Click Check now. mabl checks the steps of the current version and records the result.
If the steps meet the objective, the note shows when the version was checked. If they don't, the section shows Last check found: and what's missing, with an Update objective link in case the objective is what needs to change. If mabl can't tell whether the steps meet the objective, it records nothing, and the version stays not checked.
After you save a change in quick edit, the test details page offers to check the new version: "Saved as version 4. Check it still meets the objective?" Click Check alignment to run the check, or Not now to skip it.
Check before you save
- In quick edit, expand the Objective row.
- Click Check objective. mabl checks the objective and steps as they are in quick edit, including changes you haven't saved yet.
- Save the test. The check is recorded on the new version.
If you change the objective or the steps after the check, run it again. A check from before the change no longer describes what you're saving.
Review objectives before you merge
Before you merge a branch, confirm that its changes still meet each test's objective and that any change to an objective is intended:
- Open the branch details page. Each test shows whether its objective changed on the branch, along with the latest check for the branch version, such as "Objective changed · Doesn't meet objective."
- For a test whose objective changed, open the comparison. The two versions' objectives appear side by side with a word-by-word diff, and each shows its own check.
- For a test that's not checked, check the saved version before you merge. For a test that doesn't meet its objective, fix the steps or update the objective.
Outside of branches, the Objective column in the tests list shows each test's objective, so you can see which tests have one.