Continue on failure
Chapter lab: Running with confidence
This lesson continues in the same lab as the lesson before it. If you don’t have it yet, download it here.
Download ch23-running-with-confidence.zip
Or fetch and unpack it from a terminal in VS Code:
curl -fsSLO https://manykarim.github.io/robotframework-essentials-web/labs/ch23-running-with-confidence.zip && unzip -q ch23-running-with-confidence.zip && rm ch23-running-with-confidence.zipInvoke-WebRequest https://manykarim.github.io/robotframework-essentials-web/labs/ch23-running-with-confidence.zip -OutFile ch23-running-with-confidence.zip; Expand-Archive ch23-running-with-confidence.zip -DestinationPath .; Remove-Item ch23-running-with-confidence.zipOpen the folder in VS Code with code rfe-ch23-running-with-confidence (or File → Open Folder…) and accept the recommended RobotCode and Python extensions. Then set it up:
uv syncpython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txtpython -m venv .venv.venv\Scripts\Activate.ps1pip install -r requirements.txtKeep the environment active in every terminal where you run lesson commands.
poetry install --no-rootPython 3.13 or newer is required; uv installs it when it is missing.
Open in browserNo setup? Try the lab right here: its files, an editor and a terminal, running in your browser.
What's inside
Directoryrfe-ch23-running-with-confidence/
Directory.vscode/
- extensions.json
Directorychecks/
- alpha.robot
- beta.robot
- unformatted.robot
- .gitignore
- .python-version
- LAB.md
- pyproject.toml
- README.md
- requirements.txt
- uv.lock
By default a test stops at its first failed keyword — everything after it is skipped. Often that is what you want. But sometimes you want to check several things and see every problem in one run: a form with many fields, a config with many settings, a page with many elements.
The robot:continue-on-failure tag keeps a test running past failures and
reports them all together. (The Run Keyword And Continue On Failure keyword
does the same for a single step.)
Task 1 — Report every problem at once
Section titled “Task 1 — Report every problem at once”Goal: create checks/audit.robot with a test tagged
robot:continue-on-failure that makes several assertions — more than one of them
failing — so the run reports all the failures, not just the first.
Here is the same idea with different assertions. Adapt it so at least two checks fail.
Worked example — adapt it, don’t copy it
*** Test Cases ***Config Check Reports All [Tags] robot:continue-on-failure Should Be Equal on on Should Be Equal yes no Should Be Equal 1 2Done when
the test Audit Reports Every Problem reports more than one failure.
Hint 1
Tag the test so it keeps going: [Tags] robot:continue-on-failure.
Hint 2
Make several assertions with more than one wrong, e.g.
Should Be Equal left right and Should Be Equal up down — both are
reported, not just the first.
Solution
*** Test Cases ***Audit Reports Every Problem [Tags] robot:continue-on-failure Should Be Equal ${1} ${1} Should Be Equal left right Should Be Equal up downTask 2 — Run it and read the combined failure
Section titled “Task 2 — Run it and read the combined failure”Run it:
uv run robot checks/audit.robotrobot checks/audit.robotpoetry run robot checks/audit.robotThe test fails once, but the message collects every failed check:
You fix them all in one pass instead of one run per failure.
Done when
the run reports all the failures together.
Check your understanding
Quick recall. Your first answer stays in this browser; the quiz never blocks your progress.
By default, a test stops…
Execution halts at the first failure; the
robot:continue-on-failuretag makes it keep going.Show the answer
Answer: at the first failed keyword — Execution halts at the first failure; the
robot:continue-on-failuretag makes it keep going.Why continue on failure?
It collects all failures together so you can fix them in one pass.
Show the answer
Answer: to see every problem in one run (e.g. a multi-field validation) — It collects all failures together so you can fix them in one pass.
Key terms
- robot:continue-on-failureconcept
- Tag that keeps a test running past failures and reports them all.
- Run Keyword And Continue On Failurekeyword
- Continue past a single failing step.