Catalog
concept#Product#Delivery#Quality

Test Driven Development (TDD)

Test Driven Development is a development technique where tests are written before the actual code.

Test Driven Development (TDD) is an iterative process where tests for a functionality are written before the implementation occurs.
Established
Medium

Classification

  • Medium
  • Technical
  • Architectural
  • Advanced

Technical context

CI/CD PipelinesVersion Control SystemsProject Management Tools

Principles & goals

Early TestingIterative DevelopmentIncrease Code Quality
Build
Team

Use cases & scenarios

Compromises

  • Insufficient test coverage
  • Misunderstandings of requirements
  • Loss of focus on the goal
  • Conduct regular code reviews.
  • Continuous testing throughout the development process.
  • Maintain documentation of test cases.

I/O & resources

  • Development Requirements
  • Testing Tools
  • Developer Knowledge
  • Functional Software
  • Documented Tests
  • Deployable Code

Description

Test Driven Development (TDD) is an iterative process where tests for a functionality are written before the implementation occurs. This approach promotes quality and maintainability of the code and helps to identify bugs early.

  • Increased Software Quality
  • Early Bug Detection
  • Improved Code Maintainability

  • Higher initial effort
  • Possible project delays
  • Experience required with TDD

  • Error Rate

    Measure of the number of bugs found in the software.

  • Test Coverage

    Percentage of code covered by tests.

  • Development Costs

    Total cost of software development including tests.

Online store with TDD

An online store uses TDD to develop new features while ensuring a high standard of quality.

Mobile App Development

A team develops a mobile app and uses TDD to optimize user experience.

Web Development Project

In a web development project, TDD is used to ensure that new lines of code do not introduce existing errors.

1

Define steps for introducing TDD.

2

Train the team in TDD techniques.

3

Implement initial TDD projects.

⚠️ Technical debt & bottlenecks

  • Insufficient test coverage.
  • Obsolete test cases.
  • Lack of documentation of tests.
Technical DebtUnclear RequirementsInefficient Testing Practices
  • Not versioning test data.
  • Not updating tests regularly.
  • Too many dependencies in tests.
  • Not adapting one-off tests.
  • Low team acceptance.
  • Focus on test coverage over code quality.
Knowledge in software developmentTesting strategiesAgile methods
TestabilityMaintainabilityDevelopment Speed
  • Resource Availability
  • Team Size
  • Budget Constraints