When the mabl agent or a teammate changes a browser test, how do you know the test still checks what it's meant to? A test objective answers that question. It's a sentence or two describing the outcome the test exists to verify, such as "A returning customer can check out with a saved card and sees the order confirmation." Your team writes it, ideally from the acceptance criteria the test was built from, and it's saved with each version of the test alongside the steps.
mabl holds each version of the test to its objective. An objective check compares a version's steps with the objective and describes anything the steps don't cover. This article explains how a check works, when it runs, and how to write an objective that holds up. To add an objective or run a check, see Add and check test objectives.
Test objectives vs. test descriptions
An objective isn't the same as a test's description. The description is free text for your team, and mabl doesn't check the steps against it.
How an objective check works
An objective check compares one version of a test with its objective. Any change to the steps or the objective creates a new version, and the new version starts out not checked.
The check reads the version's steps and asks whether they do what the objective says. Steps that don't run aren't counted, so a disabled step, or a step inside a disabled group or flow, can't cover any part of the objective.
A check reaches one of these results:
- Meets objective: every action and check the objective asks for has a step.
- Doesn't meet objective: the steps don't fully cover the objective. The check records what's missing.
- Not checked: no one has checked this version yet, or the last check couldn't tell either way.
A check covers only what the objective names
A check confirms that the steps meet what the objective describes. If your test includes an important assertion that the objective doesn't mention, the test could lose that assertion and still meet its objective. To prevent this situation, name every outcome that matters. See Write objectives that hold up.
When checks run
Checks run automatically when the mabl agent builds or edits a test, whether you started it from the app, the chat, the mabl CLI, or the mabl MCP. The agent checks its steps against the objective before it finishes. If the check finds that part of the objective isn't covered, the task says Doesn't meet its objective yet and shows what's missing, so you can ask the agent to add it or update the objective.
Other changes aren't checked until someone runs a check:
- Edits a teammate saves from quick edit, the Trainer, or the test details page. After a quick edit save, mabl offers to check the new version for you.
- Tests your AI client creates or edits directly through the mabl MCP without the mabl agent, such as direct edits, unless a guardrail asks for a check.
To have agents ask before they save a test that may not meet its objective, including direct edits from your AI coding agent, set a guardrail. See Set guardrails for agents.
How mabl uses the objective
When the mabl agent builds or edits a test, it works toward the test's objective:
- If you request an edit that changes the purpose of the test, the agent updates the objective and shows you the new wording before it starts the edit.
- If edited steps fall short of the objective, the agent fixes the steps or asks you whether the objective should change. It doesn't rewrite the objective to match the steps.
When a test run fails, the mabl agent reads the objective of the version that ran as part of its results analysis. It uses the objective to tell a failure in what the test exists to verify from a failure in an incidental step along the way, such as a promotional banner that loads slowly on the way to checkout.
Write objectives that hold up
Your team owns each test's objective. The mabl agent can help you draft one in chat. These recommendations help an objective stay useful as the test changes.
Name the result the test confirms
Write the objective as an outcome someone can observe, and say how the test knows it happened. For example:
A signed-in shopper can buy one item, and the order confirmation shows the item and its price.
An objective that only describes actions, such as "Add an item to the cart and check out," can be met by a test that never asserts anything.
Leave out how the test gets there
Selectors, element names, step order, and routine setup such as logging in change whenever the UI does, even though the purpose of the test stays the same. Keep them out of the objective, so a renamed button or a reordered step doesn't force an edit or flag a gap that doesn't matter. The same goes for specific data values. Include one only when the value is what's being tested. For example:
Rejects a password shorter than 8 characters.
Give each test one purpose
An objective can describe several steps toward one goal, such as adding an item, checking out, and seeing the confirmation. When a test covers unrelated goals, give each goal its own test and objective.
For example, a test that checks out and then updates the shopper's profile has two purposes. If a profile step fails, you can't tell at a glance whether checkout still works. As two tests, each failure points to exactly one goal, and results analysis can tell which failures affect what each test exists to verify.