Sanjivani College of Engineering, Kopargaon
Department of Electronics & Telecommunication Engineering
(An Autonomous Institute)
Affiliated to Savitribai Phule Pune University
Accredited ‘A’ Grade by NAAC
_______________________________________________________________________________________
_
Subject: Software Testing &Quality Assurance (EC319 )
UNIT 2:Black Box Testing
Topic: Introduction
Prof. N. D.
Kapale
CONTENTS
Introduction, need of black box testing,
Requirements Analysis,
Testing Methods - Requirements based testing,
Positive and negative testing,
Boundary value analysis,
Equivalence Partitioning class,
Domain testing, Design of test cases,
Case studies of Black- Box testing.
Prof. N. D. Kapale Department of E& C Engineering
Black box Testing
• Software considered as black box
• Test data derived from the specification
• No knowledge of code or internal structure of software
necessary
• Known as data driven or Input/output driven testing
• Also known as functional testing
• Test cases are designed using only function specification of
the software
• The goal is to achieve the throuhness of exhaustive input
testing, with much less effort
Prof. N. D. Kapale Department of E& C Engineering
White box Testing
• To design test cases
• Knowledge of internal structure of software necessary
• Also called structural testing
Prof. N. D. Kapale Department of E& C Engineering
Test Case Design Techniques
• 1. Error Guessing
• 2 Equilance Class Partatining
• 3. Boundry Value Analysis
• 4. Decision Table Technique
• 5. State Transition Technique
Prof. N. D. Kapale Department of E& C Engineering
Test Case Design Techniques
Equilance Class Partatining
1----------------------500
1
2 -100 to 0
3
4 1 to 100
-
101 to 200
-
-
500 201 to 300
301 to 400
401 to 500
500 to 600
Prof. N. D. Kapale Department of E& C Engineering
Test Case Design Techniques
Boundry Value Analysis
1 10
A-1 A A+1 B B+1
B-1
0 1 11
2 10
9
Prof. N. D. Kapale Department of E& C Engineering
Test Case Design Techniques
Decision Table Technique
1. New Customer=15% discount 2. Repeat Customer=10% discount
3. Coupon code Customer=30% discount
• No of TC=No of Rules=2no of cond 23 =8
Rules Rule1 Rule2 Rule3 Rule4 Rule5 Rule6 Rule7 Rule8
conditions
NC 15% T T T T F F F F
RC 10% T T F F T T F F
CC 30% T F T F T F T F
Result X X 45% 15% 40% 10% X X
Invalid
Prof. N. D. Kapale Cond Department of E& C Engineering
Test Case Design Techniques
State Tration Technique
Block
Open
APP
1st 2nd 3rd
attempt attemp attemp
login
ORDER FOOD
Prof. N. D. Kapale Department of E& C Engineering
Hard about BB Testing
• Data Domain is large
-a function may take multiple parameters
-Need to consider the combination of the values of the different
parameters, f(P1, P2)
• Consider
int check-equal(int x, int y)
Assuming a 64 bit computer
-input space=2128 =3.4028236692E38
• Assuming it takes 10sec to key- in an integer pair
-it would take about a billion years to enter all possible values
-objective is to find out black box test strategies which will drastically
reduce the number of test cases may be 3, 4
but they
Prof. N. D. Kapaleshould be almost as effective as the exhaustive
Department oftesting.
E& C Engineering
Hard about BB Testing
-Automatic testing has its own problems.
• Solution
-Construct domain based testing
-Select data based on the domain model
-know the input data, the output data.
create a data model and
based on the data model design the test cases.
Prof. N. D. Kapale Department of E& C Engineering
Types of Black box testing
Prof. N. D. Kapale Department of E& C Engineering
scenario based testing.
• object oriented design
• use case consists of many scenarios
• main scenario and then we have the
alternate scenarios.
• At some point in the main scenario,
the alternate flows occur.
Prof. N. D. Kapale Department of E& C Engineering
Identify use case scenerio
Prof. N. D. Kapale Department of E& C Engineering
Identify the testcases
Prof. N. D. Kapale Department of E& C Engineering
Equivalence class partitioning
-At least ,there should be as many equilence classes as
scenerio
Prof. N. D. Kapale Department of E& C Engineering
Equivalence class partitioning
Prof. N. D. Kapale Department of E& C Engineering
Equivalence class partitioning
Prof. N. D. Kapale Department of E& C Engineering
Equivalent class partition
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Equivalent class partition
Prof. N. D. Kapale Department of E& C Engineering
Equivalent class partition
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
no of test cases=max(n,m)
n=equivalence classes for the first
parameter
m=equivalence classes of
the second parameter
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Need of software Testing
Prof. N. D. Kapale Department of E& C Engineering
Test data Vs Test Casee
Prof. N. D. Kapale Department of E& C Engineering
Test Cases and Test Suits
Prof. N. D. Kapale Department of E& C Engineering
Need of software Testing
Prof. N. D. Kapale Department of E& C Engineering
Need of software Testing
Prof. N. D. Kapale Department of E& C Engineering
Need of software Testing
Prof. N. D. Kapale Department of E& C Engineering
Need of software Testing
Prof. N. D. Kapale Department of E& C Engineering
Need of software Testing
Prof. N. D. Kapale Department of E& C Engineering
Boundry Value Analysis
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
No of test cases=6n+1
n is no of independent varables
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Prof. N. D. Kapale Department of E& C Engineering
Combinatorial Testing
Prof. N. D. Kapale Department of E& C Engineering
Combinatorial Testing
Prof. N. D. Kapale Department of E& C Engineering
Decision table based Testing
Prof. N. D. Kapale Department of E& C Engineering
Decision table based Testing
Prof. N. D. Kapale Department of E& C Engineering
Decision table based Testing
Prof. N. D. Kapale Department of E& C Engineering
Decision table based Testing
1. New Customer=15% discount 2. Repeat Customer=10% discount
3. Coupon code Customer=30% discount
• No of TC=No of Rules=2no of cond 23 =8
Rules Rule1 Rule2 Rule3 Rule4 Rule5 Rule6 Rule7 Rule8
conditions
NC 15% T T T T F F F F
RC 10% T T F F T T F F
CC 30% T F T F T F T F
Result X X 45% 15% 40% 10% X X
Invalid
Cond
Prof. N. D. Kapale Department of E& C Engineering
Decision table based Testing
Prof. N. D. Kapale Department of E& C Engineering
Reduce Table
Cause-effect Graphs
Prof. N. D. Kapale Department of E& C Engineering
Cause-effect Graphs
Prof. N. D. Kapale Department of E& C Engineering
Cause-effect Graphs
Prof. N. D. Kapale Department of E& C Engineering
Decision Table from Cause effect Graph
Prof. N. D. Kapale Department of E& C Engineering
Pair wise Testing
Prof. N. D. Kapale Department of E& C Engineering
Pair wise Testing
Prof. N. D. Kapale Department of E& C Engineering
Pair wise Testing
Prof. N. D. Kapale Department of E& C Engineering
Pair wise Testing
Prof. N. D. Kapale Department of E& C Engineering
Pair wise Testing
Prof. N. D. Kapale Department of E& C Engineering
Thank You!
Prof. N. D. Kapale Department of E&Tc
Engineering