Skip to main content

Automated Testing

Writing and running tests for individual units or components of the software.

Also Known As

Related

Addresses / Mitigates

  • Implementation Risk: Ensures that individual components work correctly and detects regressions early in the development cycle.
  • Complexity Risk: Aids in refactoring by ensuring that functionality survives the change.

Attendant Risks

  • Schedule Risk: Writing and maintaining unit tests can be time-consuming.
  • Complexity Risk: Managing a large suite of unit tests can add to the complexity.
  • Reliability Risk: Creates dependencies on testing frameworks and tools.
  • Internal Model Risk: Unit Testing and code coverage can give false assurances about how a system will work in the real world.

Used By

  • DevOps: Automated Testing and Test Driven Development (TDD) validate code changes to ensure they work as expected.
  • Extreme Programming: XP emphasizes writing tests before coding, ensuring that the software meets its requirements from the start.
  • Lean Software Development: Lean ensures that quality is built into the product from the beginning.
  • Scaled Agile Framework (SAFe): SAFe emphasises built-in quality through test automation at all levels.
  • Scrum: Unit testing is part of the Definition of Done in Scrum.

Description

"Unit testing is a software testing method by which individual units of source code—sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures—are tested to determine whether they are fit for use." - Unit testing, Wikipedia

Unit testing involves writing and running tests for individual units or components of the software to ensure they function as expected. This practice helps in identifying and fixing issues early in the development process, making the codebase more reliable and maintainable.

Variations

Test TypeDescriptionReference
Unit TestingTesting individual functions or methods in isolation.Unit Testing, Wikipedia
Component TestingTesting larger components that may include multiple units.Component Testing, Wikipedia
Snapshot TestingComparing output against a stored snapshot to detect changes.Snapshot Testing, Jest

See also: Development Process, Unit Testing (Meeting Reality)

Used By

DevOps

DevOps

A set of practices that combines software development (Dev) and IT operations (Ops) to shorten the development lifecycle and provide continuous delivery with high software quality.

Why: Automated Testing and Test Driven Development (TDD) validate code changes to ensure they work as expected.

Uses:
  • Automated Testing
  • Test Driven Development (TDD)
Extreme Programming

Extreme Programming

An Agile software development methodology that emphasizes customer satisfaction, teamwork, and frequent delivery of small, functional software increments.

Why: XP emphasizes writing tests before coding, ensuring that the software meets its requirements from the start.

Uses:
  • Test Driven Development (TDD)
  • Unit Testing
Lean Software Development

Lean Software Development

An Agile software development methodology that emphasizes eliminating waste, building quality in, creating knowledge, deferring commitment, delivering fast, respecting people, and optimizing the whole.

Why: Lean ensures that quality is built into the product from the beginning.

Uses:
  • Build Quality In
Scaled Agile Framework (SAFe)

Scaled Agile Framework (SAFe)

A set of organization and workflow patterns for scaling lean and agile practices across large enterprises.

Why: SAFe emphasises built-in quality through test automation at all levels.

Uses:
  • Built-in Quality
  • Test-First
Scrum

Scrum

An Agile framework for managing and completing complex projects.

Why: Unit testing is part of the Definition of Done in Scrum.

Uses:
  • Unit Testing