Design for Testability

Software testing is a major activity in any software development project and a large part of the budget is spent on it. If we want to effectively spend your money, the ease of software testing should be addressed when you design your system in the early stages of building your applications. In this article, Gil Zilberfeld explains that thee adoption of test first practices like Test-Driven Development (TDD) or Acceptance Test-Driven Development (ATDD) by the majority of agile teams shows how test automation needs are addressed from the initial steps of system concepts. As an additional benefit, it is easier to evolve a testable system because you can add features knowing that existing ones did not break.

The main idea of the test-first approach is tests are written before the production code. When you add a new feature to the system, automated test cases are written first to make sure the functionality written is correct and answers the needs expressed in the requirements. Being able to automate tests and having a good system design is the best way to achieve high-quality in any code, which enables you to effectively enhance and extend it. Power tools are there to help you. They enable writing tests to most common design patterns existing in code as-is. You start writing tests almost immediately, decoupling testability from design.