Loading ...
Sorry, an error occurred while loading the content.

92845VS: [XP] Test Driven Exceptions

Expand Messages
  • lasse.koskela@accenture.com
    Jun 3, 2004
    • 0 Attachment
      > > Lasse:
      > > ... which inevitably
      > > leads to having some catch-clauses without matching tests (*until I get
      > > to writing the tests for those exceptional cases*). Obviously the time
      > > frame isn't too long, but it's still not technically test-first.
      > John:
      > For the sake of argument, I'll take that last statement to mean that you
      > write the tests for the newly created exceptional cases immediately after
      > making the "normal" case work.

      Yes. "Immediately" being in the range of a couple of minutes.

      > John:
      > Part of the larger question is where the line is drawn between the
      > pro-activeness of "test first design" driven test writing and, in your
      > example, the reactive "high-quality software" driven test writing
      > (motivated by the concern for high-percentage code coverage).
      >
      > Obviously (I hope), it's possible to take a completely pro-active stance.
      >
      > However, in terms of the more blended approaches, one technique that hasn't
      > been mentioned so far is the "backtracking is okay, listen to what the code
      > is telling you approach". Basically, in your example, once you started
      > writing that code which would introduce the exceptional cases, you could
      > backtrack (out of the existing "normal" code test (put it on the top of
      > your task stack)) and write the necessary test(s) just for the exceptional
      > case(s) and then come back to the "normal" case test and continue.

      I hadn't thought of that. My initial gut feeling is that such backtracking would still be a bit backwards in terms of importance -- the way I see it, the normal case has more value to the customer than the exceptional cases.

      - Lasse -



      This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.


      [Non-text portions of this message have been removed]
    • Show all 15 messages in this topic