Reprocessing with rebot
Chapter lab: Tests, tasks, and reports
This lesson continues in the same lab as the lesson before it. If you don’t have it yet, download it here.
Download ch24-tests-tasks-and-reports.zip
Or fetch and unpack it from a terminal in VS Code:
curl -fsSLO https://manykarim.github.io/robotframework-essentials-web/labs/ch24-tests-tasks-and-reports.zip && unzip -q ch24-tests-tasks-and-reports.zip && rm ch24-tests-tasks-and-reports.zipInvoke-WebRequest https://manykarim.github.io/robotframework-essentials-web/labs/ch24-tests-tasks-and-reports.zip -OutFile ch24-tests-tasks-and-reports.zip; Expand-Archive ch24-tests-tasks-and-reports.zip -DestinationPath .; Remove-Item ch24-tests-tasks-and-reports.zipOpen the folder in VS Code with code rfe-ch24-tests-tasks-and-reports (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-ch24-tests-tasks-and-reports/
Directory.vscode/
- extensions.json
Directorychecks/
- alpha.robot
- beta.robot
- unformatted.robot
- .gitignore
- .python-version
- LAB.md
- pyproject.toml
- README.md
- requirements.txt
- uv.lock
Every run writes an output.xml — the machine-readable record of what happened.
The log.html and report.html are generated from it. That means you can
regenerate and reshape results after a run, without re-running anything,
using rebot.
Two everyday uses:
- Combine several outputs into one report — the natural fit for suites run separately (or in parallel shards, next chapter).
- Merge a rerun of failures back into the original result
(
rebot --merge) — the CI pattern for retrying flaky tests without re-running the whole suite.
Task 1 — Produce two separate outputs
Section titled “Task 1 — Produce two separate outputs”Run the two suites, each to its own output file:
uv run robot --outputdir results --output alpha.xml checks/alpha.robotuv run robot --outputdir results --output beta.xml checks/beta.robotrobot --outputdir results --output alpha.xml checks/alpha.robotrobot --outputdir results --output beta.xml checks/beta.robotpoetry run robot --outputdir results --output alpha.xml checks/alpha.robotpoetry run robot --outputdir results --output beta.xml checks/beta.robotDone when
results/alpha.xml and results/beta.xml both exist.
Task 2 — Combine them into one report
Section titled “Task 2 — Combine them into one report”Now fold both outputs into a single combined result with rebot:
uv run rebot --outputdir results --output combined.xml results/alpha.xml results/beta.xmlrebot --outputdir results --output combined.xml results/alpha.xml results/beta.xmlpoetry run rebot --outputdir results --output combined.xml results/alpha.xml results/beta.xmlTwo separate runs, then one rebot folds them into a single report:
results/combined.xml (and its log.html/report.html) now covers all four
tests from both suites — no test was re-run.
Done when
the combined output holds all four tests, all passing.
Check your understanding
Quick recall. Your first answer stays in this browser; the quiz never blocks your progress.
rebotworks from…rebotregenerates and reshapes reports fromoutput.xml— no tests re-run.Show the answer
Answer: a saved
output.xml—rebotregenerates and reshapes reports fromoutput.xml— no tests re-run.rebot --mergeis the pattern for…Merge updates the original result with a rerun — the CI approach to retrying flaky tests.
Show the answer
Answer: folding a rerun of failures back into the original result — Merge updates the original result with a rerun — the CI approach to retrying flaky tests.
Key terms
- rebotcommand
- Regenerate/combine reports from saved
output.xmlfiles. - --mergecommand
- Fold a rerun of failures back into an earlier result.