Cosmic Module

S

Qubits of DPK

March 30, 2026

Core SWE @ Google
In previous chapters, we discussed unit tests and test doubles, which focus on verifying small pieces of code.
However, modern software systems are made up of many components interacting with each other. Testing these interactions requires a broader testing approach.
This chapter explains larger tests, which verify the behavior of multiple components working together or the entire system functioning as a whole.
The central idea of this chapter is:
Larger tests verify that different components of a system work correctly together.
While unit tests validate individual pieces of code, larger tests ensure the overall system behaves correctly.

Why Larger Tests Are Necessary

Unit tests verify individual components, but they cannot confirm whether different components interact correctly.
Many real-world issues occur when systems integrate with each other.
Examples include:
  • communication between services
  • database interactions
  • API integrations
  • user workflows
Larger tests help detect issues that only appear when multiple components interact.

Types of Larger Tests

Software systems typically use several categories of larger tests.
Each type tests the system at a different level of complexity.

Integration Tests

Integration tests verify that different components work correctly together.
Example scenario:
  • a web service receives a request
  • the service queries a database
  • the service returns a response
An integration test checks whether these components interact properly.
Integration tests ensure that data flows correctly between parts of the system.

System Tests

System tests evaluate the behavior of the entire application.
These tests simulate real-world conditions where multiple subsystems operate together.
Example system test:
  • starting the full application
  • sending requests through the system
  • verifying expected responses
System tests provide confidence that the complete application works as intended.

End-to-End Tests

End-to-end tests simulate the full user experience.
These tests follow a sequence of steps that a real user might perform.
Example workflow:
  1. #
    A user logs into a website.
  2. #
    The user places an order.
  3. #
    The system processes payment.
  4. #
    The user receives confirmation.
End-to-end tests confirm that the entire workflow functions correctly.

Characteristics of Larger Tests

Larger tests differ from unit tests in several ways.
Because of these characteristics, larger tests should be used carefully.

The Balance Between Test Types

Effective testing strategies combine multiple test types.
Most tests should remain small unit tests because they run quickly.
Larger tests should focus on verifying critical system interactions.

Challenges of Larger Tests

Although larger tests provide valuable insights, they also introduce challenges.
Examples include:
Engineers must design larger tests carefully to avoid these problems.

Strategies for Effective Larger Testing

To ensure reliability, teams often follow best practices.
Examples include:
  • limiting the number of end-to-end tests
  • isolating external dependencies when possible
  • running tests in controlled environments
  • maintaining reliable test infrastructure
These practices help maintain stable testing pipelines.

Continuous Integration and Larger Tests

Larger tests are often integrated into continuous integration pipelines.
Continuous integration systems automatically run tests whenever code changes are introduced.
This ensures that integration problems are detected early.
Typical pipeline:
  1. #
    Developer submits code change
  2. #
    Unit tests run
  3. #
    Integration tests run
  4. #
    System tests run
If any tests fail, engineers are alerted immediately.

When Larger Tests Are Most Valuable

Larger tests are particularly useful for verifying:
  • interactions between services
  • critical business workflows
  • deployment and configuration correctness
  • system stability in realistic environments
These tests provide confidence that the entire system behaves correctly.

Key Lessons from Chapter 14

This chapter highlights several important ideas.
  1. #
    Larger tests verify interactions between system components.
  2. #
    Integration tests confirm communication between modules.
  3. #
    End-to-end tests simulate real user workflows.
  4. #
    Larger tests are slower and more complex than unit tests.
  5. #
    A balanced testing strategy includes both small and large tests.

Simple Explanation (For Non-Technical Readers)

Imagine building a car.
First, engineers test individual components like:
  • the engine
  • the brakes
  • the steering system
However, they must also test the entire car driving on the road.
Only then can they confirm that all components work together correctly.
Larger software tests work the same way.
They verify that the entire system functions properly when all components interact.