Decision Table Testing

Slides:



Advertisements
Similar presentations
Preparing a Decision Table
Advertisements

Truth Tables How to Make and Use. Making a Truth Table To determine the number of rows other than the heading row. To determine the number of rows other.
Decision Table Based Testing
Black Box Testing Csci 565 Spring 2009.
 After the 7 transactions, the ledger looks like Page 105 Figure 4.5. (Show On the White board)  There are 10 accounts in the ledger.  How do you calculate.
CSC 123 Systems Analysis & Design
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Test Case Design: Strategies, Techniques & Models Robin Brennan, Senior Consultant Quality Assurance Institute.
Programming Types of Testing.
Requirement Analysis and Specification Mr. Manoj Kumar Kar.
Modeling the Data: Conceptual and Logical Data Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Testing an individual module
Introduction to Software Testing Chapter 3.1 Logic Coverage Paul Ammann & Jeff Offutt.
© 2005 by Prentice Hall Chapter 9 Structuring System Requirements: Logic Modeling Modern Systems Analysis and Design Fourth Edition.
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Equivalence Class Testing
Test Design Techniques
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Chapter 9 Structuring System Requirements: Logic Modeling
Analytical Aspects of Audit Stephen Allen, ACBA. Aspects Covered Sample selection from paper lists or multiple sources Simulating applications in MS Excel.
Worksheet for a Service Business
Modeling and Design of Rule-Based Systems Yonglei Tao.
Introduction Telerik Software Academy Software Quality Assurance.
Chapter 11 Describing Process Specifications and Structured Decisions Systems Analysis and Design Kendall and Kendall Fifth Edition.
CS1Q Computer Systems Lecture 8
8. PROCESS DESCRIPTION System Analysis And Design Program: BSCS II (Advent Semester – 2014) Lecturer: Rebecca Asiimwe
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Black-Box Testing Techniques I
1 © 2005 course technology University Of Palestine Chapter 6 (cont.) Storyboarding the User’s Experience.
Computer Aided Process Planning (CAPP). What is Process Planning? Process planning acts as a bridge between design and manufacturing by translating design.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Lecture 5: Writing the Project Documentation Part III.
1 Boolean Expressions to Make Comparisons Boolean expression –Represents only one of two states –Expression evaluates to either true or false Expressions.
ANALYSIS OF VARIANCE (ANOVA) BCT 2053 CHAPTER 5. CONTENT 5.1 Introduction to ANOVA 5.2 One-Way ANOVA 5.3 Two-Way ANOVA.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
UML’s StateChart FSM, EFSM in UML Concurrent states Tool support.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
Week 3.  Business document from which information for journal entry is obtained.  Transaction generates source document.  Each transaction must have.
Essentials of OVID Using UML based notation to capture system requirements and design.
Introduction to Software Testing Chapter 3.1 Logic Coverage Paul Ammann & Jeff Offutt.
Decision Table Based Testing Outline Decision table vocabulary –Limited Entry Decision Tables (LEDT) –Extended Entry Decision Tables (EEDT) –Mixed Entry.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
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.
Testing Constrained Combinations Telerik Software Academy Software Quality Assurance.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Copyright © 2011 Pearson Education Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall & Kendall Global Edition 9.
Dynamic White-Box Testing What is code coverage? What are the different types of code coverage? How to derive test cases from control flows?
Decision Tables and Pseudocode
IS 334 information systems analysis and design
Decision Table Testing
Questions Describe the following gates
Process Specifications and Structured Decisions
Chapter 9 Structuring System Requirements: Logic Modeling
Other Kinds of Arrays Chapter 11
UML’s StateChart FSM, EFSM in UML Concurrent states Tool support.
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 9 Structuring System Requirements: Logic Modeling
Computer Aided Process Planning
Describing Process Specifications and Structured Decisions
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Chapter 11 Describing Process Specifications and Structured Decisions
Decision Tables SEEM 3430 Tutorial LI Jing.
Boolean Expressions to Make Comparisons
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 9 Structuring System Requirements: Logic Modeling
Decision Tables SEEM 3430 Tutorial Lanjun Zhou.
Presentation transcript:

