0% found this document useful (0 votes)
40 views12 pages

Reducing Test Cases Using Decision Table Systems

The document discusses reducing test cases for software using decision table systems. It presents an example of a chemist seeking permission to work with chemicals under certain conditions. A flowchart and algorithm are created from the example requirements. A cause and effect graph is used to generate a decision table with redundant data. The goal is to remove redundancy and create a shortened decision table to generate fewer test cases than the standard 2^n approach, reducing time and effort without compromising quality. The methodology starts with requirements and uses cause-effect graphs and decision tables to minimize test cases.

Uploaded by

Budi Kurniawan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views12 pages

Reducing Test Cases Using Decision Table Systems

The document discusses reducing test cases for software using decision table systems. It presents an example of a chemist seeking permission to work with chemicals under certain conditions. A flowchart and algorithm are created from the example requirements. A cause and effect graph is used to generate a decision table with redundant data. The goal is to remove redundancy and create a shortened decision table to generate fewer test cases than the standard 2^n approach, reducing time and effort without compromising quality. The methodology starts with requirements and uses cause-effect graphs and decision tables to minimize test cases.

Uploaded by

Budi Kurniawan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

International Journal of Innovations & Advancement in Computer Science

IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

From Knowledge Discovery to Implementation: Reducing Test


Cases using Decision Table Systems

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.

164 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

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.

II. THE BASIC IDEAS


A decision table is a table, which may accompany a flowchart, defining the possible contingencies that may be
considered within the program and the appropriate course of action for each contingency. Decision tables are
necessitated by the fact that branches of the flowchart multiply at each diamond (comparison symbol) and
may easily run into scores and even hundreds. If, therefore, the programmer attempts to draw a flowchart
directly, he is liable to miss some of the branches.
A decision table is divided into four parts [2]:
(i) Condition stub: It contains statements i.e., the factors to be considered in making a decision.
(ii)Action stub: It introduces one or more actions i.e., steps to be taken when a certain combination of
conditions exists.
(iii)Condition entries: It lists in its various columns the possible permutations of answers to the questions in
the condition stub.
(iv)Action entries: It lists in its columns corresponding to the condition entries, the actions contingent upon
the set of answers to the questions in that column.
The steps of building the concerned tables are given below.
1. Firstly figure out the most essential factors to be considered in making a decision. This will identify the
conditions involved in the decision. Only those conditions should be selected which have the potential to
either occur or not but partial occurrences are not permissible.
2. Determine the most possible steps that can take place under varying conditions and not just under current
condition. This step will identify the actions.
3. Calculate all the possible combinations of conditions.
For every N number of conditions there are 2N combinations to be considered.
4. Fill the decision rules in the table.
Entries in a decision table are filled as Y/N and action entries are generally marked as "X". For the conditions
that are immaterial (can either be true/false) a hyphen "-" is generally put. Decision table is further simplified
by eliminating and consolidating certain rules. Impossible rules are eliminated. There are certain conditions
whose values do not affect the decision and always result in the same action. These rules can be consolidated
into a single rule.

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.

165 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

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

Enter the name of Chemist

Is Chemist No Error message- Chemist


authenticated is un-authorized

Yes

Check availability No Error message- Chemical is not


of chemical available

Yes
Check whether the No
chemical is harmful Request Accepted

Yes
Check whether
Chemist is well
trained to handle
No
harmful chemical

Yes Request Rejected

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.

166 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

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

Cause and Effect Graph


Cause and effect graph is a dynamic test case generation technique. Here causes are the inputs condition and
effects represent the output results. Cause and effect Graphing is a technique which starts with the set of
requirements and determines the minimum possible test cases for maximum test coverage that helps to reduce
the execution of testing time and also cost.

Drawing a cause and effect graph based on given situation


The software accepts the request or rejects the request depending upon the following condition-
Request is accepted when -
 Chemist should be authorized
 Chemical should be available
 Chemical is not hazardous
 If chemical is hazardous then chemist must be trained to handle the hazardous chemical
Request is rejected when -
 Chemist is not authorized
 Chemical is not available
 Chemical is hazardous
 If chemical is hazardous then chemist is not trained to handle the hazardous chemical

167 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

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

Causes (Input) Effect (Output)

For E1 to be true – following are the causes :


Figure 1 : C1 is incorrect or invalid
Figure 2 : C1 is correct and C2 is incorrect
Figure 3 : C1, C2, C3 are true and C4 is incorrect

C1
E1
C2
Figure 1
C3 C4 E2

C1
E1
C2
E2
C3 C4 Figure 2

C1 E1
C2

C3 E2
C4 Figure 3

For E2 to be true – following are the causes :


Figure 1 : C1 and C2 must be correct or valid and C3 must be invalid or incorrect.

168 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

Figure 2 : C1 , C2 , C3 and C4 must be correct.

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

Figure : Cause and Effect Graph

169 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

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.

170 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

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 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.

171 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

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 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

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

172 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

Shorted Decision Table[6,7]


Condition C1 C2 C3 C4 C5
Chemist is
authorized F T T T T
Chemical is
available --- F T T T
Chemical is
harmful --- --- F T T
Chemist is well
trained --- --- --- F T
Action
Request X X
accepted
Request X X X
Rejected

Comparison between Decision Table and Shorted Decision Table [3]


Difference in value of
Normal Decision Table Shorted Decision Table both normal and shorted
decision table

Conditions 4 4 -----
No of condition data entry 16 5 11

Time complexity 3.8 min 1 min 2.8 min

Effort Complexity 8 2.5 5.5

Cost Complexity 1.6 0.5 1.1

Probability of accuracy of
testing 50-100% 50-100% ----

Code Coverage Same Same -----

If for each test case run a) time is 0.2 sec


b) Effort is 0.5 men/sec
c) Cost is 0.1 Re per sec

173 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

Test Case [4] for our example -


Test Case Test Case Steps to Test Test Data Expected result
Id Description
TC_001 Enter invalid 1. Enter chemist 1. abc#$$ Error message – Chemist
chemist name name 2. ok is unauthorized
2. Click submit
button
TC_002 Enter valid 1. Enter chemist 1. Manish Logged in next page
chemist name name Kumar asking for chemical name
2. Click submit
button
2. ok
TC_003 Enter valid 1. Enter 1. Methanol
chemist name to chemical Request accepted
check name 2. ok
availability
2. Click submit
button
TC_004 To check 1. Enter 1. Ethyl
whether chemical name nitrite Requested rejected
chemical 2. Click submit
entered is button 2. ok
harmful and
chemist is not
trained
TC_005 To check if 1. Enter 1. 2,4-
chemist is chemical name Dinitroaniline Requested accepted
trained to handle 2. Click submit
harmful button 2. ok
chemical

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

174 Manish Kumar, Dr. R.K. Dwivedi


International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 7, Issue 1
January 2018

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.

IV. ADVANTAGES [5]


1. A decision table provides a framework for a complete and accurate statement of processing or decision
logic. It forces a discipline on the programmer to think through all possible conditions.
2. A decision table may be easier to construct than a flowchart.
3. A decision table is compact and easily understood making it very effective for communication between
analysts or programmers and non-technical users. Better documentation is provided by it.
4. Direct conversion of decision table into computer program is possible using available software packages.
5. It is possible to check that all test combinations have been considered.
6. Alternatives are shown side by side to facilitate analysis of combinations.
7. The tables show cause and effect relationships.
8. They use standardized format.
9. Typists can copy tables with virtually no question or problems.
10. Complex tables can easily be split into simpler tables.
11. Table users are not required to possess computer knowledge.

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

175 Manish Kumar, Dr. R.K. Dwivedi

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy