Instructional vs. Intentional Scripting

I’ve been thinking lately about the two extremes a test script can be written. I don’t speak about the exploratory-scripted continuum. I was thinking about the instructional-intentional continuum.

Let’s take a standard test script or test case or charter, whatever you want to call it.

  1. Enter a valid username in the text field labeled with “username”.
  2. Enter a valid password for the chosen username in the text field labeled with “password”.
  3. Press the button “Login”.
  4. Expected result: You should be taken to the start page.

This is what I would call an instructional script. It consists of instructions to follow and a result to expect.

Now let’s try to write the same set of instructions intentional.

To successfully login to the application enter valid credentials in the according text fields and submit.

Not much of a difference you would think. But what if the login form has changed? There is no text field “username”, it’s now called “email”. And the button has been renamed to “Continue”. Which of the two examples would lead to problems for a human user?

Of course it could be a bug that those fields have been changed, but to be honest, is it really a problem? A human being can still sort out what information to enter where and how to go on.
If an automated check is looking for IDs that went unchanged it could still pass without a problem. The goal of the test is to log in successful.

Now think of a more complex test script where something in the middle has changed, and you have no clue what the goal of your test case should be. How much time would you waste with test steps that are not executable any more as intended?

Of course, a pure intentional script might leave inexperienced users a bit alone during execution. So a good combination of both is important. State the WHY in the beginning and obvious, so that an experienced tester knows already what to do, and an inexperienced tester at least can get help by the WHY, when the WHAT is not applicable due to changes.

If you write the WHAT also with a good portion of WHY, you might save big for maintenance.

Just think about it the next time you write a test script, do you write the WHAT or the WHY?

Leave a comment