Decision Table Testing Testing the Business Logic Petar Horozov Nikolay Nedyalkov Senior QA Engineer Senior QA Engineer XAML Team 4 XAML Team 4 Telerik QA Academy

Table of Contents Decision Table Testing – Main Concepts Decision Tables Creating Decision Tables Collapsing Columns in Decision Tables Cause-effect Graphs Decision Table to Cause-effect Graph Transitioning

Table of Contents (2) Combining Decision Tables With Other Techniques Avoiding Combinatorial Explosions And Common Errors

Decision Table Testing – Main Concepts

What is Decision Tables Testing? Decision tables are a method for testing the business logic that lies underneath the user interface Decision tables express the rules that govern handling of transactional situations

What is Decision Tables Testing? (2) Transactional situations Situations where the conditions that exist at a given moment are sufficient by themselves to determine the actions of the system Decision tables testing connects combinations of conditions with the actions that should occur

Decision Tables Components Condition stubs Interpreted as input Condition entries Restricted to binary values (limited entry table) More than two values (extended entry table) Action stubs Interpreted as output Action entries Whether an action is to be performed

Decision Tables Components (2) Example of decision table component structure :

The Decision Table Bug Hypothesis What kind of bugs are we looking for? Under some combination of conditions, a wrong action might occur Some action that the system is not to take under this combination of conditions Under some combination of conditions, the system might not take the right action Not taking a required action

Table vs. Graph The underlying model of decision table testing has two variations: Table More commonly used Boolean graph Less typical If the graph is used, this technique is also referred to as a cause-effect graph

Creating Test Cases Creating test cases with decision tables Every rule (column) is replaced with concrete data values Necessary preconditions are set During test execution actual actions taken are compared to expected ones

Business Rules Each column in a decision table contains a business rule A single business rule Conditions 1 2 3 4 5 6 7 8 Condition A Y N Condition B Condition C Actions Action A Action B

Business Rules (2) Each business rule says, in essence: "Under this particular combination of conditions - carry out this particular combination of actions."

The Coverage Criterion The coverage criterion for decision tables is expressed by a simple rule: "One test per column in the decision table have to be derived."

Creating a Decision table The number of columns (business rules) in a decision table is equal to 2n For n = the number of conditions Applied when conditions are strictly Boolean – true or false 2n = 8 Conditions 1 2 3 4 5 6 7 8 Condition A Y N Condition B Condition C Actions … n = 3

Creating a Decision table (2) When conditions are not Boolean – extended decision table Where x = number of possible condition entries xⁿ = ? Conditions 1 2 3 4 5 6 7 8 Condition A Condition B Condition C Actions … n = 3

Conditions Population Pattern Conditions in a decision table are populated using a simple pattern: Half of the first row is filled with "Yes", the other half – with "No" The second row is filled: first quarter "Yes", second quarter "No" … … The last row is filled: one cell "Yes", one cell "No" …

Conditions Population Pattern (2) Conditions in a decision table are populated using a simple pattern: Conditions 1 2 3 4 5 6 7 8 Condition A Y N Condition B Condition C Actions …

Creating Decision Tables Demo

Collapsing Columns in Decision Tables Reducing the Repetitive Test Rules

Collapsing Columns In a Decision Table Not all columns in a decision table are actually needed We can sometimes collapse the decision table, combining columns, to achieve a more concise decision table Performed when the value of one or more particular conditions can't affect the actions for two or more combinations of conditions

Collapsing Columns In a Decision Table (2) To combine columns – we should look for two or more columns that result in the same combination of actions Conditions 1 2 3 4 5 6 7 8 Condition A Y N Condition B Condition C Actions Action A Action B Action C

Collapsing Columns In a Decision Table (3) In these columns – some of the conditions will be the same, and some will be different Different ones don't seem to affect the outcome Conditions 1 2 3 4 5 6 7 8 Condition A Y N Condition B Condition C Actions Action A Action B Action C

Collapsing Columns In a Decision Table (4) Each group of repetitive two (or more) columns can be combined in a single one 4 = 5 7 = 8 Conditions 1 2 3 4 5 6 7 8 Condition A Y N Condition B Condition C Actions Action A Action B Action C

