Tricentis Tosca

Test Case Design – How to Specify your Test Cases

How would you like it if you could specify a test case with all its characteristics, conditions, workflows and verifications in one step? Seems to be too good to be true? Most of the time actually, it is as simple as creating test cases.

In the red section of Tosca Testsuite, the test case design section, you can specify all test cases in the area under “Instances”. To input data in your test sheet, (that’s the group of test cases that have the same business context), you need Attributes, which can have sub-attributes and Instances, or a mixture of the two. Here’s a short example: Say you have a car which is included in the test sheet of “vehicles”, but not in the “bike” test sheet. This test sheet has Instances for all type of cars, from mini to van.

Within the “Sportscar” test case you will have an attribute called Chassis. Here the instance “Aerodynamic” is chosen and the sub-attributes would be “Material” (carbon of course), “Doors”, (3 because of weight), and the “Serialnumber” is just a field to type in, without Instances.

Now you have more test cases than just “Sportscar” and if you had filled out all the possible fields in with attributes or instances, you can activate the Tosca magic. The Tosca magic will keep your amount of test cases low while maxing out your test coverage. How is this done?

Simply click “Generate Instances” à “Linear expansion”. This will set your straight through and changes one option in every test case until it reaches the maximum coverage. This logic will help you to be faster and more consistent when building up your test case specification.

Test Case Design training will teach you how to use relations which will help you to set rules that are followed by Tosca when creating new instances. Some of the most common relations include “Required”, “Constrained”, and “Forbidden”, which should be set just as you understand them. Just for “Constrained” I will mention, if you choose two instances and set them to constrain they won’t combine with other Instances while expanding.

The next part is all about classes, which will keep your maintenance low and your reusability high. The only thing left to consider is how to build it all up as intelligently as possible. Within big projects we always recommend asking for a methodology that can figure out your needs and requirements belonging to test case design. If you build up classes wisely you can reuse them several times in one test sheet and even in other test sheets. Likewise if you have attributes which are nearly the same or are used many times, consider building up a class and reusing it as often as you need it. To keep things in order we have several types of classes: the Standard Class, Attributes and Instances, the Enumeration Class, the Structured Class, Instances only, and Attributes only.

TestCaseDesign: What it should not look like

The last part of the course is about best practices, which will help you to design reusable, easy to read, and easy to maintain test cases. Another huge help is the ability to see the essential test target and data. These last two videos will improve your knowledge and your experience in building up test cases and I really recommend watching them carefully.

Last but not least, I would encourage you to check out our on-demand webinar: Streamlining Your Test Suite with Test Case Design.