Portrait Home

Test-Driven and Behavior-Driven Development for Web Applications


Traditional software project often encounter problems of staying within the budget and fully satisfying the customer. Agile software development uses lightweight methods trying to solve these problems. Furthermore it puts higher priority on stable and maintainable software compared to a comprehensive documentation.

Test-Driven development an agile development method which was introduces during the creation of extreme programming. Tests are used to motivate the software design and the functionality of the application. Because Test-Driven development often was only to benefit from its resulting test suite Dan North created in 2004 Behavior-Driven Development. Initially it was just to remove the prominent position of the word „test“ but he later developed a full test framework which allows developers to describe features in the domain specific language of their customers and use them directly as acceptance test for the software. Today Behavior-Driven Development has evolved into an agile development process of it's own.

Both methods build around repeating cycles in which small pieces of code are developed in fast iterations. At the end of each cycle the newly created code is refactored to remove code duplications or so called smelly code.

During the developed example project it became obvious that it is not enough to just use the available methods without knowing how they are applied correctly. Also the benefits of using either Test-Driven or Behavior-Driven Development become bigger after some time when it becomes more obvious how the design is supposed to be motivated by the tests. On the other hand it became apparent that not every part of a typical web application can easily be developed in a test first approach.