Layered testing
UI regression, contracts, API, capacity and LLM quality live in separate suites instead of one flaky pile.
Independent lab
Omnichannel e-commerce QA lab (web + mobile + API) with an AI store assistant, Lumina. Built to practice full-stack TypeScript and a layered test strategy: E2E, contracts, API, load and LLM quality.
Open the live store, read published QA reports, or clone the monorepo and run the same suites locally — including an agentic QE setup so coding agents follow a consistent QA workflow, plus CI that gates PRs and ships evidence to GitHub Pages.
Live demo tip: the API runs on Render’s free tier, so the first catalog
request can take ~30–60s (cold start). The shop shows a splash and retries
/api/products with backoff — no manual refresh needed — then the catalog
appears automatically.
Objective and what it demonstrates: an educational store (web, mobile and API) for practicing a full QA strategy, not a production shop.
Objective: a controlled, educational lab to practice omnichannel E2E, API contracts, load testing and AI-quality evaluation — without exposing private client data. It is not a production store.
Function: a synced e-commerce store (web + mobile) with an assistant. Browse catalog, cart and chat on the hosted web, or clone the monorepo and run every suite locally.
UI regression, contracts, API, capacity and LLM quality live in separate suites instead of one flaky pile.
AGENTS.md entry point, a project-agnostic skill pack and pinned MCP servers so coding agents do QA consistently.
A PR gate, evidence published to GitHub Pages, and a scheduled canary that never blocks a PR.
An accessibility bug followed from issue to fix to regression test, traced with @atc ids.
Web and app looks: the real interface, plus the QA reports published on GitHub Pages.
Neon design system with dark mode by default (the header toggle switches to light) on both web and mobile.
What each layer covers. Each testing layer lives in its own suite, so a failure points to one clear cause.
Purchase flow + chat UI against ai-mock. Chromium, no API key.
Catalog/cart in Expo Go. Optional real LLM + judge flow.
Consumer/provider green path + isolated magicField demo break.
Health, products, cart, AI chat — plus intentional FAIL demo.
~40 s capacity: p95/p99, errors, timeouts — not model quality.
Heuristic probes + LLM-as-judge rubric scoring via OpenRouter.
Hosted web + API content probe every 6 hours. Never blocks a PR.
AGENTS.md + skill pack + MCP (@atc, @p0 smoke).
HTML evidence published on every main push.
| # | Suite | Command | Expected |
|---|---|---|---|
| 1 | Playwright | npm run test:web | 8 passed |
| 2 | Pact consumer | npm run test:contract:consumer | 3/3 |
| 3 | Pact provider | npm run test:contract:provider | Green |
| 3b | Pact demo FAIL | npm run test:contract:provider:demo-fail | Expected FAIL (magicField) |
| 4 | Newman OK | npm run test:api-postman | 0 failed |
| 5 | Newman demo FAIL | npm run test:api-postman:fail | Assert count === 999 fails |
| 6 | k6 | npm run test:load | ~40 s, thresholds OK |
Playwright specs: purchase-flow, ai-chat and
tests/architecture/catalog-cart.spec.ts (Components + Fixtures, titles carry
@atc:ATC-CART-NNN, priorities as @p0 / @p1).
How the monorepo is organized: product apps on top, six test suites and the quality platform below.
Two lanes for AI quality: a deterministic mock for stable UI checks, and a real LLM scored by a judge.
The mock answers “does chat work?”; the judge answers “is the answer acceptable for the store?”. Two lanes, two goals.
Three workflows with different roles: a blocking PR gate, published reports, and a canary that only observes.
| Workflow | Trigger | What happens |
|---|---|---|
pipeline.yml | Pull request / manual | Orchestrator: TestBuild → Smoke → Gate (manual stage=regression adds full Regression) |
synthetic.yml | Every 6 hours / manual | Canary against the hosted web + API — never blocks a PR |
qa-reports.yml | Push to main / manual | Install → run web/API/contract/load → build reports site → deploy GitHub Pages |
The qa-reports-pages concurrency group uses cancel-in-progress, so newer pushes cancel older runs.
Pages hosts QA HTML, not the store UI. Secrets are names only: OPENROUTER_API_KEY on Render and in a gitignored .env.ai-evals.
How coding agents are set up to do QA work here, with project rules kept apart from reusable skills.
How coding agents (Cursor, Claude Code, OpenCode) are set up to do QA work in this repo.
Skills never hold project values — URLs, ports and quirks live only in the
Project profile of AGENTS.md, so the same pack is reusable elsewhere.
| Piece | Where | Role |
|---|---|---|
| Entry point | AGENTS.md | Monorepo map, non-negotiables and a Project profile (URLs, commands, quirks, intentional failures) |
| Skill pack | packages/agentic-qe/ | Five project-agnostic skills; the registry says which one to load |
| Rule bridge | .cursor/rules/ | Makes the agent read AGENTS.md and the registry before QA work |
| MCP servers | .mcp.json | playwright (explore the running UI) and context7 (library docs), versions pinned |
| Test pattern | tests/e2e-web/architecture/ | Components + Fixtures, specs traced with @atc:ATC-<AREA>-NNN |
Turn a diff or story into a test plan before writing automation.
Explore a flow through UI, API and state; log findings.
Write specs with the Components + Fixtures pattern.
Aggregate evidence into GO / GO_WITH_RISK / NO-GO.
Classify a canary or CI failure and pick one next action.
A real accessibility finding followed through its issue, fix and regression test.
One finding tracked end to end, from the report to the regression test.
The cart button read Cart with 1 items and every add-to-cart button shared the
same accessible name. Logged as issues
#2 and
#3
with priority labels.
PR #7:
singular form for one item and Add to Cart: <product> names. Visible text stays first (WCAG 2.5.3 Label in Name).
@atc:ATC-CART-005 fails on the old label (Received: "Cart with 1 items") and passes on the fix; locators use the new accessible names.
The PR carried Closes #2 and Closes #3, so merging it closed both issues.
Three ways to try the lab, from no installation to a full local run.
No clone · browse the store + reports
Open the Vercel web, check catalog, cart and chat (ai-mock). Optional API and report links below.
Clone · Playwright, Pact, Newman, k6
Start the API with npm run dev, then run each suite. Suites 3–6 need the API running; k6 needs its binary.
Clone · app UI + Maestro / AI judge
Android AVD + Expo Go SDK 52, Metro and the API running. No public APK/IPA/QR.
npm install installs every workspace.
Install Chromium for Playwright, after npm install.
npm run test:web starts API + web itself: 8 passed.
npm run dev → API :3001, web :5173.
Pact, Newman and k6 against the running API.
Maestro on Expo Go; npm run reports:collect for HTML.
git clone https://github.com/haciendotestingqa/SmartShopLab.git
cd SmartShopLab
npm install
npx playwright install --with-deps chromium # macOS: npx playwright install chromium
npm run test:web # 8 tests, expected: all passed
# Local stack (API :3001 + web :5173) — keep open for suites 3–6
npm run dev
npm run test:contract:consumer
npm run test:contract:provider
npm run test:api-postman
npm run test:load
# Smoke subset that gates PRs
cd tests/e2e-web && npx playwright test tests/architecture --grep @p0
cp mobile-app/.env.example mobile-app/.env # EXPO_PUBLIC_API_URL=http://10.0.2.2:3001
npm run dev:backend # terminal 1
npm run start -w mobile-app # terminal 2 → press "a" for Expo Go
npm run test:mobile -- tests/e2e-mobile/flows/catalog-and-cart.yaml # terminal 3
npm run test:mobile:ai # real LLM + judge (needs .env.ai-evals)
Heads-up: the web suite uses the deterministic mock and needs no key. Only the AI suites
need OPENROUTER_API_KEY in .env.ai-evals — restart the backend after editing it.
smartshoplab.onrender.com/ showing Cannot GET / is expected — it is an API only.
The tools behind each layer, and the API that the apps and tests call.
App surfaces: React + Vite + Tailwind (web) · React Native + Expo SDK 52 + NativeWind (mobile) · Node/Express (API) · Node 20+ · npm workspaces.
Neon tokens #f714aa / #f97b3a / #f9d20c shared by web and mobile themes,
dark/light header toggle, Inter 400/600/700, WCAG AA contrast targets.
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check |
| GET | /api/products · /api/products/:id | Catalog · product detail |
| GET | /api/cart | Cart |
| POST | /api/cart/items | Add / set / remove (mode) |
| PATCH · DELETE | /api/cart/items/:productId | Set quantity · remove item |
| POST | /api/cart/reset | Reset cart (web E2E) |
| POST | /api/ai/chat | Lumina chat (mock or OpenRouter) |
| POST | /api/ai/judge | LLM-as-judge |