Published September 12, 2021
by Doug Klugh
Preparing for CI/CD
Ensure high test coverage by writing each unit test prior to writing the associated production code. Then the only production code that should be written is to pass that failing test. Promote Defect Localization by writing just enough of a test to demonstrate a failure. Ensure good code verification by writing only enough production code to pass the test. Employing these Test-Driven Development (TDD) practices will promote a comprehensive test suite which is essential for Continuous Integration (CI).
In addition to TDD, there are many testing activities that can (and should) occur prior to writing code — or at least at the same time. This includes identifying test cases based on requirements, designing tests in alignment with the architecture, and implementing (writing) those tests based on their designs. These Test First activities should be applied to component, integration, and system tests — which includes acceptance tests. Once the associated production code is written, these tests can then be executed and evaluated against that code.
On mature Agile teams, developers and testers work concurrently from the same requirements. Testers are involved just as much as developers in analyzing requirements, designing a solution, writing and refactoring code (tests), verifying implementation, and validating functionality. Together, developers and testers are responsible for promoting testability — building a solution that is easy to test. Software development should always be a team sport. We are not growing corn here folks.*
*No silos needed.