Decision Table Based Testing Outline Decision table vocabulary –Limited Entry Decision Tables (LEDT) –Extended Entry Decision Tables (EEDT) –Mixed Entry.

Slides:



Advertisements
Similar presentations
Overview Functional Testing Boundary Value Testing (BVT)
Advertisements

Testing “Multiple Conditions” with Decision Table Technique
Logic Gates A logic gate is an elementary building block of a digital circuit Most logic gates have two inputs and one output At any given moment, every.
Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Overview Functional Testing Boundary Value Testing (BVT)
Decision-Table Test Case Generation. DT terminology 2.
Decision Table Based Testing
Interaction Modeling for Testing We would generate the test cases based on our understanding of the interactions that may happen. The source is, again,
Chapter 4: Decision Table Testing Software Testing
ECE 301 – Digital Electronics Minterm and Maxterm Expansions and Incompletely Specified Functions (Lecture #6) The slides included herein were taken from.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Testing an individual module
Kirkwood Center for Continuing Education Introduction to PHP and MySQL By Fred McClurg, © Copyright 2010, All Rights Reserved 1.
Chapter 5 Retrospective on Functional Testing Software Testing
© 2005 by Prentice Hall Chapter 9 Structuring System Requirements: Logic Modeling Modern Systems Analysis and Design Fourth Edition.
Propositional Calculus Math Foundations of Computer Science.
Linear Systems The definition of a linear equation given in Chapter 1 can be extended to more variables; any equation of the form for real numbers.
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Equivalence Class Testing
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Digital Systems Presented by Prof Tim Johnson
Modeling and Design of Rule-Based Systems Yonglei Tao.
Boolean Algebra – I. Outline  Introduction  Digital circuits  Boolean Algebra  Two-Valued Boolean Algebra  Boolean Algebra Postulates  Precedence.
Programming Logic and Design Fourth Edition, Introductory
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
CS1Q Computer Systems Lecture 8
Chapter 4.1 Solving Systems of Linear Equations in two variables.
 In studying digital integrated circuits, one must start with the simplest group of circuit, the SSIs or Small Scale Integrated Circuits. Since these.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
1 Equivalence Class Testing Chapter 6. 2 Introduction Boundary Value Testing derives test cases with Massive redundancy Serious gaps Equivalence Class.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
CPS120: Introduction to Computer Science Operations Lecture 9.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Mathematical Preliminaries
Overview Functional Testing Boundary Value Testing (BVT)
Sum-of-Products (SOP)
Chapter 3 Special Section Focus on Karnaugh Maps.
1 Program Development  The creation of software involves four basic activities: establishing the requirements creating a design implementing the code.
© 2005 by Prentice Hall Chapter 9 Structuring System Requirements: Logic Modeling Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey.
Lecture 24: 12/3/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Logic Simplification-Using K-Maps
Chapter - 10 LOGIC-BASED TESTING. Programmers and Logic “Logic” is one of the most often used words In programmers’ vocabularies but one of their least.
Revision Mid 1 Prof. Sin-Min Lee Department of Computer Science.
1 Software Testing. 2 Equivalence Class Testing 3 The use of equivalence class testing has two motivations: –Sense of complete testing –Avoid redundancy.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
ACOE161Digital Circuit Design1 Design Of Combinational Logic Circuits.
Technical Seminar II Implementation of
Dr. ClincyLecture Slide 1 CS6020- Chapter 3 (3A and ) Dr. Clincy Professor of CS First Exam - Tuesday, September 6th Coverage: All subjects up to.
Digital Logic.
Overview Part 2 – Combinational Logic Functions and functional blocks
Computer Science 210 Computer Organization
Decision Table Testing
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
Boolean Algebra & De Morgan's Theorems
Types of Testing Visit to more Learning Resources.
Overview Functional Testing Boundary Value Testing (BVT)
Chapter 9 Structuring System Requirements: Logic Modeling
DESICION TABLE Decision tables are precise and compact way to model complicated logic. Decision table is useful when input and output data can be.
CSCE 747 Software Testing and Quality Assurance
Computer Aided Process Planning
CSCE 747 Software Testing and Quality Assurance
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
ECB2212-Digital Electronics Boolean algebra
Dr. Clincy Professor of CS
Chapter 3 Special Section
Overview Functional Testing Boundary Value Testing (BVT)
Truth tables Mrs. Palmer.
Chapter 9 Structuring System Requirements: Logic Modeling
Overview Functional Testing Boundary Value Testing (BVT)
Presentation transcript:

Decision Table Based Testing Outline Decision table vocabulary –Limited Entry Decision Tables (LEDT) –Extended Entry Decision Tables (EEDT) –Mixed Entry Decision Tables (MEDT) Techniques –Redundant LEDTs –Inconsistent LEDTs Examples Guidelines Cause and Effect Graphs

Decision Table Based Testing Decision table is based on logical relationships just as the truth table. Decision Table is a tool that helps us look at the combination of conditions –Completeness of conditions –Inconsistency of conditions

Decision Table Based Testing Originally known as Cause and Effect Graphing –Done with a graphical technique that expressed AND-OR-NOT logic. –Causes and Effects were graphed like circuit components –Inputs to a circuit “caused” outputs (effects) Equivalent to forming a decision table in which: –inputs are conditions –outputs are actions Test every (possible) rule in the decision table. Recommended for logically complex situations. Excellent example of Model-Based Testing (MBT)

Content of a Decision Table Conditions –binary in a Limited Entry Decision Table –finite set in an Extended Entry Decision Table –condition stub –condition entries Actions –also binary, either do or skip –the “impossible” action Rules –a rule consists of condition entries and action entries –a complete, non-redundant LEDT with n conditions has 2 n rules –logically impossible combinations of conditions are “impossible rules”, denoted by an entry in the impossible action

Components of a Decision Table C1 C2 C3 a1 a2 a3 a4 a5 T T T T F F F F T T F F T F T F x x x x x x x x x x “binary” conditions actions values of conditions actions taken R1 R2 R3 R4 R5 R6 R7 R8 rules Read a Decision Table by columns of rules : (e.g. R1 from reqs. or design says when all conditions are T, then actions a1, a2, and a5 should occur)

Example (continued) The condition entries in rules 3 and 4, and rules 7 and 8 have the same actions. The “—” means... –“Don’t Care” (as in circuit analysis), –Irrelevant, or –not applicable, n/a StubRule 1Rule 2 Rules 3, 4 Rule 5Rule 6 Rules 7, 8 c1TTTFFF c2TTFTTF c3TF—TFT a1XXX— a2XX a3X a4XXX

Example (continued) StubRule 1Rule 2 Rules 3, 4, 7, 8 Rule 5Rule 6 c1TT—FF c2TTFTT c3TF—TF a1XXX a2XX a3X a4XX count11411 Rule counting –a rule with no don’t care entries counts as 1 –each don’t care entry in a rule doubles the rule count –for a table with n limited entry conditions, the sum of the rule counts should be 2 n.

Problematic Decision Tables For LEDTs, simple rule counting helps identify decision tables that are... –incomplete ( rule count < 2 n ), –redundant ( rule count > 2 n ), or –inconsistent ( rule count > 2 n ) AND at least two rules have identical condition entries but different action entries. Redundancy and inconsistency are more likely with algebraically simplified tables that have been “maintained”.

A Redundant DT Rule 9 is redundant with Rules 1 – 4 (technically, with what was rule 4) But the action entries are identical (No harm, no foul?) conditions 1 – c1TFFFFT c2—TTFFF c3—TFTFF a1XXX——X a2—XXX—— a3X—XXXX

An Inconsistent DT Rule 9 is inconsistent with Rules 1 – 4 (technically, with what was rule 4) –condition portion is identical, BUT –action portion is different What happens when Rule 4 is executed? Rule 9? conditions 1 – c1TFFFFT c2—TTFFF c3—TFTFF a1XXX—— — a2—XXX— X a3X—XXX —

Month Equivalence Classes (to be used in the next example ) M1 ={x : x is a 30-day month} M2 ={x : x is a 31-day month} M3 ={x : x is February}

Last Day of Month Decision Table conditions c1. M1? TTTTTTTTFFFFFFFF c2. M2? TTTTFFFFTTTTFFFF c3. M3? TTFFTTFFTTFFTTFF c4. leap year? TFTFTFTFTFTFTFTF a1. last day = 30 xx a2. last day = 31 xx a3. last day = 28 x a4. last day = 29 x a5. impossible xxxxxxxxxx Rule pairs 1 and 2, 3 and 4, 5 and 6, 9 and 10 don’t need c4, so they could be combined, BUT Impossible because c1, c2, and c3 are mutually exclusive.

Extended Entry Decision Tables When conditions are mutually exclusive, exactly one must be true. Extended entry decision tables typically (but not necessarily) have mutually exclusive conditions. The “extended” part is because a condition stub is an incomplete statement that is completed by the condition entry. (See the revised Last Day of Month EEDT)

Revised Last Day of Month DT When conditions are mutually exclusive, exactly one must be true. This can be further simplified. c1. 30-day month? M1 ———— c2. 31-day month? —— M2 —— c3. February? ———— M3 c4. leap year?TFTFTF a1. last day = 30xx a2. last day = 31xx a3. last day = 28x a4. last day = 29x

The “Emphatic False” Maybe “—” should be replaced by “must be False” One writer suggested “F!” (before “!” meant “NOT”) It is a Don’t Care in c4. Technically, this is a Mixed Entry Decision Table, because it has both extended and limited entry conditions. c1. month inM1——— c2. month in—M2—— c3. month in——M3 c4. leap year?——TF a1. last day = 30x a2. last day = 31x a3. last day = 28x a4. last day = 29x

c1: a, b, c form a triangle?FTTTTTTTT c2: a = b?—TTTTFFFF c3: a = c?—TTFFTTFF c4: b = c?—TFTFTFTF a1: Not a triangleX a2: ScaleneX a3: IsoscelesXXX a4: EquilateralX a5: ImpossibleXXX Triangle Program Decision Table Why are some rules impossible?

Expanding c1... c1: a<b+c?FTTTTTTTTTT c2: b<a+c?—FTTTTTTTTT c3: c<a+b?——FTTTTTTTT c4: a = b?———TTTTFFFF c5: a = c?———TTFFTTFF c6: b = c?———TFTFTFTF a1: Not a trianglexxx a2: Scalenex a3: Isoscelesxxx a4: Equilateralx a5: Impossiblexxx Is this a complete decision table? How many test cases does this imply?

Triangle Problem Example (“short” form) 1.a < b + c 2.b < a + c 3.c < a + b 4.a = b 5.a = c 6.b = c 1.Not triangle 1.Scalene 2.Isosceles 3.Equilateral 4.“impossible” 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 X X X X X X X X X X X Note the Impossible cases Pick input set,, for each of the columns, or rules, below Assume a, b and c are all between 1 and 200 R1R2R3R4R5R7R6R9R8 R11R10 equivalent or all necessary Req or Design should NOT have these cases

Rule Counting c1: a<b+c?FTTTTTTTTTT c2: b<a+c?—FTTTTTTTTT c3: c<a+b?——FTTTTTTTT c4: a = b?———TTTTFFFF c5: a = c?———TTFFTTFF c6: b = c?———TFTFTFTF Rule count a1: Not a trianglexxx a2: Scalene x a3: Isosceles x xx a4: Equilateral x a5: Impossible xx x

Corresponding Test Cases Case IDabcExpected Output DT1412Not a Triangle DT2142Not a Triangle DT3124Not a Triangle DT4555Equilateral DT5???Impossible DT6???Impossible DT7223Isosceles DT8???Impossible DT9232Isosceles DT10322Isosceles DT11345Scalene

NextDate Decision Table (first half) c1: month inM1 M2 c2: day inD1D2D3D4D5D1D2D3D4D5 c3: year in—————————— a1: impossible X a2: increment dayXXX XXXX a3: reset day X X a4: increment month X X a5: reset month a6: increment year M1: 30 days months, M2: 31 days months, M3: Dec, M4: Feb D1: 1~27, D2: 28, D3: 29, D4: 30, D5: 31 Y1: leap year, Y2: common year

NextDate Decision Table (first half reduced) 1–3456–910 c1: month inM1 M2 c2: day inD1, D2, D3D4D5D1, D2, D3, D4D5 c3: year in————— a1: impossible X a2: increment dayX X a3: reset day X X a4: increment month X X a5: reset month a6: increment year

NextDate Decision Table (second half) c1: month inM3 M4 c2: day inD1D2D3D4D5D1D2 D3 D4D5 c3: year in——————Y1Y2Y1Y2—— a1: impossible XXX a2: increment dayXXXX XX a3: reset day X XX a4: increment month XX a5: reset month X a6: increment year X M1: 30 days months, M2: 31 days months, M3: Dec, M4: Feb D1: 1~27, D2: 28, D3: 29, D4: 30, D5: 31 Y1: leap year, Y2: common year

NextDate Decision Table (second half reduced) 11– , 22 c1: month inM3 M4 c2: day inD1, D2, D3, D4 D5D1D2 D3 D4, D5 c3: year in———Y1Y2Y1Y2— a1: impossible XX a2: increment dayX X a3: reset day XX XX a4: increment month XX a5: reset month X a6: increment year X

NextDate Test Cases Test CaseRule(s)MonthDayYearExpected Output 1 1– /16/ /1/ Invalid Input Date 4 6– /16/ /1/ – /16/ /1/ /16/ /29/ /1/ /1/ Invalid Input Date 13 21, Invalid Input Date

Advantages/Disadvantages of Decision Table Advantages: (check completeness & consistency) 1.Allow us to start with a “complete” view, with no consideration of dependence 2.Allow us to look at and consider “dependence,” “impossible,” and “not relevant” situations and eliminate some test cases. 3.Allow us to detect potential error in our Specifications Disadvantages: 1.Need to decide (or know) what conditions are relevant for testing this may require Domain knowledge e.g. need to know leap year for “next date” problem in the book 2.Scaling up can be massive: 2 n rules for n conditions that’s if the conditions are binary and gets worse if the values are more than binary