Module 11 · Python for SDETs

Capstone: a full
API + UI suite

Everything from Modules 0–10, assembled into the project you'd show an interviewer

fixtures API + UI data-driven report + CI
AI with Rufat
Coverage across layers, not one clever test

API happy path

Products list/read + an order with the right total (M3, M5)

🚫

API negative

400 / 401 / 404 / 409 on bad input (M4)

🖱️

UI flow

Log in through the browser with a page object (M6, M7)

🗃️

Data-driven

A login matrix from a JSON file (M8)

🧱

Structure & isolation

Fixtures, reset_db, per-area folders (M2, M5, M9)

🤖

Reporting & CI

An HTML report, green on every push (M9, M10)

AI with Rufat
The layout is the design

A reviewer can read the tree and know what it does

python-sdet/
├── .github/workflows/tests.yml # CI (M10)
├── pages/login_page.py # POM (M7)
├── tests/
│ ├── conftest.py # base_url / api / reset_db
│ ├── data/login_cases.json # data-driven (M8)
│ ├── api/ test_products · test_orders · test_negative · test_login_matrix
│ └── ui/ test_login # Playwright + POM (M6, M7)
├── pytest.ini # markers + pythonpath
└── requirements.txt # pinned deps
🗂️Every folder has one job — so a new test has an obvious home, and onboarding is reading a tree instead of a wiki.
AI with Rufat
Both directions, both layers
API — happy path + negative
@pytest.mark.api
def test_order_total(reset_db, base_url, api):
r = api.post(f"{base_url}/api/orders", …)
assert r.status_code == 201
assert r.json()["total"] == pytest.approx(29.99*2)
# bad password -> 401
UI — a scenario via the page object
@pytest.mark.ui
def test_login_flow(page, base_url):
(LoginPage(page, base_url)
.goto()
.login("customer@test.io", …))
expect(page.get_by_test_id("nav-logout")).to_be_visible()
AI with Rufat
Slice by marker, full suite with a report
bash
pytest -m api # just the API layer
pytest -m ui # just the browser
pytest -ra --html=report.html \
--self-contained-html
Fast feedback locally by marker while developing; the whole suite with a report before you push.
🚀Push with the Module 10 workflow and CI runs it all on every PR — report and all. A suite you can hand to a team, or a hiring manager.
AI with Rufat
🎉

You've finished
Python for SDETs

From pip install pytest to a CI-gated API + UI suite — the toolkit real SDET roles use every day

🧰
You can now
pytest, requests, Playwright, fixtures, POM, data-driven, reporting, CI
🧩
Extend it
Add a CRUD lifecycle + a negative UI test, then point it at your own app
💼
Your portfolio
This capstone is the project to show a hiring manager
AI with Rufat
← / → · space