Wednesday, March 28, 2012

Program, thou shalt behave!

In this presentation, a DSL for behaviour-driven development was demonstrated.  Behaviour-driven development is an evolution of test-driven development, where behaviours are features requested by customers.

The DSL provides a simple syntax for customers to specify stakeholder requests and acceptance criteria in natural language.  Developers can then take these requests and implement code to fulfill the specification.  For specific implementation details, developers can use a specification DSL to efficiently specify and implement the specs necessary to for stakeholder requests.  Both DSLs generate JUnit test cases that can be evaluated to assess whether the specs or acceptance criteria have been achieved.  The DSLs also provide a means of supplying multiple examples of inputs and expected outputs.

Since we are often developing UI-centric applications, my experience has been that we tend to not use test-driven development, in particular because UI logic is so hard to test.  However, for systems that have been able to adopt a test-first methodology in an Agile environment, I think that DSLs like this will prove to be a useful way to simplify the writing of test cases and improve communication with customers.


No comments:

Post a Comment