liveBook · Manning

Testing pyramid

The testing pyramid is a software-testing model that favors many fast, focused lower-level tests and progressively fewer, broader, slower tests at higher levels.

How 8 Manning books explain it

Unit Testing Principles, Practices, and Patterns

The Test Pyramid is a testing strategy that recommends a relative distribution of unit, integration, and end-to-end tests, with more tests in lower layers.

How it is used
Balances fast feedback, regression protection, refactoring resistance, and maintenance cost when allocating test types.
How deep it goes
Defines the three-layer ratio and allocation rules, but leaves the exact mix to project complexity.
Examples
Uses pyramid layers, business-scenario edge cases, happy paths, controllers, domain models, databases, and dependency boundaries.
What you can do after
Apply it by shifting edge-case coverage toward unit tests and reserving integration tests for system-level paths and uncovered cases.

Read how Unit Testing Principles, Practices, and Patterns explains testing pyramid →

Contract Testing in Action

The test automation pyramid is a model that recommends distributing automated tests across unit, integration, and end-to-end layers, with fewer tests at slower and more expensive higher layers.

How it is used
Guides teams toward balanced automated-test coverage by matching test scope with feedback speed, isolation, integration confidence, and user coverage.
How deep it goes
Defines three layers, adds contract testing between unit and integration tests, and contrasts the model with the ice cream cone anti-pattern.
Examples
Uses login validation, authorization, service slowdown, cookie sessions, and contrasting pyramid and ice cream cone diagrams.
What you can do after
Evaluate automated-test placement and distribute failures across unit, contract, integration, and end-to-end checks.

Read how Contract Testing in Action explains testing pyramid →

Shipping Go: Develop, deliver, discuss, design, and go again

A testing pyramid is a testing strategy with many fast unit tests at the base and progressively fewer broader, more expensive tests above them.

How it is used
Guides automated quality checks by concentrating feedback near the code and expanding coverage toward integrated system behavior.
How deep it goes
Explains test layers, sequencing, cost, determinism, and practical starting points, but stops short of full-system UI-to-API implementation.
Examples
Uses deterministic balance and error-rate calculations, mocked dependencies, database integration, service integration, load testing, and full-system workflows.
What you can do after
Apply via automated unit tests first, then add integration and end-to-end checks in progressively smaller, later-running layers.

Read how Shipping Go: Develop, deliver, discuss, design, and go again explains testing pyramid →

Django in Action

A testing pyramid is a model that organizes software tests into levels based on scope, speed, and execution cost.

How it is used
Organizes automated tests into categories that separate component checks from cooperation, requirements, and interface checks.
How deep it goes
Defines unit, integration, and behavioral testing, then notes UI testing without detailing its implementation.
Examples
Uses a testing-category figure, single-function tests, database writes, Cucumber, and Django UI testing as concrete reference points.
What you can do after
Evaluate which testing level matches a component, interaction, requirement, or user-interface concern.

Read how Django in Action explains testing pyramid →

Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

The testing pyramid is a model that organizes tests into layers, with broader and generally slower tests placed above narrower and generally faster tests.

How it is used
Guides automated test-suite composition for microservices and provides fast feedback before deployment.
How deep it goes
Defines three testing levels, their relative quantities, interfaces, and tools, but does not detail test implementation beyond these practices.
Examples
Uses isolated functions, whole microservices, HTTP or message interfaces, and a Docker Compose application tested through a frontend.
What you can do after
Apply via Jest, Docker Compose, Playwright, and CI/CD to build layered automated tests with rapid local feedback.

Read how Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform explains testing pyramid →

Build Financial Software with Generative AI (From Scratch)

A testing pyramid is a model that organizes software tests by scope, with numerous fast isolated tests at the base and fewer slower broader tests toward the top.

How it is used
Guides developers toward a broad base of fast isolated tests and a smaller set of slower broader checks.
How deep it goes
Defines major layers and their trade-offs, but defers additional testing categories and fuller breakdowns.
Examples
Uses a FastAPI GET /files endpoint, TestClient assertions, a BDD feature, and pytest-bdd step definitions.
What you can do after
Apply it via FastAPI TestClient and pytest-bdd while choosing test scope according to isolation, speed, dependencies, and fragility.

Read how Build Financial Software with Generative AI (From Scratch) explains testing pyramid →

Think Like a Software Engineering Manager

The testing pyramid is a test-suite design framework that emphasizes an appropriate distribution of automated tests across testing levels.

How it is used
Guides automated test-suite design and regression protection before engineering changes reach users.
How deep it goes
Defines three testing levels and their pyramid positions, but does not provide implementation details or distribution ratios.
Examples
Uses a three-level pyramid figure, commit-triggered tests, and Netflix Chaos Monkey as testing-automation examples.
What you can do after
Apply it by building repeatable automated tests and integrating them into the development workflow.

Read how Think Like a Software Engineering Manager explains testing pyramid →

gRPC Microservices in Go

The testing pyramid is a test-distribution model that places isolated unit tests below integration tests and end-to-end tests, with progressively fewer tests and greater execution cost at higher levels.

How it is used
Guides the distribution of microservice tests to balance fast feedback, application-flow confidence, and testing infrastructure cost.
How deep it goes
Defines three test levels and explains their isolation, dependencies, execution speed, and cost, but does not prescribe exact percentages.
Examples
Uses an Order service, mocked dependencies, a real database, test containers, and complete application flows as testing examples.
What you can do after
Apply it to arrange unit, integration, and end-to-end suites for faster feedback while preserving cross-component verification.

Read how gRPC Microservices in Go explains testing pyramid →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.