Tosca Test Case Design: TestSheets, Templates, and Data
Introduction
Writing a separate TestCase for every data combination does not scale. Test Case Design lets you describe the data once in a TestSheet and generate the TestCases from a template. This lesson explains the concepts and the workflow in Tosca Commander, with notes on how Tosca Cloud names things.
Prerequisites
- A working TestCase
- An understanding of equivalence classes and boundary values is helpful
Step-by-Step Guide
Step 1: Understand the idea
In Tosca Commander, TestCase-Design holds TestSheets and templates. A TestSheet defines the attributes and values you want to test and generates the combinations needed for coverage. You assign a TestSheet to a TestCase template to produce the TestCases that will be executed.
Step 2: Build a TestSheet
Define attributes such as Country, Customer Type, and Payment Method, and list the values to test for each. Design values with test techniques in mind: valid, invalid, and boundary values, so coverage is deliberate rather than accidental.
Step 3: Create a TestCase template
A template is a blueprint based on an existing TestCase. It uses placeholders where data varies. Business parameters connect the template's controls to the TestSheet attributes, using the {PL[...]} syntax for placeholders.
Step 4: Generate TestCases
Combine the template with the TestSheet to create the TestCases. In Tosca Cloud's terminology, a test case instance is one specific combination of values from the test sheet, and one test case is generated from each instance.
Step 5: Maintain data in one place
When the business rules change, edit the TestSheet and regenerate rather than touching many TestCases. Review the generated set for excessive combinations and reduce them where more tests add little value.
FAQs
- What is the difference between a template and a TestCase?
- A template is a blueprint with placeholders. TestCases are the concrete tests generated from it, each with a specific combination of data values.
- Does Tosca Cloud work the same way as Tosca Commander?
- The concepts are similar but terminology and screens differ. Follow the documentation for the product and version you use.
Summary
Describe your data once in a TestSheet, link it to a template through business parameters, and generate TestCases instead of writing them by hand. This keeps coverage deliberate and maintenance small.
Comments
Log in or create a free account to join the discussion.