Collapsing Columns In a Decision Table (5) Insignificant values are replaced with "–" (dash) Means that any value can be used Conditions 1 2 3 4 5 6 Condition A Y – N Condition B Condition C Actions Action A Action B Action C

A Little Hint Combinable columns are often next to each other Nevertheless this is not always the case

Collapsing Columns in a Decision Table Demo

Transitions Between Decision Tables and Cause-effect Graphs

Cause-effect Graphs Cause-effect graphs are graphical representations of the same rules, described via decision tables They can be very helpful for assuring no mistakes are made in cases of collapsing decision tables Cause-effect graphs can be converted from decision tables or created directly

Table to Graph Transitioning Creating a cause-effect graph from a decision table can be performed in a few steps: List all the conditions on left of the blank page List all the actions on the right of the page Read the table to identify how combinations cause an action Connect one or more conditions with each action using Boolean operators Repeat for all actions

Cause-effect Graphs Legend Interactions in cause-effect graphs are represented with Boolean operations according to the following legend: A causes B A1 or A2 causes B Not A causes B A1 and A2 causes B

Decision Table to Cause-effect Graph Transitioning Demo

Cause-effect Graphs

Truth Tables For fulfilling the coverage criterion for cause- effect graphs a "truth table" is generated Contains all possible combinations of conditions Serves for ensuring that one test for each row of the truth table is generated

Combining Decision Tables With Other Techniques

Nonexclusive Rules in Decision Tables Testing

Nonexclusive Rules Sometimes more than one rule can apply to a transaction Zero, one, several or all of the rules may be applied at the same time Conditions 1 2 3 Red Y - Yellow Green Actions Stop Ready Go

Avoiding Combinatorial Explosions And Common Errors

Avoiding Combinatorial Explosions Testing combinations of factors without consideration of the total count of those tests Consider the amount of combinations before trying to test them all How many combination exist for testing 3 factors with 2 options each? What about 6 factors with 5 options each? 23 = 8 56 = 15 625

Avoiding Combinatorial Explosions (2) Combinatorial explosions can be avoided: Identify the possible combinations Use risk to weight those combinations Test only the important combinations Other techniques are also applicable: Classification trees Pairwise testing

Common Errors Incompleteness Contradiction Redundancy Ambiguity Not all conditions are covered Contradiction Two rules with the same conditions lead to different actions Redundancy Two rules with the same conditions lead to the same action Ambiguity A reduced table with contradictory and/or redundancy errors

Decision Table Testing ? ? ? ? ? Questions? ? ? ? ? ? ?

Exercises (1) Below is a decision table for reservation of meeting room. Fill in the columns with true and false: Conditions 1 2 3 4 5 6 7 8 No. of participants <= capacity? Room available? Account no. valid? Actions Msg: No room of the right size available Msg: Room already booked Msg: Account no. not valid Book room

Exercises (2) Below is a decision table for daily activities. Fill in the columns with true and false: Conditions 1 2 3 4 5 6 7 8 Is today a weekday? Is today a holiday? Is it raining? Actions Go to work Go on a picnic Stay home

Exercises (3) A store wishes to program a decision on non- cash receipts for goods into their intelligent tills. The conditions to check are agreed as: Transaction under £50 Pays by cheque with cheque card (guarantee £50) Pays by credit card The possible actions that a cashier could take are agreed as:

Exercises (3) Ring up sale Call a supervisor Automatic check of credit card company database Using the rules above construct a decision table showing all possible combinations of alternatives.

Resources http://decisiontables.wikispaces.com/Types+of +Decision+Tables http://www.cems.uwe.ac.uk/jharney/table.ht ml http://books.google.bg/books?id=yU- rTcurys8C&pg=PA133&dq=cause+effect+graph s&hl=en&sa=X&ei=PVPEUbC2HY7dsgaj14E4& ved=0CDgQ6AEwAg#v=onepage&q=cause%2 0effect%20graphs&f=false

Contacts Nikolay Nedyalkov Petar Horozov email: nikolay.nedyalkov@telerik.com Petar Horozov email: petar.horozov@telerik.com