Create and use test case templates
A test case template is a core component of test case design. It's a blueprint based on an existing test case, and you'll use it to create a whole set of additional test cases.
This topic explains all things test case template: how to create one, prepare and link a test sheet, map values, and generate test cases from it.
Before you start
You need a test case to create your template. Make sure it covers the flow you want to test.
Create a test case template
To create a template, go to the test case you want to be your template and select Create template. Tosca Cloud keeps the test case, creates the template, and takes you to the template.
Prepare and link your test sheet
Your template needs a test sheet that defines the elements you want to test and the input values you'll allow. If you don't have one yet, build your test sheet.
Create test case instances
Before you can link your test sheet to your test case template, you need to create test case instances. A test case instance is one specific combination of values from your test sheet. Tosca Cloud generates one test case from each instance. Create your test case instances if you haven't already.
Link your test sheet
To link your test sheet, go to your test case template and select Link to a test sheet.
Then, go to the test step where you want to use input values. Under Value, enter {XL[<test sheet attribute>]}. Replace <test sheet attribute> with the attribute name from the test sheet. Use a dot to separate nested levels. For example, login.username.
Generate test cases from your template
Now that you've linked your test case template to a test sheet, you're ready to generate test cases. Tosca Cloud creates one test case for each test case instance in your test sheet.
To generate test cases, go to your test case template and select Instantiate. Your test cases appear in the Relations tab of the asset panel.
Update test cases from your template changes
If you change your template after you generate test cases, you can update. After you make your changes, select the template instance you want to update and simply select Reinstantiate.
What's next
Now that you've generated test cases, do a few trial runs to find and fix any issues before you create playlists.