Classification Tree Method - How to crack ISTQB?Aneejian · May 17, 2015 · 5 mins read.
While preparing for ISTQB exams, we are not sure about what we should study on the topic Classification Tree Method. In this article, we are sharing some tips, which will be helpful for those appearing for the ISTQB advanced level exam.
- What is the classification tree Method?
- Classifications and Classes
- A question from ISTQB advanced level exam
What is the classification tree Method?
Classification Tree Method is a black box testing technique to test combinations of features.
Consider the scenario where a user needs to test several features. It is impossible to test all the combinations due to time and budget constraints.
The classification tree method is one of the techniques we can use in such a situation.
Classification Tree Editor
The Classification Tree Editor (CTE) is a software tool for test design that implements the classification tree method. It is the tool used to derive test cases for the classification tree method.
However, in the ISTQB advanced level exam, questions asked will be to find the minimum/maximum number of test cases required by applying the classification tree method without the tool. Let us discuss how to calculate the minimum and the maximum number of test cases by applying the classification tree method.
Classifications and Classes
In order to calculate the number of test cases, we need to identify the test relevant features (classifications) and their corresponding values (classes). By analyzing the requirement specification, we can identify classification and classes.
Let us analyze a sample scenario given below and find out the classifications and classes.
Consider a User Interface having one radio button, one drop-down box having four values in it and a multi-select box having five values in it. Let us identify classifications and classes for this scenario.
|Classifications||Number of Classes|
Now, let us find out the minimum and the maximum number of test cases by applying the Classification Tree Method.
Minimum Number of Test Cases
Minimum number of test cases is the number of classes in the classification which has the maximum number of classes.
In this scenario, the minimum number of test cases would be ‘5’. The multi-select box has the largest number of classes, which is 5.
Maximum Number of Test Cases
The maximum number of test cases is the cartesian product of all classes.
In this scenario, the maximum number of test cases is 40.
Maximum Number of test cases =
2 x 4 x 5 = 40
A question from ISTQB advanced level exam
Now, let us solve one sample question from ISTQB advanced level exam
Easy travel is a card, used for paying fares on buses and subways. Users can store credit to the card at the Easy travel loading Machines and the system automatically deducts the fare on swiping the card in the card reader on a bus or at the subway station.
The system allows the user to load 10, 20, 30, 40 and 50 Euros or other user-defined amounts to the card. There are four payment methods available: cash, credit card, debit card or pay-by-phone.
Once the transaction is complete, the system allows the user to view or print the balance on a receipt.
Using the Classification Tree method, what is the minimum number of test cases for 100% 1-wise coverage?
|A. 6 Test CasesA. 6 Test Cases|
|B. 2 Test Cases|
|C. 12 Test Cases|
|D. 3 Test Cases|
Step 1 - Identify classifications and classes
|Classifications||Number of Classes||Comments|
|Classification 1 - Ticket Fare||6||Amount has 6 classes - 10, 20, 30, 40, 50, User Specified Amount|
|Classification 2 - Payment Mode||4||Payment Mode has 4 classes - Cash, Credit Card, Debit Card, Pay by phone|
Step 2 - Find the Minimum Number of Test Cases
Classification 1 has the maximum number of classes. So the minimum number of test cases is 6.
Step 3 - Find the Maximum Number of Test Cases
The maximum number of test cases is the cartesian product of classes. In this scenario it is
6 x 4 = 24.
The question asks about the minimum number of test cases required. So the answer is Option A. 6 Test Cases.