Workshop materials for WeAreDevelopers Berlin 2026.
Session: GenAI in Testing — WeAreDevelopers World Congress Date: Friday, 10 Jul 2026
Slides: GenAI-in-testing.pdf
Live site: moatazeldebsy.github.io/copilot-testing-workshop · Updated Oct 2026: what's changed in Copilot since the workshop
A hands-on workshop exploring how to use GitHub Copilot to speed up testing workflows — unit tests, API integration tests, component tests, E2E with Playwright — without sacrificing trust or quality.
The system under test is a realistic checkout pipeline: User → Cart → Discount → Fraud → Payment → Notification. Every exercise uses this same domain so all test types (unit, API, component, E2E) feel connected rather than contrived.
Friday, 10 Jul 2026 · Room R2 · 12:15 pm – 2:15 pm WEDT (UTC+02:00)
| Time | Segment | Activity | Duration |
|---|---|---|---|
| 12:15 | Intro, Setup & Tour | Welcome, prerequisites, Copilot activation, clone repo, tour the store UI and /docs |
15 min |
| 12:30 | Exercise A — Unit Tests | Use Copilot to generate tests for calculateDiscount() (3 hidden bugs); weak vs strong prompt comparison |
25 min |
| 12:55 | Exercise B — Review AI Tests | Read calculateDiscount.weak.test.ts; identify what passes but shouldn't; rewrite the weak assertions |
10 min |
| 13:05 | Exercise C — API Tests | Generate Supertest tests for the full checkout pipeline: cart → discount → fraud → payment → notification | 25 min |
| 13:30 | Exercise D — Component & E2E Tests | React Testing Library tests for StorePage; Playwright E2E checkout flow (test.fixme fill-in) |
20 min |
| 13:50 | Exercise E — CI Guardrails | Coverage gates, flaky test demo, .github/copilot-instructions.md, context engineering |
10 min |
| 14:00 | Wrap-up & Q&A | Trust Framework walkthrough, one action to take back, open discussion | 15 min |
Prerequisites: Node.js 22+, GitHub Copilot subscription
This repo is a GitHub template. Click Use this template → Create a new repository
on github.com/moatazeldebsy/copilot-testing-workshop
to get your own writable copy — needed if an exercise has you push a branch or open a PR.
A plain git clone works too if you're only following along locally.
No local setup? Use Codespaces. If Node, npm, or VS Code aren't cooperating on your machine, skip local setup entirely:
Click the badge (or Code → Codespaces → Create codespace on master on your own
copy of the repo) and wait ~1–2 minutes for the container to build. Dependencies and
the Playwright browser install automatically; VS Code opens with workshop-exercises/
as the working folder and the GitHub Copilot extension pre-installed. Then just run
npm run dev in the integrated terminal as below — it starts both the backend API and
the frontend together, and Codespaces forwards ports 3006 and 4000 automatically.
No internet access to Codespaces, or prefer to stay local? Use Docker. If you have Docker Desktop installed, this gets you the same "dependencies just work" guarantee as Codespaces, fully offline on your own machine:
git clone https://github.com/YOUR_USERNAME/copilot-testing-workshop.git
cd copilot-testing-workshop
docker compose up --buildWait for the docs, api, and web labeled logs to all report ready, then open
http://localhost:3005 (workshop docs/agenda site), http://localhost:3006 (store UI), and
http://localhost:4000/docs (Swagger API explorer). The repo is bind-mounted into the
container, so edits you make on your host are picked up live by the running dev servers —
no need to rebuild for code changes, only for dependency changes (docker compose up --build
again). Stop everything with docker compose down.
git clone https://github.com/YOUR_USERNAME/copilot-testing-workshop.git
cd copilot-testing-workshop/workshop-exercises
npm install
# Run the backend API (port 4000) and the frontend (port 3006) together
npm run dev
# Run all tests
npm test
# Run E2E tests
npm run test:e2eOpen http://localhost:3006 for the store UI and http://localhost:4000/docs for the Swagger API explorer.
Login with: alice@example.com / workshop-password
This repo's root is a separate Docusaurus site — the workshop tutorial/agenda site itself
(prerequisites, exercise walkthroughs, session flow), independent of the workshop-exercises/
hands-on app above. Run it from the repo root, not from inside workshop-exercises/:
npm install
npm run devOpen http://localhost:3005. Pages live in docs/ as MDX; the sidebar is generated from
src/data/workshopSteps.ts. Run npm run build && npm run serve to try the production build,
which is also where the offline search index is generated.
workshop-exercises/
src/
services/
calculateDiscount.ts ← Exercise A & B: function with intentional bugs
calculateDiscount.fixed.ts ← Solution reference (don't peek!)
cartService.ts ← Cart pipeline step
discountService.ts ← Discount pipeline step
fraudService.ts ← Fraud pipeline step
paymentService.ts ← Payment pipeline step
notificationService.ts ← Notification pipeline step
ui/pages/
StorePage.tsx ← Single-page store (Exercise D)
LoginPage.tsx
tests/
unit/ ← Exercise A stubs (fill these in)
api/ ← Exercise C stubs (fill these in)
components/ ← Exercise D stubs (fill these in)
e2e/ ← Exercise D Playwright stubs (fill these in)
fixtures/ ← Pre-generated backup examples
.copilot/
context/domain-rules.md ← Business rules — attach to Copilot Chat prompts
skills/unit-testing.md ← Prompt template + review checklist
.github/copilot-instructions.md ← Repo-level Copilot behavior standards
docs/tutorials/ ← Trust framework, guardrails, CI/CD, MCP/skills practice
advanced-scenarios.md
mcp-skills-practice.md
All narrative/reference documentation for the workshop lives inside workshop-exercises/ —
the root Docusaurus site reads workshop-exercises/docs/tutorials/*.md directly (a second docs
plugin instance) and renders it as the site's /tutorials pages, so there's a single source of
truth instead of a copy on each side.
.github/workflows/workshop-ci.yml checks the hands-on app on every change:
- Starter (
master) is healthy: typecheck, build, unit/API/component tests and the Playwright suite. Coverage is reported in the run summary but not gated, becausemasteris deliberately incomplete. - Solutions prove the exercises: on the
solutionsbranch, the strongcalculateDiscounttests must fail against the buggy implementation (they catch the three planted bugs), and the whole solved suite plus the E2E checkout flow must pass oncecalculateDiscount.fixed.tsis swapped in.
The 80% coverage gate you build in Exercise E is workshop-exercises/.github/workflows/test.yml. It's part of the exercise, so it lives inside workshop-exercises/ and doesn't run in this repository (GitHub only runs workflows from the root .github/workflows/). Copy it to your own project's root .github/workflows/ to use it.
Two branches, nothing to memorize: master is the practice starting point (all TODO
stubs, buggy calculateDiscount.ts); solutions has every exercise fully solved. If you
fall behind on any exercise, check out solutions and compare the matching file:
git checkout solutions
# or, to diff just one file against your own work:
git diff master solutions -- workshop-exercises/tests/api/checkout.test.ts- Backend: Node.js + Express 5 (port 4000), TypeScript, Jest + Supertest
- Frontend: React 18 + Vite (port 3006), React Testing Library, Playwright
- Auth: JWT bearer tokens
- API docs: OpenAPI 3.0 served at
/docs(Swagger UI)