Decision Table Testing

Slides:



Advertisements
Similar presentations
Object Oriented Analysis And Design-IT0207 iiI Semester
Advertisements

Defect testing Objectives
Testing “Multiple Conditions” with Decision Table Technique
Overview Functional Testing Boundary Value Testing (BVT)
Decision Table Based Testing
CompSci 230 Software Design and Construction Software Quality 2014S2 Black box testing.
Black Box Testing Csci 565 Spring 2009.
CSC 123 Systems Analysis & Design
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall.
Software Testing and Quality Assurance
IMSE Week 18 White Box or Structural Testing Reading:Sommerville (4th edition) ch 22 orPressman (4th edition) ch 16.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Testing an individual module
Path testing Path testing is a “design structural testing” in that it is based on detailed design & the source code of the program to be tested. The methodology.
Equivalence Class Testing
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Functions. A function is a relation that has exactly one output for each input.
1 © 2010 Pearson Education, Inc. All rights reserved © 2010 Pearson Education, Inc. All rights reserved Chapter 8 Systems of Equations and Inequalities.
Dynamic Black-Box Testing Part 2
CMSC 345 Fall 2000 Unit Testing. The testing process.
CS4311 Spring 2011 Unit Testing Dr. Guoqiang Hu Department of Computer Science UTEP.
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
Cause & Effect Graph Comparison Testing. Cause & Effect Graph This is basically a hardware testing technique adapted to software testing. It considers.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Presented by: Ritesh Jain Date: 16-Jun-05 Software Quality Testing.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
Decision Table Based Testing Outline Decision table vocabulary –Limited Entry Decision Tables (LEDT) –Extended Entry Decision Tables (EEDT) –Mixed Entry.
Copyright © 2011 Pearson Education Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall & Kendall Global Edition 9.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Cause & Effect Graph Comparison Testing
IS 334 information systems analysis and design
ALGORITHMS AND FLOWCHARTS
Business System Development
ISP Coverage Criteria CS 4501 / 6501 Software Testing
Process Specifications and Structured Decisions
Input Space Partition Testing CS 4501 / 6501 Software Testing
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 5 Retrospective on Functional Testing Software Testing
Structural testing, Path Testing
Types of Testing Visit to more Learning Resources.
CHAPTER 4 Test Design Techniques
Overview Functional Testing Boundary Value Testing (BVT)
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Equivalence Class Testing
Chapter 9 Structuring System Requirements: Logic Modeling
Karnaugh Maps Topics covered in this presentation: Karnaugh Maps
Chapter 9 Structuring System Requirements: Logic Modeling
CSCE 747 Software Testing and Quality Assurance
CSCE 747 Software Testing and Quality Assurance
Describing Process Specifications and Structured Decisions
Conjoint Analysis.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Virtual University of Pakistan
Normal Probability Distributions
Chapter 3 Special Section
Chapter 11 Describing Process Specifications and Structured Decisions
Overview Functional Testing Boundary Value Testing (BVT)
Software Testing “If you can’t test it, you can’t design it”
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 9 Structuring System Requirements: Logic Modeling
Copyright © Cengage Learning. All rights reserved.
Overview Functional Testing Boundary Value Testing (BVT)
Review of Previous Lesson
Black-Box Testing Techniques II
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing.
Presentation transcript:

Decision Table Testing

Decision Table Testing From the beginning of software development testing has always been incorporated into the final stages. Over the years the technicality of software has increased dramatically. As this complexity increases, programmers realise that testing is just as important as the development stages. Nowadays there are two main types of stages, White box testing and Black box testing Grey box testing is another type, but it’s not so well known and is sometimes used with Decision Table-Based Testing:

Decision Table Testing White box – testing concerned with the internal structure of the program. Black box – testing concerned with input/output of the program. Grey box – using the logical relationships to analyse the input/output of the program. Decision Table-Based Testing which is a Functional Testing method, also known as Black box testing.

Decision Table Testing Decision Table-Based Testing has been around since the early 1960’s. It is used to depict complex logical relationships between input data. There are two closely related methods of Functional Testing. The Cause-Effect Graphing (Elmendorf, 1973; Myers, 1979), and The Decision Tableau Method (Mosley, 1993). A Decision Table is the method used to build a complete set of test cases without using the internal structure of the program in question. In order to create test cases we use a table to contain the input and output values of a program. Such a table is split up into four sections as shown below:

Decision Table Testing In fig there are two lines which divide the table into its main structure. The solid vertical line separates the Stub and Entry portions of the table, and the solid horizontal line is the boundary between the Conditions and Actions. So these lines separate the table into four portions, Condition Stub, Action Stub, Condition Entries and Action Entries. A column in the entry portion of the table is known as a rule. Values which are in the condition entry columns are known as inputs. Values inside the action entry portions are known as outputs. Outputs are calculated depending on the inputs and specification of the program.

