BDD = TDD++

We all know the benefit of having a Test Driven Development (TDD) grip on your application code. That is the only way to ensure that your application code will endure the addition of new features and functionalities without the fear of breaking existing application code and cascading the effect through the application.

I see Behavior Driven Development (BDD) as an upgraded TDD, which sees the code from their behavior standpoint. This paradigm enables the developer to focus ofwhy the code should be created, rather than the technical details of how the code should be tested, or even worse just achieving meaningless statistical test coverage.

Because of the above, the TDD paradigm is considered agile since it forces the developer to think about the requirements before starting the actual code implementation. This cuts down the noise of statistical code test coverage beforehand, focusing on the actual behavior of the code.

In BDD, just like in TDD, the tests or specifications are written before the actual code is written. This means than at first the tests fails (since there is no application code to be tested) and after the test or the behavior of  the code is setup, the application code is written, and the test is run. If the test succeeds, the circle is closed, and the process is done.

There are a number of frameworks that supports this kind of development in the Java world, one of them is Instinct, which is what I used in the development of the JUGMK Academy application, you may get a look of the BDD tests here.

blog comments powered by Disqus