Question: Using the following scenario as an example, give the complete decision table for the requirement given under Question 1. Suppose we have a system that
Using the following scenario as an example, give the complete decision table for the requirement given under Question 1.
Suppose we have a system that checks if a candidate for a driving license fulfills all requirements to receive the license. The requirement specification describes the above mentioned business rules as follows:
The operator enters the following information to the system:
The result of the theory exaam (an integer value in the range 0100 points)
The result of the practice exaam (an integer value greater or equal to zero, representing the number of errors done by the candidate during the practice exaam)
A candidate receives the driving license, if she/he gained at least 85 marks (out of 100) from the theory exaam and if she/he made at most 2 errors during the practice exaam. In case of failing on one of these criteria, the candidate is eligible to retake the exaam. In case of failing in both parts, the candidate is required to retake the driving lessons.
Let us go through the process described above to derive test cases for this problem.
1. Identify all possible conditions. The possible conditions on which the systems decisions depend are obviously:
The result of the theory exaam (number of points)
The result of the practice exaam (number of errors)
The decisions will depend on the results of these exaams. From the specification we know that the theory exaam is passed when a candidate receives at least 85 points. The practice exaam is passed, when the number of mistakes is 2 or less.
2. Identify all the corresponding actions that may occur in the system. The system may take the following decisions:
Should a candidate receive the driving license? (possible values: YES or NO)
Should a candidate retake the theory exaam? (possible values: YES or NO)
Should a candidate retake the practice exaam? (possible values: YES or NO)
Should a candidate retake the driving lessons? (possible values: YES or NO)
3. Generate all possible combinations of conditions; each single combination forms a separate column in the decision table. Each condition has two possible values, so we have 2 x2 = 4 possible combinations of conditions (and, hence, four columns in the decision table):
Points >= 85 and errors >=2.
Points >=85 and errors >2.
Points <85 and errors <=2.
Points < 85 and errors >2.
4. For each combination of conditions identify which actions should hold and which should not; fill the corresponding fields in the given column below the corresponding combination of conditions. Now we go through the columns one by one and for each of them, we identify the expected behavior of the system:
- Column 1: points >=85, errors >=2. This means that the candidate passed both exaams, so she/he should get her driving license. There is no need to retake exaams or the driving lessons. Hence, the four corresponding actions in the column 1 should be respectively YES, NO, NO, NO.
- Column 2: points >=85, errors >2. This means that the candidate failed the practice exaam. She/he cannot receive the driving license and she should retake the practice exaam. Hence, the corresponding actions in the column 2 are respectively NO, NO, YES, NO.
- Column 3: points < 85, errors <=2. The candidate failed the theory exaam. She/he cannot receive the driving license and she/he should retake the theory exaam. Hence, the corresponding actions in the column 3 are respectively NO, YES, NO, NO.
- Column 4: points < 85, errors >2. The candidate failed both exaam. She/he cannot receive the license and should retake the driving lessons.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
