slug: test-strategy
title: "Test Strategy — Pyramids, Diamonds, and What to Test"
version: 1.0.0
description: "Design a balanced test strategy: the test pyramid, diamonds, and what to test at each layer."
category: quality-assurance
tags: [testing, test-strategy, test-pyramid, unit-tests, integration-tests, e2e]
difficulty: beginner

xp:
  read: 10
  walkthrough: 30
  exercise: 20
  quiz: 15
  quiz-perfect-bonus: 10
  game: 20
  game-perfect-bonus: 10

time:
  quick: 5
  read: 15
  guided: 45

prerequisites: []
related: [exploratory-testing, debugging-systematically]

triggers:
  - "What should I test?"
  - "What is the test pyramid?"
  - "How many unit tests do I need?"
  - "What's the difference between unit, integration, and e2e tests?"

visuals:
  diagrams: [diagram-mermaid, diagram-flow]
  quiz-types: [quiz-drag-order, quiz-matching]
  game-types: [classify, speed-round]
  playground: javascript
  slides: true

sources:
  - url: "https://martinfowler.com/articles/practical-test-pyramid.html"
    label: "The Practical Test Pyramid (Martin Fowler)"
    type: docs
  - url: "https://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/0321146530"
    label: "TDD by Kent Beck (book)"
    type: book
