The Testcases Template Trick – Getting one testcase to call another

November 19, 2014 in Test Automation

When doing test analysis I often find that we need to do test some customer feature over and over again for a range of combinations. I recently found myself able to redo a trick I learned a long time ago, not only in HP Quality Center but now also in Microsoft Test Manager. So if you use one of those tools, you can read on. If you use another testcase tool, perhaps your tool also allows one testcase to call another. That’s all you need, and hence it might be a trick for your automated checks too. Let’s hear about that in the comments.

Let’s have a case example: An internal collaboration solution consisting of a server with some features, and Mobile app for Windows Phone, Apple iOS and Windows 7. Mind mapping the solution showed that we should test the features on a cell connection, on an internal and external wi-fi.

The Template Testcases Trick 1

There are 3*3*3 = 27 combinations, but really only 9 things to describe. I create these 9 operations as templates (in HP QC) or shared test steps (in MS TM): Connect, Share, and Chat, over cell, over internal wi-fi, over external wi-fi, on PC, on iOS on Windows Phone. Then I write the 27 headlines, but the test steps are not written out explicitly – they are calls to the shared steps.

The Template Testcases Trick 2

The planning of the test steps looks boring (call feature, call device, call connection type) – but when I run the test case (in either tool) I get first the feature steps, then the device steps and then the connection steps. If a change happens to any operation, I only have to look into it in one location, not all the permutations. Creating new permutations takes the creation of a new template and some copy-paste work and I’m good to go. Notice how each permutation is still represented as one testcase item. That usually matters to someone. But really if not, all permutations are needed, and then you can sample our coverage from the available templates.

I started this technique in a domain with 4 million combinations, so not even in planning did we do then all. But in test case planning we ended up having reusable components “gold regression test cases” for the systems core functionalities. Recently I used it in MS TM for a document processing tool with many document templates that needed to be opened, read and published. I am using it in HP Quality Center for the collaboration tool mentioned.


About the Author:

Profile picture of Jesper

Jesper Lindholt-Ottosen

Jesper is a Test Manager with NNIT in Denmark.  He is a context driven tester. He spans from Rapid Software Testing, to ITIL services, social knowledge sharing and loads of LEGO. Jesper has had articles published in “The Testing Planet”, has been a guest speaker at AspIT, an IT education (2011, 2012, 2013), guest blogger for EuroSTAR (2010) and was a speaker at Rebel Lightning talks at EuroStar 2010.

You can read more of Jesper writing on his blog at and follow him on Twitter.