0% found this document useful (0 votes)
1 views30 pages

Decision Table Based Testing

The document discusses the importance of decision tables in software testing, highlighting their role in documenting logic and ensuring all input combinations are tested. It presents examples such as the Triangle Problem and the Next Date Problem to illustrate how decision tables can be applied to validate inputs and test edge cases effectively. Additionally, it covers concepts like boundary value analysis to further emphasize the need for thorough testing in software development.

Uploaded by

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

Decision Table Based Testing

The document discusses the importance of decision tables in software testing, highlighting their role in documenting logic and ensuring all input combinations are tested. It presents examples such as the Triangle Problem and the Next Date Problem to illustrate how decision tables can be applied to validate inputs and test edge cases effectively. Additionally, it covers concepts like boundary value analysis to further emphasize the need for thorough testing in software development.

Uploaded by

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

Importance of Decision Table

By
Dr. Manju N
Associate Professor
Department of Information Science and Engineering
JSS Science and Technology University
Content

 Decision Table
 Triangle Problem
 Next Date Problem
 Commission Problem
What is Decision Table?

 It is a way to document logic

 Helps us in testing all combinations of the possible


conditions

 We do not miss any combination of the different input


condition

 It contains two parts


 Conditions and
 Actions
• True (T)
• False (F)
 Number of combinations = No of condition1 values * No of
conditions2 values
 = 2*2
 =4 combinations.
 Suppose

 Number of combinations = No of condition1 values * No of conditions2 values


 = 3*3
 =9 combinations.

 Blank
 Invalid
 Valid

 Can be extended to some other examples


What is Triangle Problem?

 Triangle Problem is a classic challenge in software testing


where an application takes three numerical inputs
(representing the lengths of the sides of a triangle) and
determines the type of triangle

 Equilateral (all sides are equal),


 Isosceles (two sides are equal), or
 Scalene (no sides are equal).
Why is the Triangle Problem
Important in Testing?

 This problem is not about triangles in the literal sense; it’s


about understanding how to test software thoroughly.

 The Triangle Problem highlights the importance of validating


inputs and testing edge cases to ensure an application works as
expected
Triangle and Its Types

 To classify a triangle, it’s


input is a triple positive
integers (x,y,z).

 Greater than 0 and less than


100

 Output will be
 Equilateral
 Isosceles
 Scalene and
 Not a triangle
Boundary Value Analysis

 Example

 Age Text Box


 Constraint is to accept 18 to 60 characters

INVALID VALID INVALID


(MIN - 1) (MIN, +MIN, -MAX, MAX) (MAX + 1)
? ???? ?
Boundary Value Analysis

 Example

 Age Text Box


 Constraint is to accept 18 to 60 characters

INVALID VALID INVALID


(MIN - 1) (MIN, +MIN, -MAX, MAX) (MAX + 1)
17 18, 19, 59, 60 61
Test Cases
Test Cases

100 is not a valid number


Test Cases
Next Date Problem

 “Next Date” is a function consisting of three variables like:


month (mm), date (dd) and year (yyyy).

 It returns the date of next day as output.

 It reads current date as input date.


Next Date Problem
 The conditions are

 C1: 1 ≤ month ≤ 12
C2: 1 ≤ day ≤ 31
C3: 1812 ≤ year ≤ 2012 (will be used in case 3)

 Thus based on valid values, the equivalence classes are:


 M1= {month: 1 <- month <- 12}
D1 = {day: 1 <-day<<-31}
Y1= {year: 1812 <- year <- 2012}

 And the invalid equivalence classes are:

M2 = {month : month < 1}


M3 = {month : month > 12}
D2 = {day : day < 1}
D3 = {day : day > 31}
Y2 = {year: year < 1812}
Y3 = {year : year > 2012}
Next Date Problem

Correct C2 in the year range to C3


Case 1 – 31 Days in a Month using
switch
Case 2 – 30 Days in a Month using
switch
Case 3 – December Month using
switch
Case 4– February Month using
switch

How many day in a


year..???
Case 4– February Month using
switch
How many day in a
year..???
365.2
5
0.25 + 0.25 + 0.25 +
0.25 = 1
Every 4 year once, we are adding 1 day
extra
Case 4– February Month using
switch

?????
Case 4– February Month using
switch

tomorrowMonth.tomorrowDay.tomorr
ow.Year

You might also like