24 enero 2009

Test Driven Modeling

Gilbert's Blog : Weblog

The key to successful agile model driven development is to follow test driven methods.

When you think about it, where is the majority of the effort expended when doing model driven development?
  • The bulk of code is generated from the model.
  • The test script skeletons are also generated from the model.
  • The test script execution is automated.

So, the majority of effort is spent doing modeling.

Test driven methods show that the best way to derive the requirements is to start by creating the test cases. These are concrete examples that are very easy to digest, as apposed to the more abstract use cases. I'm sure we have all had the experience, when reviewing use cases, where some one says, "I'm not really getting it, can you give me an example?". So why not focus on the examples?

Here is how test driven modeling flows with Taylor MDA and Taylor Results.
  1. Start your analysis with a context diagram with actors
  2. Model some high level business use cases (diagrams only)
  3. Identify different scenarios and divide them into test cases
  4. Elaborate the test cases in outline form using wiki text
  5. Model the elements/requirements that you discover along the way
  6. Generate the code and scripts
  7. Evolve the test case outlines into executable scripts by adding the wiki tables
  8. Customize the code where necessary to satisfy the test cases
  9. Check everything in and let your continuous integration build server execute the tests
  10. Iterate!!!
As you can see, test driven modeling reduces duplicate effort by moving test creation to the forefront where they can be used to drive the creation of the model as they evolve from outline form to executable scripts. The result is a high quality application that evolves just-in-time as the tests evolve.

And don't forget to put the working software in the hands of the customer along the way!

No hay comentarios: