Test Case Prose

19 01 2009

Hey readers

I haven’t blogged much recently. With Christmas, a week long break and my very busy work schedule, it’s understandable why I haven’t had much to say of late.

Today, I have an interesting situation. I’ve been in this situation before but it’s important yet again so I thought I’d share.

Normally, test cases are written to be reproducible, unambiguous, and properly cover the appropriate requirements. All fair enough. Today, I’m looking at branching.

What’s branching? Well, it’s a word that I just decided well describes where test cases explore different execution paths from the same point.

Here’s an example of what I’m talking about. If for instance, you want to test functionality to save a record when the window is closed. Say your application displays this record as a popup window and has both a Close button on the canvas and a X button in the top-right corner. Branching would be to test for both the Close button and the X button.

So, now you know what I’m talking about, let me put the problem to you. How do you feel about branching inside a test case? What’s more, the branching is at the discretion of the tester? This is the issue that is facing me again today.

Here’s the instructions for the step exercising the scenario I put above…

Close the window using either the Close button or the X button

This is what I’m facing as part of a review. I did look on Google for an answer to this but after little success, I thought I’d talk to all of you.

For my part, I have always felt this discretionary branching within a test case fails the reproducible requirement of every test case, so I always avoid it. Tell me what you think, leave a comment and we can have a discussion or use the poll below.

I look forward to hearing from you!

Kind Regards
Glenn