Decision Table Testing There is an example of a typical Decision Table. The inputs in this given table derive the outputs depending on what conditions these inputs meet. Notice the use of “-“in the table below, these are known as don’t care entries. Don’t care entries are normally viewed as being false values which don’t require the value to define the output. Figure shows its values from the inputs as true(T) or false(F) values which are binary conditions, tables which use binary conditions are known as limited entry decision tables. Tables which use multiple conditions are known as extended entry decision tables. One important aspect to notice about decision tables is that they aren’t imperative as that they don’t apply any particular order over the conditions or actions.

Decision Table Based Testing Decision table is based on logical relationships just as the truth table. It is a tool that helps us look at the “complete” combination of conditions

Components of a Decision Table rules R1 R2 R3 R4 R5 R6 R7 R8 T T T T F F F F C1 C2 C3 values of conditions conditions T T F F T T F F T F T F T F T F a1 a2 a3 a4 a5 x x x x x x actions taken x x actions x x x x x x Read a Decision Table by columns of rules : R1 says when all conditions are T, then actions a1, a2, and a5 occur

Conditions in Decision Table The conditions in the decision table may take on any number of values. When it is binary, then the decision table conditions are just like a truth table set of conditions. (Note that the conditions do not have to be binary --- table gets “big” then.) The decision table allows the iteration of all the combinations of values of the condition, thus it provides a “completeness check.” The conditions in the decision table may be interpreted as the inputs, and the actions may be thought of as outputs. OR conditions needs to be thought as inputs needed set the conditions, and actions can be processing

Triangle Problem Example Consider a program statement that, given the length of 3 sides, determines whether the 3 sides can (i) form a triangle and (ii) what type of triangle (equilateral, isosceles, or scalene). The inputs are a, b, c sides (each between 1 and 200) Then the inputs must satisfy certain conditions: a < b + c b < a + c c < a + b Assume that we have performed the boundary value tests of the sides and that all passed. Then ---- next we use decision table to help.

Triangle Problem Example Pick input <a, b, c> for each of the columns Assume a, b and c are all between 1 and 200 a < b + c b < a + c c < a + b a = b a = c b = c F T T T T T T T T T T - F T T T T T T T T T - - F T T T T T T T T - - - T T T T F F F F - - - T T F F T T F F - - - T F T F T F T F Not triangle Scalene Isosceles Equilateral “impossible” X X X X X X X X X X Note the Impossible cases

How Many Test Cases for Triangle Problem? There is the “invalid situation” --- not a triangle: There are 3 test conditions in the Decision table Note the “-” entries, which represents “don’t care,” when it is determined that the input sides <a, b, c> do not form a triangle There is the “valid” triangle situation: There are 3 types of valid; so there are 23 = 8 potential conditions But there are 3 “impossible” situations So there are only 8 – 3 = 5 conditions So, for valid values of a, b, and c, we need to come up with 8 sets of <a, b, c> to test the 8 “Rules”.

Advantages/Disadvantages of Decision Table Allow us to start with a “complete” view, with no consideration of dependence Allow us to look at and consider “dependence,” “impossible,” and “not relevant” situations and eliminate some test cases. Allow us to detect potential error in our specifications Disadvantages: Need to decide (or know) what conditions are relevant for testing Scaling up can be massive: 2n for n conditions.

Example Consider the payroll system of a person (a) If the salary of a person is less than equal to Rs. 70,000 and expenses do not exceed Rs. 30,000 then 10% tax is charged by IT department. (b) If the salary is greater than Rs.60,000 and less than equal to Rs 2lakhs and expenses don't exceed Rs. 40,000 than 20% tax is charged by IT department. (c) For salary greater than Rs 2 lakhs, 5% additional surcharge is also charged. (d) If expenses are greater than Rs. 40,000 surcharge is 9%. Step 1: First of all we need to identify the causes and its effects.

Example Step 2:

Step 3: Transform cause-effect graph into the following decision table Step 3: Transform cause-effect graph into the following decision table. It may be noted that these 'causes' and 'effects' are nothing else but 'conditions' and 'actions' of our decision table. That is, if C1 and C4 are 1 (or true) then the effect (or action) is E1. Similarly, if C2 and C5 is 1 (or true), action to be taken is E2 and so on.

Step 4. Since there are 4 rules in our decision table above, so we must have at least 4 test cases to test this system using this technique. These test cases can be 1. Salary = 20,000, Expenses = 2000. 2. Salary = 1,00,000, Expenses = 10,000 3. Salary = 3,00,000, Expenses = 20,000  4. Salary = 3,00,000, Expenses = 50,000. Thus we can say that a decision table is used to derive the test cases which can also take into account the boundary values.