Reducing Test Cases Using Decision Table Systems
Reducing Test Cases Using Decision Table Systems
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018
Manish Kumar
Assistant Professor, University Department of Computer Applications,
Vinoba Bhave University, Hazaribag, Jharkhand
Dr. R.K. Dwivedi
Associate Professor, University Department of Mathematics,
Vinoba Bhave University, Hazaribag, Jharkhand
ABSTRACT
The present paper deals with the concept and uses of decision table. Although the decision table under study appears
same as it was years ago, where it was mainly used to construct the logic of computer programs, there has been
considerable important changes in content as well as in applications. An attempt has been made to reduce the number of
test cases with the help of an example. Decision table are techniques of reducing test cases by avoiding redundant source
of data. The methodology starts from SRS document and uses cause and effect graph and decision table approach to
reduce test cases. Cause and effect graph is used to generate decision table and by removing the redundant condition set
from decision table the number of test cases are reduced from 16 to 5, in its minimized form.
Research and practices in the evolution of decision table were examined, showing how the technique keeps popping up in
different areas and disguises, because of its advantages of representation, completeness and consistency.
KEYWORDS
Flowchart, Algorithm, Cause and Effect graph, Decision table (Condition and Action)
I. INTRODUCTION
A decision table is used to represent conditional logic by creating a list of tasks depicting business level rules.
Decision table is also known as DETAB. This technique is sometimes also referred to as a ’cause-effect’ table
[1] because of associated logic diagramming technique called ’cause-effect graphing’ which is used to derive
the decision table.
Decision tables are very useful in a situation where a number of decisions or action have to be taken
depending on the input provided. It is a way to represent algorithm in a tabular form. The combinations of
inputs taken to derive the results are huge in number and testing all these combinations is troublesome work.
This is impossible to conduct testing in all possible combinations within the deadline estimated. Thus, in
actual testing scenario instead of testing all possible combinations, a small subset of combination is taken into
consideration which would satisfy maximum test coverage of software application. But taking decision to
choose combinations for testing is also a prime objective. If selecting these combinations sets do not follow a
systematic way then it may result to ineffective result with respect to time, effort, cost which comprises the
quality of the software adversely.
Normally, test cases are directly derived from decision table which may be 2n where many testers do not
avoid the redundancy of decision table following the rule, that total conditions in decision table is 2n where n
is the number of total inputs. In this study it is shown that by reducing the redundancy of decision table, a final
shorted decision table is drawn which is used to create test cases from it and it also reduces the test cases less
than 2n, reducing the total time and effort without compromising the quality of the software and achieving the
maximum test coverage.
In the present paper an example of chemist seeking permission grant to work with chemical under conditions
requested. Taking this as the SRS (Software Requirement Specification) document its flowchart and algorithm
are defined as its design part to describe the requirement of the software. As testing part, these documents are
used as base and cause and effect graph is drawn to derive decision table with multiple repeated data,
following the rule of 2n. Here, objective is to remove all the redundant data and draw a final decision table
which we name as shorted decision table which break the rule of 2n. This shorted decision table is used to
generate test cases and finally number of test cases declined to less than half of 2n.
It also describes when to go for decision table testing and how to construct test cases on the basis of decision
table. The advantage areas of decision table techniques have also been discussed.
III. METHODOLOGY
SRS (Software Requirement Specification)
In present study paper deals with an example and considering this example as base for the study we represent
our objective of reducing test cases using Decision Table [2]. Example – first we enter chemist name if the
chemist name is authorized then chemical name is checked whether it is dangerous or not, if chemical is
dangerous then the condition is checked whether chemist is well trained or not. If Chemist is well trained, he
is granted permission to work with the chemical otherwise permission is rejected.
Flow Chart
A flowchart is a pictorial representation of an algorithm in which the steps are drawn in the form of different
shapes and the logical flow is indicated by interconnecting arrows. The primary purpose of the flowchart is to
help person with no technical knowledge to understand the logic of a program. Flowchart is also said to be
blueprint of the software before actual coding of the software starts.
START
Yes
Yes
Check whether the No
chemical is harmful Request Accepted
Yes
Check whether
Chemist is well
trained to handle
No
harmful chemical
Request Accepted
Algorithm
Algorithm is a set of sequence of steps used for solving a problem. It gives step by step presentation of logic
or procedure which is easy to understand. The main advantage of algorithm is it’s independency on any
computer language. It is one of the most basic tools that are used to develop the problem solving logic to
develop any software. To develop an algorithm it must follow characteristics:
a) Each and every instruction must be clearly defined.
b) Each instruction should be performed in time limit.
c) Algorithm instruction should not be repeated infinitely.
d) After performing instructions algorithm should terminate to produce a correct result.
Start
Input chemist name
If Chemist name is valid then
If Chemical name is available then
If Chemical is harmful then
If Chemist trained to handle then
Print Request Accepted
Else
Request Rejected
End if
Else
Request Accepted
End if
Else
Request Rejected
End if
Else
Request Rejected
End if
Stop
The Causes for the situation are – The Effect for the situation are –
C1 - Chemist is authorized E1 – Request rejected
C2 - Chemical is available E2 – Request accepted
C3 - Chemical is harmful
C4 - Chemist is well trained
Let’s start
C1 C3 E1
C2 C4 E2
C1
E1
C2
Figure 1
C3 C4 E2
C1
E1
C2
E2
C3 C4 Figure 2
C1 E1
C2
C3 E2
C4 Figure 3
C1
E1
C2
E2
C3
C4
Figure 1
C1 E1
C2
C3 E2
C4
Figure 2
Combining the two above diagram together we get the final complete Cause and Effect graph for the given
situation. The goal of this graph is to reduce the total number of test cases still achieving the desired
application quality by covering the necessary test cases for maximum coverage.
C1
C2
E1
C3
E2
C4
Decision Table
Decision Table Testing is a good way to deal with a combination of inputs, which produce different results. It
helps reduce test effort in verifying each and every combinations of test data, at the same time ensuring
complete coverage
Condition C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16
Chemist is
authorized F F F F T T T T F T T T F T T T
Chemical is
available F T T T F T T T F F T T F F T T
Chemical is
harmful F F T T F F T T T T T T F F F T
Chemist is well
trained F F F T F F F T F F F T T T T T
Action
Request
accepted X X X X X
Request
Rejected X X X X X X X X X X X
Condition 1: ( F, _ , _ , _ )
If the chemist is unauthorized than there is no scope for any further processing of the request, the request is
automatically rejected irrespective of whatever the rest of the causes are true or false. Here, such 6 data set
C1, C2, C3, C4, C9, C13 represents the redundancy. We merge these data set as one to reduce redundancy and
provide optimized data set.
Condition C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16
Chemist is
authorized F F F F T T T T F T T T F T T T
Chemical is
available F T T T F T T T F F T T F F T T
Chemical is
harmful F F T T F F T T T T T T F F F T
Chemist is well
trained F F F T F F F T F F F T T T T T
Action
Request
accepted X X X X X
Request
Rejected X X X X X X X X X X X
Condition 2: ( T, F , _ , _ )
If the chemist is authorized but chemical is not available than in this condition ,no any further processing of
the request is done, the request is automatically rejected irrespective of whatever the rest of the causes are true
or false. Here, there are such 3 data set C5, C10, C14 which represents the redundancy. We merge these data
set as one to provide optimization.
Condition 3: ( T , T , F , _ )
If the chemist is authorized, chemical is available and chemical is not hazardous than in this condition, the
request is accepted automatically irrespective of next cause is true or false. Here, there are such 2 data set C6,
C15 which represents the redundancy. We merge these data set as one to reduce redundancy and provide
optimized data set.
Condition C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16
Chemist is
authorized F F F F T T T T F T T T F T T T
Chemical is
available F T T T F T T T F F T T F F T T
Chemical is
harmful F F T T F F T T T T T T F F F T
Chemist is
well trained F F F T F F F T F F F T T T T T
Action
Request
accepted X X X X X
Request
Rejected X X X X X X X X X X X
Condition 4: ( T , T , T , F )
If the chemist is authorized, chemical is available and chemical is hazardous and chemist is not well trained to
handle hazardous chemical than in this condition, the request is rejected automatically. Here, there are such 2
data set C7, C11 which represents the redundancy. We merge these data set as one to reduce redundancy and
provide optimized data set.
Chemical is available
F T T T F T T T F F T T F F T T
Chemical is harmful
F F T T F F T T T T T T F F F T
Chemist is well
trained F F F T F F F T F F F T T T T T
Action
Request accepted
X X X X X
Request Rejected
X X X X X X X X X X X
Condition 5: ( T, T , T , T )
If the chemist is authorized, chemical is available and chemical is hazardous and chemist is well trained to
handle hazardous chemical than in this condition, all causes are true or valid hence, the request is accepted.
Here, there are such 3 data set C8, C12, C16 which represents the redundancy. We merge these data set as one
to reduce redundancy and provide optimized data set
Conditions 4 4 -----
No of condition data entry 16 5 11
Probability of accuracy of
testing 50-100% 50-100% ----
Test cases [4] generated here are directly derived from shorted decision table. Here, observation is made that
if the formal technique is followed without removing redundant data set then the number of test case is almost
2n or even more than that. Using the formal technique test cases number varies from 2n to large finite numbers
as per depending on the tester’s logic and experience. Now here, the work of tester is important how to reduce
the number of test case generated.
Using above methodology for removing redundant data set the total decision table conditions is reduced from
16 to 5 i.e. 11 data set which were repeated data. Thus, with increase in test conditions or say, test cases also
increases the estimation value of software with respect to cost, time and effort. In the above table comparison
of data or variables is provided to analyze the reduction in cost ( Rs 1.1), time (2.8 mins) and effort (5.5
men/sec) where the code coverage for the both normal decision table and shorted decision table is same
(100% code coverage) with a final quality product or software. These value may be looking simple or less as
provided example is just less than fifty line of code software. But in real world application poses hundreds to
thousands lines of code. Thus in such cases the difference with respect to time, effort and cost estimation is
unavoidable and to ignore such numbers may be huge loss in every respect.
Here, using above methodology reduced number of test cases is derived directly from shorted decision table
instead of generating a large finite number of test cases and comparing test case and then reducing them is
error –prone work which compromises with the quality of software and also increases the estimated values .
This technique is not acceptable in case of application where test case number can be in hundreds. This
technique is every efficient and can be easy practices not only by experienced tester but also for a person who
is new in testing field. And its dimension is not limited to small or large companies.
V. CONCLUSION
This paper demonstrates the methodology for the test case reduction by removing redundancy of decision
table. In the present study an example of a chemist seeking permission to practice with chemical is taken.
Here, this paper deals with cause and effect graph and decision table to show defined observation. Related
diagrams and tables are used in the study to analyze the reduction of test conditions and thus, resulting in
reduction in generation of test cases. Over the years there has been a major change in research and application
areas of decision tables but still there is huge scope of improvement in the field of decision table to exploit its
full extent and advantages.
Despite of introduction of new methodologies every year decision table is still one of the important technique
and easy way to reduce test case number with achieving maximum test coverage and quality software within
an affordable time. The proposed methodology can be used in better way by the multi-dimensional companies
to small enterprises.
REFERENCES.
[1] Fisher, D.L.(1966) “Data, Documentation and Decision Tables” Comm ACM Vol. 9 No. 1(Jan 1966) p. 26-31.
[2] A. Lew and D. Tamanaha. Decision table programming and reliability. In Proceedings of the 2nd International
conference on Software engineering, pages 345–349. IEEE Computer Society Press, 1976.
[3] M.Grotchtmann, K.Grimm, J.Wegener, “Test Case Design using Classification Tree and Classification Tree
Designer CTE”, Proc. Of the 8th International quality week (QW’ 95).
[4] U.W. Pooch. Translation of decision tables. ACM Computing Surveys (CSUR), 6(2):125–151, 1974.
[5] Cragun, B., Steudel, H., A Decision-Table Based Processor for Checking Completeness and Consistency in Rule-
Based Expert Systems, International Journal of Man-Machine Studies, 1987, pp. 633-648.
[6] Keiji Uetsuki; Tohru Matsuodani; Kazuhiko Tsuda, “An efficient software testing method by decision table
verification”,Inderscience International Journal of Computer Applications in Technology(IJCAT), Vol. 46, No. 1,
2013
[7] Karl Wiegers, “For Enfocus Solution Working With Decision Table”, 2016