Posts

Showing posts from January, 2019

Behavior Driven Development & Testing

Image
Test Driven means great! The aim of Test-Driven Development (TDD) is to minimize the number of mistakes in the code by forcing the developer to analyze the test cases before writing the code. Its main value comes from engaging the programmer in considering all the use cases before writing the production code. The traditional process of writing code using TDD involves following steps: Plan what you want to do! (What’s given? What’s the result?) Write your test! ( Arrange/Act/Assert ) Realize the test fails… Make it green (by writing your code) Then follow the aforementioned steps until your functionality is implemented. The obvious drawback is that it takes time to think of the test cases, so the implementation process is slower than writing the same code without TDD , which again is slower than writing the same code without writing any tests, which is again slower than not testing your code at all… There is a pattern to be seen there. It may be consid