software-engineering testing

Overview

Software testing is performed at different levels of granularity.

1. Unit Testing

  • Scope: Individual methods, classes, or packages.
  • Goal: Verify logic of smallest testable parts in isolation.
  • Characteristics: Fast, easy to write, deterministic, high volume.
  • Method: Inputs are passed to functions and outputs checked against expectations.

2. Integration Testing

  • Scope: Interaction between modules or components.
  • Goal: Verify that different parts work together correctly (e.g., Domain + Database).
  • Characteristics: Slower than unit tests, harder to setup.
  • Focus: Interfaces and data flow.

3. System Testing

  • Scope: The entire integrated system.
  • Goal: Verify the system meets requirements from a user’s perspective.
  • Characteristics: Slowest, black-box, “real” environment.
  • Focus: End-to-end scenarios, functional and non-functional requirements.

4. Manual Testing

  • Scope: Exploratory.
  • Goal: Validation (finding bugs automated tests miss, UI/UX issues).
  • Characteristics: Non-automated, expensive, human-driven.

Comparison

FeatureUnit TestsIntegration TestsSystem Tests
SpeedVery FastMediumSlow
ControlHigh (Easy to isolate)MediumLow
RealismLow (Fake dependencies)MediumHigh
FragilityLowMediumHigh (Flaky)
VolumeManyModerateFew