Browse Courses

Testing Levels

This document explains the four main levels of software testing—unit integration, system, and acceptance—and describes how each fits into the traditional release cycle and environments.

A comprehensive overview of the four primary levels of software testing: unit, integration, system, and user acceptance testing (UAT). It explains the distinct scope and objectives of each level, highlighting how unit tests validate individual components, integration tests ensure correct interactions between modules, system tests verify the complete system against requirements, and UAT confirms business needs are met before release.


Introduction

Software testing is performed at multiple levels, each with a distinct scope and purpose. Understanding these levels helps ensure that software is robust, reliable, and meets requirements throughout its lifecycle.


Levels of Software Testing

There are four testing levels as shown below:

    flowchart TD
	    U[Unit Testing]
	    I[Integration Testing]
	    S[System Testing]
	    A[Acceptance Testing]
	    U --> I
	    I --> S
	    S --> A

Unit Testing

Unit testing focuses on individual units or components of a software system. The goal is to validate that each unit performs as designed. Developers write tests for both expected (happy path) and unexpected (sad path) scenarios, including error handling and exception cases. Unit tests require detailed knowledge of the module’s internals and are typically run in continuous integration pipelines.

Integration Testing

Integration testing combines individual units and tests them as a group. The purpose is to expose flaws in the interaction between integrated units, such as incorrect API usage or communication issues. This level is less concerned with internal details and more with how modules work together. Behavior-driven development is often applied at this stage.

System Testing

System testing evaluates the complete, integrated system to ensure it meets specified requirements. This is performed in a staging or pre-production environment that closely resembles production. The focus is on verifying that the entire system works as intended.

User Acceptance Testing (UAT)

User acceptance testing assesses whether the system meets business requirements and is acceptable for delivery. End users typically perform these tests in an environment similar to production, confirming that the system is ready for release.


Testing and Release Environments

Different testing levels are performed in different environments throughout the release cycle:

EnvironmentTypical Testing Performed
DevelopmentUnit testing, code commits
BuildFurther unit testing, artifact creation
TestIntegration, system, acceptance testing
Staging/Pre-ProdSystem, acceptance testing
ProductionFinal acceptance, monitoring

Artifacts such as JAR files, Python wheels, and Docker images are built and stored in repositories, then deployed and tested in progressively more production-like environments.

Testing Levels

Testing Levels

Conclusion

The software testing process includes four main levels: unit, integration, system, and acceptance. Each level plays a critical role in ensuring software quality and reliability throughout the release cycle, from development to production.


FAQ

  1. Testing the entire system for business requirements
  2. Testing individual components for correct behavior
  3. Testing how modules interact as a group
  4. Testing by end users in production
(2) Unit testing focuses on individual components and their correctness.

  1. To validate that each unit performs as designed
  2. To expose flaws in the interaction between integrated units
  3. To confirm business requirements are met
  4. To test only in production
(2) Integration testing checks how modules work together.

  1. Development
  2. Staging or pre-production
  3. Build
  4. Source code management
(2) UAT is typically performed in a staging or pre-production environment.

LevelPrimary Focus
A. Unit Testing2. Individual components
B. Integration Testing3. Interactions between modules
C. System Testing1. Complete integrated system
D. Acceptance Testing4. Business requirements and delivery
A-2, B-3, C-1, D-4.

  1. Unit testing
  2. Code commits
  3. User acceptance testing
  4. Source code management
(3) UAT is not typically performed in development.

  1. It ensures the complete system meets requirements
  2. It is only for individual modules
  3. It is performed by end users only
  4. It is not needed if unit tests pass
(1) System testing verifies the whole system’s compliance with requirements.

The level of testing performed varies throughout the phases of the traditional release cycle.

True. Different testing levels are performed at different stages and environments.