The challenge that test-first patterns are intended to solve include:
- poor code quality
- difficulty testing new and old software
- regression testing
A process anti-pattern is when testing lags development.
Test-first is the name that encompasses defining tests before undergoing development work. Test-first encompasses both the decomposition of requirements into small chunks and design and coding itself. The decomposition of requirements is often called Acceptance Test-Driven Development (ATDD). A similar approach is called Behavior Driven Development- BDD. Coding with a test-first approach is often called Unit Test-Driven Development (UTDD).
The essence of test-first is to understand what you are going to build before doing any building. A measure of effectiveness for ATDD is are executable specifications available prior to committing to writing the stories which are in the product backlog. A measure of effectiveness for UTDD depends upon whether different people are doing coding and testing. The ideal situation is when a developer uses UTDD to create executable tests prior to writing code. These should be done in small slices. When different people do code and test, it is important for them to work in tight synchronization. The lag between starting development and completion of automating tests is an indicator of poor process.
Learn more about ATDD here:
- Acceptance Test-Driven Development (ATDD) using Behavior-Driven Development (BDD)
- Test-Driven Development: ATDD and UTDD
- The Benefits of Acceptance Driven Development Using Behavior Driven Development
Return to FLEX Patterns