Pensum om Unit, Integration og E2E testing til Mercantec — hostet på test.mercantec.tech.
Bygget med VitePress — markdown-baseret læringsplatform med interaktiv quiz, mermaid-diagrammer og eksempler fra h4-mags.
| Emne | Indhold |
|---|---|
| Introduktion | Test-pyramiden, hvorfor teste |
| Unit testing | AAA, mocking, TDD, interfaces |
| Integration testing | WebApplicationFactory, test-database |
| E2E testing | Bruno, flows, Docker og CI |
| CI og CD | GitHub Actions, DevOps-loopet |
npm install
npm run docs:devnpm run docs:build
npm run docs:previewLokal (med host-port):
docker compose -f docker-compose.yml -f docker-compose.local.yml up -d --build| Tjeneste | URL |
|---|---|
| Web | http://localhost:8080 |
| Health | http://localhost:8080/health |
Produktion (Dokploy): kun docker-compose.yml — ingen host-porte; Traefik router på test.mercantec.tech.
-
Push til GitHub (
Mercantech/Test) -
I Dokploy: Create → Compose og vælg repoet
-
Miljøvariabler (se
.env.example):Variabel Værdi FRONTEND_DOMAINtest.mercantec.tech -
Deploy:
docker compose up -d --build
Routing følger Mercantec-mønsteret:
- Cloudflare —
*.mercantec.tech(wildcard CNAME → tunnel) - Tunnel ingress —
*.mercantec.tech→http://localhost:80 - Traefik (Dokploy) —
Host(test.mercantec.tech)→ container port 80
dokploy-network skal findes på serveren (oprettes automatisk af Dokploy).
Alt pensum ligger i docs/ som markdown:
docs/
introduktion/
unit-testing/
integration-testing/
e2e-testing/
ci-cd/
Diagrammer ligger i docs/public/images/.
- VitePress — statisk site generator
- Vue 3 — interaktive komponenter (quiz, læringsmål)
- Mermaid — diagrammer i markdown
- nginx — production server i Docker