Tuesday, July 8, 2014

Start with the When

In my coaching of Agile Testing I always tell testers to "Start with the When". For those familiar with Gherkin Scripting you might catch what I'm talking about. Gherkin is known as Given-When-Then format where Given is the background, When is the action being tested, Then is the results. For example:
Given I have a magic wand
When I point it at you and wave it
Then you will turn into a frog

The key to this script is the When. It is the action which the business is paying you to build/test. By focusing on the When everyone quickly gains an understanding of what is to be being built & tested.

Doing the action will result in the Then. Cause->Effect; Action->Result; When->Then.

You are now ready to figure out all that's needed to get to the When. This is the Given. What test data is needed? Where to do you need to navigate to? Do you need test ID's? etc.. If you understand your When & Then steps the Given should fall into place.

No comments:

Post a Comment