SlideShare a Scribd company logo
1 of 13
SOFTWARE
TESTING & QA
Lectire7- Black Box
testing (Decision Table
Testing)
1
DECISION-TABLE-BASED
TESTING
Decision tables are a simple formalism to describe how
different combinations of inputs may generate different outputs.
Decision tables find practical us particularly in data processing
applications. Their tabular form makes them easy to
understand and supports a systematic derivation of tests
DECISION TABLE-BASED
TESTING (DTT)
Applicable to the software requirements written using “if-then”
statements
Can be automatically translated into code
Assume the independence of inputs
Example
 If c1 AND c2 OR c3 then A1
 c1, c2 and c3 are conditions while A1 is an action
CONDITIONS (CAUSES)
AND ACTIONS
(EFFECTS)
A CONDITION or CAUSE may be thought of as a distinct input
condition, or an “equivalence class” of input conditions.
An ACTON or EFFECT may be thought of as a distinct output
condition or change in program state.
DECISION-TABLE-BASED
TESTING
One can generate test cases naturally on the basis of the
decision table, trying to apply the complete coverage criteria so
that each column of the table is exercised by at least one test
This technique may be too expensive in terms of the number of
experiments to be carried out, because of the exponential
growth in the number of test cases with respect to the number
of conditions
In fact, in general, the number of columns can go up to 2n,
where n is the number of conditions
SAMPLE OF DECISION
TABLE
A decision table is consists of a
number of columns (rules) that
comprise all test situations.
C1, C2..Cn are conditions
(Causes)
A1, A2…An are actions (Effects)
R1, R2,…Rm are Rules (test
cases)
Action A1 will take place if c1 and
c2 are true (or satisfied)
1: means the condition is true.
0: means the condition is false.
x: don’t care.
R1 R2 Rm
C1 1 1 0
C2 1 0 0
x x 1
Cn 0 0 0
A1 1 0 0
A2 0 1 1
… 0 0 0
An o o 1
BANK EXAMPLE
Consider a bank software responsible for debiting from an
account. The relevant conditions and actions are:
 C1: The account number is correct
 C2: The signature matches
 C3: There is enough money in the account
 A1: Give money
 A2: Give statement indicating insufficient funds
 A3: Call vigilance to check for fraud!
BANK EXAMPLE-
CONTINUED
A1 is to be performed when C1, C2, and C3 are true.
A2 is to be performed when C1 is true and C2 and C3 are false
or when C1 and C2 are true and C3 is false.
A3 is to be performed when C2 and C3 are false.
R1 R2 R3 R4
C1 1 1 1 0
C2 1 1 0 0
C3 1 0 0 x
A1 1 0 0 0
A2 0 1 1 0
A3 0 0 0 1
DECISION TABLES FOR
BANK EXAMPLE
BANK EXAMPLE-CONT..
What are the appropriate
test cases for this
problem? Check the rules
10
EXAMPLE(2): ATM
For a simple ATM banking transaction
system
 Causes (Conditions)
 C1: Command is credit
 C2: command is debit
 C3: account number is valid
 C4: transaction amount is valid
 Effects (Actions)
 A1: Print “invalid command”
 A2: Print “ invalid account number”
 A3: Print “debit amount not valid”
 A4: debit account
 A5: Credit account
ATM CAUSE-EFFECT
DECISION TABLE
C R1 R2 R3 R4 R5
C1 0 1 x x 1
C2 0 x 1 1 x
C3 x 0 1 1 1
C4 x x 0 1 1
A1 1 0 0 0 0
A2 0 1 0 0 0
A3 0 0 1 0 0
A4 0 0 0 1 0
A5 0 0 0 0 1
ANOTHER HOMEWORK
ON DT
Consider an e-commerce application. At the user interface layer, we need to validate payment information,
specifically credit card type, card number, card security code, expiration month, expiration year, and cardholder
name. You can use boundary value analysis and equivalence partitioning to test the ability of the application to
verify the payment information, as much as possible, before sending it to the server. So, once that information goes
to the credit card processing company for validation,
how can we test that? Again, we could handle that with equivalence partitioning, but there are actually a whole set
of conditions that determine this processing: Does the named person hold the credit card entered, and is the other
information
correct?
Is it still active or has it been cancelled?
Is the person within or over their limit?
Is the transaction coming from a normal or a suspicious location?
The decision table in Table 1 shows how these four conditions interact to determine
which of the following three actions will occur:
Should we approve the transaction?
Should we call the cardholder (e.g., to warn them about a purchase from a strange place)?
Should we call the vendor (e.g., to ask them to seize the cancelled card)?
13

