Testing


Michael Feathers

Code without tests is bad code. It doesn't matter how well written it is; it doesn't matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don't know if our code is getting better or worse.

Michael Feathers


In Agile development, testing plays a crucial role in ensuring the quality, reliability, and continuous improvement of software. Unlike traditional development models where testing is conducted only at the end of the development cycle, Agile integrates testing throughout the entire process. Testing is woven into every sprint, enabling early detection of defects, continuous feedback, and alignment with rapidly evolving requirements. This iterative, collaborative approach to testing helps Agile teams maintain a steady pace of delivery without sacrificing quality, as each feature or function is verified immediately after development.

Agile testing practices, such as Test-Driven Development (TDD), Behavior-Driven Development (BDD), and automated regression testing, support the agile goal of delivering functional, high-quality increments in short cycles. By testing early and often, Agile teams can respond quickly to changes, fix issues before they compound, and ensure that the product remains stable and usable as it evolves. Testing in Agile isn’t just the responsibility of dedicated testers; it’s a collaborative effort involving developers, testers, and sometimes even stakeholders, who contribute to defining and validating requirements.

TDD cycle

Writing unit tests

Dependency injection

Mocking dependencies

Testing frameworks


Table of contents