codingstairs
NotesEDULifeContact
⌕Search⌘K
koen

Navigation

  • Intro
  • Blog
  • Life

Get in touch

Send without signing in. Add your email if you'd like a reply.

  • Leave a message anonymously →
  • ✉ warragon112@gmail.com
  • KakaoTalk Open Chat ↗

© 2026 codingstairs

  • Notes
  • EDU
  • Search
  • Life
  • Contact
  • Legal
  • RSS
  • GitHub
EDU›Testing strategy and quality gates

Testing strategy and quality gates

Six steps to lock down regressions with vitest, pytest, Playwright, and testcontainers.

Start with Step 1 →
Difficulty
intermediate
Lessons
6

Testing strategy and quality gates

More tests do not equal safer. Absent tests do not equal faster. The real design choice is which layers to emphasise for your project size, team, and cost of an incident.

Who it's for

  • People endlessly stuck on "which test do I write here?"
  • Folks running vitest, pytest, and Playwright in one repo
  • Teams who want the CI green light to actually mean something

What you can do afterwards

  • Apply the test pyramid (80% unit · 15% integration · 5% E2E) in practice
  • Standardise vitest mocks with vi.hoisted
  • Use pytest fixtures and parametrize well
  • Run real PostgreSQL in tests with testcontainers
  • Auto-generate Playwright smoke manifests
  • Block PRs on GitHub Actions

Flow

[1] Pyramid ──▶ [2] vitest (JS) ──▶ [3] pytest (Python)
                                          │
                                          ▼
                     [6] CI gate ◀── [5] E2E ◀── [4] testcontainers

Cost and confidence rise from top to bottom. CI lands last because the gate only makes sense once every layer below is in place.

Steps

  1. Test pyramid · trade-offs — cost vs confidence · picking layers
  2. vitest basics + mock patterns — vi.hoisted · vi.stubEnv · node vs jsdom
  3. pytest · fixture · parametrize — conftest · async · coverage
  4. testcontainers — real PostgreSQL containers + idempotent seeding
  5. Playwright E2E — auto manifests · @write PROD skip
  6. GitHub Actions quality gate — PR block · artifacts · Slack

Prerequisites — getting-started + any prior test writing experience.

Lessons

  1. 1

    Test pyramid · trade-offs

    →
  2. 2

    vitest basics + mock patterns

    →
  3. 3

    pytest · fixtures · parametrize

    →
  4. 4

    testcontainers

    →
  5. 5

    Playwright E2E

    →
  6. 6

    GitHub Actions quality gate

    →

Other courses

All courses →
  • Getting Started with a Dev Environment
  • From HTML/CSS/JS to React, Next.js, Tailwind
  • Build Your First Fullstack App with Next.js 16
  • Backend with Spring Boot 4
  • Python · FastAPI · Data Pipelines
  • AI-native developer tooling — Claude Code · MCP · design tools
  • Docker · Caddy · Cloud — 10 deploy options
  • Central admin platform — many domains behind one hub
  • Local LLM · pgvector · building a RAG chatbot
  • Tauri 2 — desktop · mobile in one codebase
  • Web security foundations — JWT · OAuth · OWASP
  • PostgreSQL in depth + Redis · Kafka
  • Building public-data crawlers
  • Monorepo · SSOT · layer separation thinking