Methodology > Brownfield Test-Driven Development
Home | Methodology | Résumé |
Make-It-Good Strategy |
Iterative Prototyping |
Greenfield TDD |
Brownfield TDD |
Comprehensive Test Output |
Requirements Citation |
Applying Test-Driven Development (TDD) to brownfield development is relatively easy if the project was properly tested. Unfortunately, that is not often the case. Applying TDD is still the right thing to do, but it is more difficult. There is not always time to create a robust test base, but not doing so introduces quality and schedule risk. |
When asked to formalize a prototype, the first step is take is to design black-box test cases with curated inputs (i.e. not complex real-world data) to determine what the program does. What the prototype does will often be different from what it is supposed to do because it has not been properly tested. If possible, correct the prototype before formalizing it so that formal program correctness can more-easily be proven. |
Code-level unit tests should be developed after the black-box tests are in place. The unit testing process differs based on whether or not the formal program is written in the same language as the prototype. |
Same Language: For each requirement...
|
Different language: While there are still requirements to test...
|
The processes described above represent the most favorable conditions. When asked to quickly correct or enhance a large, poorly tested program, use this same process, but focus testing on the requirements you are modifying and ignore the rest. It’s an imperfect solution to an problematic situation, but it’s better than winging it. |
After testing is in place, focus on corrections or enhancements. The rest of the process is the same as greenfield TDD: Prove that the program does not do when it should do before modifying it. |
Home | Methodology | Résumé |
Copyright © 2021-2024 Spalted Software LLC