A tagged smoke suite
Chapter lab: Robustness
This lesson continues in the same lab as the lesson before it. If you don’t have it yet, download it here.
Download ch10-web-robustness.zip
Or fetch and unpack it from a terminal in VS Code:
curl -fsSLO https://manykarim.github.io/robotframework-essentials-web/labs/ch10-web-robustness.zip && unzip -q ch10-web-robustness.zip && rm ch10-web-robustness.zipInvoke-WebRequest https://manykarim.github.io/robotframework-essentials-web/labs/ch10-web-robustness.zip -OutFile ch10-web-robustness.zip; Expand-Archive ch10-web-robustness.zip -DestinationPath .; Remove-Item ch10-web-robustness.zipOpen the folder in VS Code with code rfe-ch10-web-robustness (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.
Also needed for this lab
Install Node.js (an LTS release), then run once — it downloads a browser engine (large):
uv run rfbrowser init chromiumrfbrowser init chromiumpoetry run rfbrowser init chromiumStart the RF Demo Shop in its own terminal and keep it running while you work:
uv run python demo_app/serve.pypython demo_app/serve.pypoetry run python demo_app/serve.pyWhat's inside
Directoryrfe-ch10-web-robustness/
Directory.vscode/
- extensions.json
Directorychecks/
- smoke.robot
Directorydemo_app/
- api.py
- serve.py
- store.py
- web.py
Directoryresources/
- shop.resource
- .gitignore
- .python-version
- LAB.md
- pyproject.toml
- README.md
- requirements.txt
- uv.lock
A smoke test is the fast, critical check you run first: is the app up, and
does the core journey work? Tag it smoke so you can run only those tests with
robot --include smoke before committing to the full suite.
Close Part 2 by writing a tagged reachability check.
Task 1 — Tag a reachability test as smoke
Section titled “Task 1 — Tag a reachability test as smoke”Goal: create checks/shop_smoke.robot with one smoke-tagged test that signs
primary_user in and confirms the catalog is reachable.
Here is the same tagged reachability check as a different user. Adapt it to
primary_user.
Worked example — adapt it, don’t copy it
*** Settings ***Library BrowserResource ../resources/shop.resource
*** Test Cases ***Reviewer Can Reach The Shop [Tags] smoke New Browser chromium headless=True New Context New Page ${BASE_URL}/login Fill Text data-testid=login-username reviewer_user Fill Text data-testid=login-password learning-password Click data-testid=login-submit Get Text data-testid=catalog-title contains Catalog Close BrowserDone when
Shop Is Reachable carries the smoke tag.
Hint 1
Give the test a [Tags] smoke line first so --include smoke selects it.
Hint 2
Sign in as primary_user and confirm you arrived with
Get Text data-testid=catalog-title contains Catalog.
Solution
*** Settings ***Library BrowserResource ../resources/shop.resource
*** Test Cases ***Shop Is Reachable [Tags] smoke New Browser chromium headless=True New Context New Page ${BASE_URL}/login Fill Text data-testid=login-username primary_user Fill Text data-testid=login-password learning-password Click data-testid=login-submit Get Text data-testid=catalog-title contains Catalog Close BrowserTask 2 — Run it green
Section titled “Task 2 — Run it green”Run only the smoke tests:
uv run robot --include smoke checksrobot --include smoke checkspoetry run robot --include smoke checksDone when
the smoke test passes — the shop is up and the core journey works.
That closes Part 2. Part 3 steps away from the browser to test an API directly — the same Robot Framework, with faster feedback and no page to render.
Check your understanding
Quick recall. Your first answer stays in this browser; the quiz never blocks your progress.
Why tag a test
smoke?A smoke tag lets you run the critical few quickly —
robot --include smoke— before the full suite.Show the answer
Answer: so you can run just the fast, critical checks with
--include smoke— A smoke tag lets you run the critical few quickly —robot --include smoke— before the full suite.A web smoke test should verify…
Smoke = the critical path works: the app is up and the core journey (sign in → catalog) succeeds.
Show the answer
Answer: the shop is reachable and a signed-in user lands on the catalog — Smoke = the critical path works: the app is up and the core journey (sign in → catalog) succeeds.
Key terms
- web smoke testconcept
- A fast, tagged check that the app is up and the core journey works.