Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Methods for referring to other steps in test cases?


#1

In our test cases, we often have to perform the same set up steps for different parameters, and instead of rewriting the steps (there can sometimes be a lot of steps), we will just say “perform steps xx-yy”.
This is a great shortcut, but if the test case gets updated later, and there are steps added or removed, this causes problems because no one thinks to change the references located elsewhere in the test case. I’ll give a dummy example:

Testing PB&J with multiple bread types:

  1. Set two pieces of white bread on table.
  2. Spread peanut butter on left bread.
  3. Spread jelly on right bread.
  4. Combine left and right bread.
  5. Set two pieces of whole wheat bread on table.
  6. Perform steps 2-4.

Now lets say later our formula for PB&J changes, and we add peanut chunks and jam to our recipe.

Testing PB&J with multiple bread types:

  1. Set two pieces of white bread on table.
  2. Spread peanut butter on left bread.
  3. Spread jelly on right bread.
  4. Sprinkle peanut chunks evenly across left bread.
  5. Spread jam on top of jelly on right bread.
  6. Combine left and right bread.
  7. Set two pieces of whole wheat bread on table.
  8. Perform steps 2-4.

Step 8 is now incorrect. Does anyone know any good methods of solving this, other than the obvious “make sure the change Step 8”?