To achieve the quality level explained in our Agility manifest, we make sure our coding ethics support these goals. Therefor, we strive to write our code using Test Driven Development (TDD). In our TDD workflow, we defined the following steps:

  1. Write an interface method to define the functionality we expose
  2. Write comments for the method which state the expectations and/or intentions
  3. Commit the (changes to the) interface
  4. Write test cases in an abstract test suite against the interface
  5. Commit the (changes to the) abstract test suite
  6. Write the implementation of the interface
  7. Repeat step 4 through 6
  8. Write impl specific tests in the class extending the abstract test suite
  9. Update the SVN repository to incorporate the latest changes in our local codebase
  10. Execute a full maven build:
    mvn clean install findbugs:findbugs cobertura:cobertura
  11. Commit the implementation of the interface

We try to keep the chunks of functionality as small as possible. Each iteration of the workflow ideally takes about two hours.

When writing test cases, we use the following guidelines:

  • Try to break your own code.
  • Break it in as many ways as you can imagine.
  • Low on imagination? Ask a colleague!
  • Is the code robust? Go test the expected behaviour as defined in the interface.
Last modified 8 years ago Last modified on Jul 27, 2011, 3:30:56 PM