Software development · Software testing

Correction

In Spanish: Corrección
See in the galaxyCopy link
Updated: 09/11/2026Reading: 2 min

Description

Correction in the context of test-driven development (TDD) refers to the act of modifying the code to resolve a failed test or an error. This process is fundamental to the TDD methodology, where developers first write automated tests that define the expected behavior of the software. When a test does not pass, the cause of the failure is identified and adjustments are made to the code to correct it. Correction involves not only fixing errors but also improving code quality and ensuring that it meets the established requirements. This approach promotes a constant feedback loop, where each correction is validated through tests, which helps prevent the introduction of new errors. Additionally, it fosters a culture of accountability in software development, as developers must ensure that their code not only works but also passes all defined tests. In summary, correction is an essential component of TDD that ensures the software is developed in a robust and reliable manner, aligning with the principles of quality and long-term maintenance.

History

The practice of correction in test-driven development became popular in the 1990s with the introduction of TDD by Kent Beck, who included it in his book 'Test-Driven Development: By Example' published in 2002. Since then, TDD has evolved and has been integrated into various agile methodologies, promoting continuous correction as part of the development cycle.

Uses

Correction is primarily used in software development to ensure that the code meets functional and non-functional requirements. It is common in agile environments where software quality and customer satisfaction are prioritized. Additionally, it is applied in code refactoring, where improvements are made without altering the external behavior of the software.

Examples

An example of correction in TDD could be a developer who writes a test for a function that adds two numbers. If the test fails because the function returns an incorrect result, the developer would correct the function's code until the test passes. Another example would be in a software development project where an error is detected in form validation; the developer would correct the code to ensure that the data is validated correctly before being submitted.

Glosarix on your device

Install
×
Enable Notifications Ok No