Create test case instances and test cases
A test case instance is one specific combination of values from your test sheet. Tosca Cloud generates one test case from each instance.
This topic covers creating test case instances for your templates.
Before you start
To create test case instances, you must be an administrator or contributor.
Also, your test sheet must be ready:
-
The test sheet has at least one attribute with at least one attribute instance.
-
The test sheet doesn't have unsaved changes.
Understand test case instances
You have a test sheet with attributes and instances. So far, so good!
Test sheet with multiple attributes and attribute instances
Now, you need to define how you want to combine all these attribute instances. For example:
-
You want one test case instance that uses the value of instance 1 for Name, the value of instance 2 for Email, and the value of instance 2 for Register button.
-
You want another test case instance that uses the value of instance 2 for Name, the value of instance 2 for Email, and the value of instance 1 for Register button.
-
And so on.
In essence, you define variations of input values:
Multiple test case instances
Create test case instances
Tosca Cloud offers different ways to create test case instances:
-
Generate test case instances in bulk, based on an algorithm of your choice. This is the most useful method most of the time. Here, Tosca Cloud combines your attribute instances automatically and creates a full set of test case instances.
-
Create test case instances manually. This is useful when you just need a small number of very specific combinations.
Please choose your use case:
To generate test case instances in bulk, open your test sheet and select Generate test case instances. Then, select one of the following algorithms:
|
Algorithm |
Description |
|---|---|
|
Linear expansion |
Starts with the straight through and then changes one attribute instance at a time. Result:
This algorithm makes it especially easy to identify issues in your application code. If a test other than the straight through fails, you'll know exactly what caused the failure: the code related to this particular attribute. Linear expansion produces slightly more tests than the orthogonal approach, but the test increase is still manageable. |
|
Orthogonal |
Creates a minimal set where each attribute instance appears at least once. Result:
This algorithm is extremely efficient. It produces a low number of test case instances that cover all attributes at least once. However, this efficiency leads to test case instances that have more than one variation. This means that if a test fails, you'll have to spend additional effort to determine which variation caused the issue. |
Example
Let's say your test sheet has three attributes:
-
Attribute A has two instances: A1, A2.
-
Attribute B has two instances: B1, B2.
-
Attribute C has three instances: C1, C2, C3.
And you've defined (A1,B1,C1) as the straight through.
This is what each algorithm produces:
|
|
Linear expansion |
Orthogonal |
|---|---|---|
|
Result |
5 test case instances* |
3 test case instances* |
|
Calculation |
1 + 1 + 1 + 2
|
Attribute C has the highest number of attribute instances: 3. This means you need at least 3 variations. Attribute A and B instances then distribute across those variations. |
|
Variations |
(A1,B1,C1) (A1,B2,C1) (A1,B1,C2) (A1,B1,C3) (A2,B1,C1) |
(A1,B1,C1) (A2,B2,C2) (A1,B1,C3) |
* Includes the straight through
To create a test case instance manually, follow these steps:
-
Open your test sheet and go to the Test case instances tab.
-
Select Create instance.
-
For each attribute, select an instance from the dropdown.
Create your test case instance manually
What's next
Link your test sheet to your template and generate your test cases.