Skip to content

Dry run

Chapter lab: Running with confidencech23-running-with-confidence.zip · 15 KB

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:

Terminal window
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.zip

Open 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:

Terminal window
uv sync
Terminal window
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Keep the environment active in every terminal where you run lesson commands.

Terminal window
poetry install --no-root

Python 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

Before committing to a full run — which might take minutes and touch real systems — you can dry run it. --dryrun parses and validates the suites: every keyword must exist, its arguments must match, and every import must resolve. But nothing executes — no keyword actually runs.

It is the fastest quality gate there is: a typo’d keyword name or a broken import is caught in a blink, without waiting for a real run.

Task 1 — Validate the suites without running them

Section titled “Task 1 — Validate the suites without running them”
Run

Dry-run the bundled checks/ suites:

Terminal window
uv run robot --dryrun checks
Terminal window
robot --dryrun checks
Terminal window
poetry run robot --dryrun checks

It finishes almost instantly. Nothing is logged from the keywords because none of them ran — Robot Framework only checked that everything is wired correctly.

Done when

the dry run validates the suites (structurally green).

Run

Now run one of them for real:

Terminal window
uv run robot --outputdir results checks/alpha.robot
Terminal window
robot --outputdir results checks/alpha.robot
Terminal window
poetry run robot --outputdir results checks/alpha.robot

The contrast is the whole point — dry run validates in a blink and logs nothing from the keywords; the real run executes them:

uv run robot --dryrun checks/alpha.robotrobot --dryrun checks/alpha.robotpoetry run robot --dryrun checks/alpha.robot
2 tests, 2 passed, 0 failed
uv run robot --outputdir results checks/alpha.robotrobot --outputdir results checks/alpha.robotpoetry run robot --outputdir results checks/alpha.robot
Order Is Created | PASS |
Order Ships | PASS |
2 tests, 2 passed, 0 failed

Same suite: dry run answered “is this valid?”, the real run answers “does it pass?”.

Done when

the real run of checks/alpha.robot passes.

Check your understanding

Quick recall. Your first answer stays in this browser; the quiz never blocks your progress.

  1. What does --dryrun do?

    Show the answer

    Answer: validates structure (keywords, arguments, imports) without executing — Dry run parses and checks the suites but executes nothing — the fastest way to catch typos and broken imports.

  2. A dry run will catch…

    Show the answer

    Answer: a misspelled keyword name or broken import — It checks structure, not behaviour: missing keywords/imports are caught; a wrong expected value is not (nothing runs).

Key terms

--dryruncommand
Validate suites (keywords, args, imports) without executing them.

All terms in the glossary →