More Related Content

Similar to Black Box Testing (Decision Table Testing

Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxEyasu46
 
Decision table
Decision tableDecision table
Decision tableDMANIMALA
 
EDA_Assignment_Sourabh S Hubballi.pdf
EDA_Assignment_Sourabh S Hubballi.pdfEDA_Assignment_Sourabh S Hubballi.pdf
EDA_Assignment_Sourabh S Hubballi.pdfSourabhH1
 
10 ways to identify Accounts Payable fraud Pt1
10 ways to identify Accounts Payable fraud Pt110 ways to identify Accounts Payable fraud Pt1
10 ways to identify Accounts Payable fraud Pt1Lavante, Inc.
 
Decision Table Based Testing
Decision Table Based TestingDecision Table Based Testing
Decision Table Based TestingHimani Solanki
 
SE 09 (test design techs).pptx
SE 09 (test design techs).pptxSE 09 (test design techs).pptx
SE 09 (test design techs).pptxZohairMughal1
 
CIS 1403 lab 4 selection
CIS 1403 lab 4 selectionCIS 1403 lab 4 selection
CIS 1403 lab 4 selectionHamad Odhabi
 
Project crm submission sonali
Project crm submission sonaliProject crm submission sonali
Project crm submission sonaliSonali Gupta
 
Neural Network Model
Neural Network ModelNeural Network Model
Neural Network ModelEric Esajian
 
How to do ahp analysis in excel
How to do ahp analysis in excelHow to do ahp analysis in excel
How to do ahp analysis in excelJ.Roberto S.F
 
Detection of credit card fraud
Detection of credit card fraudDetection of credit card fraud
Detection of credit card fraudBastiaan Frerix
 
Supervised learning
Supervised learningSupervised learning
Supervised learningJohnson Ubah
 
TransactionBasedAnalytics2010
TransactionBasedAnalytics2010TransactionBasedAnalytics2010
TransactionBasedAnalytics2010Vijay Desai
 
DBM380 v14Create a DatabaseDBM380 v14Page 2 of 2Create a D.docx
DBM380 v14Create a DatabaseDBM380 v14Page 2 of 2Create a D.docxDBM380 v14Create a DatabaseDBM380 v14Page 2 of 2Create a D.docx
DBM380 v14Create a DatabaseDBM380 v14Page 2 of 2Create a D.docxedwardmarivel
 
Lecture 3 Statistical ProcessControl (SPC).docx
Lecture 3 Statistical ProcessControl (SPC).docxLecture 3 Statistical ProcessControl (SPC).docx
Lecture 3 Statistical ProcessControl (SPC).docxsmile790243
 
Part 1 of 8 - Question 1 of 17 1.0 Points A pha.docx
Part 1 of 8 -  Question 1 of 17 1.0 Points A pha.docxPart 1 of 8 -  Question 1 of 17 1.0 Points A pha.docx
Part 1 of 8 - Question 1 of 17 1.0 Points A pha.docxherbertwilson5999
 
1-Base-CaseTool KitChapter 11112118Note Calculations are automa
1-Base-CaseTool KitChapter 11112118Note Calculations are automa1-Base-CaseTool KitChapter 11112118Note Calculations are automa
1-Base-CaseTool KitChapter 11112118Note Calculations are automaMartineMccracken314
 
1-Base-CaseTool KitChapter 11112118Note Calculations are automa
1-Base-CaseTool KitChapter 11112118Note Calculations are automa1-Base-CaseTool KitChapter 11112118Note Calculations are automa
1-Base-CaseTool KitChapter 11112118Note Calculations are automaAbbyWhyte974
 

Similar to Black Box Testing (Decision Table Testing (20)

Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
 
Decision table
Decision tableDecision table
Decision table
 
EDA_Assignment_Sourabh S Hubballi.pdf
EDA_Assignment_Sourabh S Hubballi.pdfEDA_Assignment_Sourabh S Hubballi.pdf
EDA_Assignment_Sourabh S Hubballi.pdf
 
10 ways to identify Accounts Payable fraud Pt1
10 ways to identify Accounts Payable fraud Pt110 ways to identify Accounts Payable fraud Pt1
10 ways to identify Accounts Payable fraud Pt1
 
Decision Table Based Testing
Decision Table Based TestingDecision Table Based Testing
Decision Table Based Testing
 
SE 09 (test design techs).pptx
SE 09 (test design techs).pptxSE 09 (test design techs).pptx
SE 09 (test design techs).pptx
 
CIS 1403 lab 4 selection
CIS 1403 lab 4 selectionCIS 1403 lab 4 selection
CIS 1403 lab 4 selection
 
Project crm submission sonali
Project crm submission sonaliProject crm submission sonali
Project crm submission sonali
 
Blackbox
BlackboxBlackbox
Blackbox
 
Neural Network Model
Neural Network ModelNeural Network Model
Neural Network Model
 
How to do ahp analysis in excel
How to do ahp analysis in excelHow to do ahp analysis in excel
How to do ahp analysis in excel
 
Detection of credit card fraud
Detection of credit card fraudDetection of credit card fraud
Detection of credit card fraud
 
Supervised learning
Supervised learningSupervised learning
Supervised learning
 
TransactionBasedAnalytics2010
TransactionBasedAnalytics2010TransactionBasedAnalytics2010
TransactionBasedAnalytics2010
 
DBM380 v14Create a DatabaseDBM380 v14Page 2 of 2Create a D.docx
DBM380 v14Create a DatabaseDBM380 v14Page 2 of 2Create a D.docxDBM380 v14Create a DatabaseDBM380 v14Page 2 of 2Create a D.docx
DBM380 v14Create a DatabaseDBM380 v14Page 2 of 2Create a D.docx
 
Lecture 3 Statistical ProcessControl (SPC).docx
Lecture 3 Statistical ProcessControl (SPC).docxLecture 3 Statistical ProcessControl (SPC).docx
Lecture 3 Statistical ProcessControl (SPC).docx
 
Part 1 of 8 - Question 1 of 17 1.0 Points A pha.docx
Part 1 of 8 -  Question 1 of 17 1.0 Points A pha.docxPart 1 of 8 -  Question 1 of 17 1.0 Points A pha.docx
Part 1 of 8 - Question 1 of 17 1.0 Points A pha.docx
 
Test case, test sets and test scripts
Test case, test sets and test scriptsTest case, test sets and test scripts
Test case, test sets and test scripts
 
1-Base-CaseTool KitChapter 11112118Note Calculations are automa
1-Base-CaseTool KitChapter 11112118Note Calculations are automa1-Base-CaseTool KitChapter 11112118Note Calculations are automa
1-Base-CaseTool KitChapter 11112118Note Calculations are automa
 
1-Base-CaseTool KitChapter 11112118Note Calculations are automa
1-Base-CaseTool KitChapter 11112118Note Calculations are automa1-Base-CaseTool KitChapter 11112118Note Calculations are automa
1-Base-CaseTool KitChapter 11112118Note Calculations are automa
 

Recently uploaded

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 

Recently uploaded (20)

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 

Black Box Testing (Decision Table Testing

  • 1. SOFTWARE TESTING & QA Lectire7- Black Box testing (Decision Table Testing) 1
  • 2. DECISION-TABLE-BASED TESTING Decision tables are a simple formalism to describe how different combinations of inputs may generate different outputs. Decision tables find practical us particularly in data processing applications. Their tabular form makes them easy to understand and supports a systematic derivation of tests
  • 3. DECISION TABLE-BASED TESTING (DTT) Applicable to the software requirements written using “if-then” statements Can be automatically translated into code Assume the independence of inputs Example  If c1 AND c2 OR c3 then A1  c1, c2 and c3 are conditions while A1 is an action
  • 4. CONDITIONS (CAUSES) AND ACTIONS (EFFECTS) A CONDITION or CAUSE may be thought of as a distinct input condition, or an “equivalence class” of input conditions. An ACTON or EFFECT may be thought of as a distinct output condition or change in program state.
  • 5. DECISION-TABLE-BASED TESTING One can generate test cases naturally on the basis of the decision table, trying to apply the complete coverage criteria so that each column of the table is exercised by at least one test This technique may be too expensive in terms of the number of experiments to be carried out, because of the exponential growth in the number of test cases with respect to the number of conditions In fact, in general, the number of columns can go up to 2n, where n is the number of conditions
  • 6. SAMPLE OF DECISION TABLE A decision table is consists of a number of columns (rules) that comprise all test situations. C1, C2..Cn are conditions (Causes) A1, A2…An are actions (Effects) R1, R2,…Rm are Rules (test cases) Action A1 will take place if c1 and c2 are true (or satisfied) 1: means the condition is true. 0: means the condition is false. x: don’t care. R1 R2 Rm C1 1 1 0 C2 1 0 0 x x 1 Cn 0 0 0 A1 1 0 0 A2 0 1 1 … 0 0 0 An o o 1
  • 7. BANK EXAMPLE Consider a bank software responsible for debiting from an account. The relevant conditions and actions are:  C1: The account number is correct  C2: The signature matches  C3: There is enough money in the account  A1: Give money  A2: Give statement indicating insufficient funds  A3: Call vigilance to check for fraud!
  • 8. BANK EXAMPLE- CONTINUED A1 is to be performed when C1, C2, and C3 are true. A2 is to be performed when C1 is true and C2 and C3 are false or when C1 and C2 are true and C3 is false. A3 is to be performed when C2 and C3 are false.
  • 9. R1 R2 R3 R4 C1 1 1 1 0 C2 1 1 0 0 C3 1 0 0 x A1 1 0 0 0 A2 0 1 1 0 A3 0 0 0 1 DECISION TABLES FOR BANK EXAMPLE
  • 10. BANK EXAMPLE-CONT.. What are the appropriate test cases for this problem? Check the rules 10
  • 11. EXAMPLE(2): ATM For a simple ATM banking transaction system  Causes (Conditions)  C1: Command is credit  C2: command is debit  C3: account number is valid  C4: transaction amount is valid  Effects (Actions)  A1: Print “invalid command”  A2: Print “ invalid account number”  A3: Print “debit amount not valid”  A4: debit account  A5: Credit account
  • 12. ATM CAUSE-EFFECT DECISION TABLE C R1 R2 R3 R4 R5 C1 0 1 x x 1 C2 0 x 1 1 x C3 x 0 1 1 1 C4 x x 0 1 1 A1 1 0 0 0 0 A2 0 1 0 0 0 A3 0 0 1 0 0 A4 0 0 0 1 0 A5 0 0 0 0 1
  • 13. ANOTHER HOMEWORK ON DT Consider an e-commerce application. At the user interface layer, we need to validate payment information, specifically credit card type, card number, card security code, expiration month, expiration year, and cardholder name. You can use boundary value analysis and equivalence partitioning to test the ability of the application to verify the payment information, as much as possible, before sending it to the server. So, once that information goes to the credit card processing company for validation, how can we test that? Again, we could handle that with equivalence partitioning, but there are actually a whole set of conditions that determine this processing: Does the named person hold the credit card entered, and is the other information correct? Is it still active or has it been cancelled? Is the person within or over their limit? Is the transaction coming from a normal or a suspicious location? The decision table in Table 1 shows how these four conditions interact to determine which of the following three actions will occur: Should we approve the transaction? Should we call the cardholder (e.g., to warn them about a purchase from a strange place)? Should we call the vendor (e.g., to ask them to seize the cancelled card)? 13