SlideShare una empresa de Scribd logo
1 de 41
Testing CompetencyTesting Competency 11
White Box & Black BoxWhite Box & Black Box
Testing TechniquesTesting Techniques
ManishManish
Roopa SRoopa S
Testing Competency 2
What does Test meanWhat does Test mean
 The word “TEST” is derived from the LatinThe word “TEST” is derived from the Latin
word “Testum” meaning a pottery vesselword “Testum” meaning a pottery vessel
used to measure or assessused to measure or assess
Testing Competency 3
Software TestingSoftware Testing
 Testing of software means assessing orTesting of software means assessing or
Measuring the software to determineMeasuring the software to determine
its QUALITYits QUALITY
 Area of testing is one of the key processArea of testing is one of the key process
areas of project life cycle in ensuringareas of project life cycle in ensuring
the QUALITY of the softwarethe QUALITY of the software
Testing Competency 4
QUALITYQUALITY
What is Quality product ?What is Quality product ?
 A quality product is one which is fit for use.A quality product is one which is fit for use.
 A quality product is one which is producedA quality product is one which is produced
as per pre-defined specifications.as per pre-defined specifications.
Testing Competency 5
Various TestingVarious Testing
TechniquesTechniques
 Structural & FunctionalStructural & Functional
 Verification & Validation (V&V)Verification & Validation (V&V)
 Static & DynamicStatic & Dynamic
 White-Box & Black-BoxWhite-Box & Black-Box
Testing Competency 6
Levels of TestingLevels of Testing
Levels of TestingLevels of Testing Testing TechniquesTesting Techniques
Unit TestingUnit Testing Structural Testing
IntegrationIntegration Structural & Functional
SystemSystem Functional, Risk based
AcceptanceAcceptance Functional, Risk based
Testing Competency 7
Test Design MethodsTest Design Methods
 Black-Box and White-Box are Test DesignBlack-Box and White-Box are Test Design
MethodsMethods
Testing Competency 8
Black-Box TestingBlack-Box Testing
 Black Box Testing is testing technique havingBlack Box Testing is testing technique having
no knowledge of the internalno knowledge of the internal
functionality/structure of the systemfunctionality/structure of the system
 Synonyms for Black-Box are Behavioral,Synonyms for Black-Box are Behavioral,
Functional, Opaque-Box, Closed-Box etc.Functional, Opaque-Box, Closed-Box etc.
Testing Competency 9
contd…contd…
 Black-box Testing focuses on testing theBlack-box Testing focuses on testing the
function of the program or application against itsfunction of the program or application against its
specificationspecification
 Determines whether combinations of inputs andDetermines whether combinations of inputs and
operations produce expected resultsoperations produce expected results
 When black box testing is applied to softwareWhen black box testing is applied to software
engineering, the tester would only know theengineering, the tester would only know the
"legal" inputs and what the expected outputs"legal" inputs and what the expected outputs
should be, but not how the program actuallyshould be, but not how the program actually
arrives at those outputsarrives at those outputs
Testing Competency 10
Focus of Black-Box TestingFocus of Black-Box Testing
 In this technique, we do not use the codeIn this technique, we do not use the code
to determine a test suite; rather, knowingto determine a test suite; rather, knowing
the problem that we're trying to solve, wethe problem that we're trying to solve, we
come up with four types of test data:come up with four types of test data:
 Easy-to-compute dataEasy-to-compute data
 Typical dataTypical data
 Boundary / extreme dataBoundary / extreme data
 Bogus dataBogus data
Testing Competency 11
Black-Box TestingBlack-Box Testing
TechniquesTechniques
 Equivalence PartitioningEquivalence Partitioning
 Boundary Value AnalysisBoundary Value Analysis
 Error GuessingError Guessing
 Cause-Effect GraphingCause-Effect Graphing
Testing Competency 12
Equivalence PartitioningEquivalence Partitioning
 An equivalence class is a subset of dataAn equivalence class is a subset of data
that is representative of a larger classthat is representative of a larger class
 Equivalence partitioning is a technique forEquivalence partitioning is a technique for
testing equivalence classes rather thantesting equivalence classes rather than
undertaking exhaustive testing of eachundertaking exhaustive testing of each
value of the larger classvalue of the larger class
Testing Competency 13
Example - EPExample - EP
 For example, a program which edits creditFor example, a program which edits credit
limits within a given range ($10,000 -limits within a given range ($10,000 -
$15,000) would have three equivalence$15,000) would have three equivalence
classesclasses
 < $10,000 (invalid)< $10,000 (invalid)
 Between $10,000 and $15,000 (valid)Between $10,000 and $15,000 (valid)
 > $15,000 (invalid)> $15,000 (invalid)
Testing Competency 14
Boundary AnalysisBoundary Analysis
 This technique consists of developing testThis technique consists of developing test
cases and data that focus on the input andcases and data that focus on the input and
output boundaries of a given functionoutput boundaries of a given function
Testing Competency 15
Example – Boundary AnalysisExample – Boundary Analysis
 In the same credit limit example, boundaryIn the same credit limit example, boundary
analysis would test.analysis would test.
 Low boundary -/+ one ($9,999 and $10,001)Low boundary -/+ one ($9,999 and $10,001)
 On the boundary ($10,000 and $15,000)On the boundary ($10,000 and $15,000)
 Upper boundary -/+ one ($14,999 andUpper boundary -/+ one ($14,999 and
$15,001)$15,001)
Testing Competency 16
Error GuessingError Guessing
 Test cases can be developed based uponTest cases can be developed based upon
the intuition and experience of the testerthe intuition and experience of the tester
 For example, where one of the inputs isFor example, where one of the inputs is
the date, a tester may try February 29,the date, a tester may try February 29,
20012001
Testing Competency 17
Cause-Effect GraphingCause-Effect Graphing
 Cause-effect graphing is a technique forCause-effect graphing is a technique for
developing test cases for programs fromdeveloping test cases for programs from
the high-level specifications (A high-levelthe high-level specifications (A high-level
specification states desired characteristicsspecification states desired characteristics
of the system)of the system)
 These characteristics can be used toThese characteristics can be used to
derive test dataderive test data
Testing Competency 18
Example – Cause EffectExample – Cause Effect
 For example, a program that has specifiedFor example, a program that has specified
responses to eight characteristic stimuli (calledresponses to eight characteristic stimuli (called
causes) given some input has 256 "types" ofcauses) given some input has 256 "types" of
input (i.e., those with characteristics 1 & 3; 5, 7input (i.e., those with characteristics 1 & 3; 5, 7
& 8 etc.)& 8 etc.)
 A poor approach is to generate 256 test casesA poor approach is to generate 256 test cases
 A more methodical approach is to use theA more methodical approach is to use the
program specifications to analyze the program'sprogram specifications to analyze the program's
effect on the various types of inputseffect on the various types of inputs
Testing Competency 19
contd…contd…
 The program's output domain can be partitionedThe program's output domain can be partitioned
into various classes called effectsinto various classes called effects
 For example, inputs with characteristic 2 mightFor example, inputs with characteristic 2 might
be subsumed by those with characteristics 3 &be subsumed by those with characteristics 3 &
4. Hence, it would not be necessary to test4. Hence, it would not be necessary to test
inputs with characteristic 2 and characteristics 3inputs with characteristic 2 and characteristics 3
& 4, for they cause the same effect& 4, for they cause the same effect
 This analysis results in a partitioning of theThis analysis results in a partitioning of the
causes according to their corresponding effectscauses according to their corresponding effects
Testing Competency 20
contd…contd…
 A limited entry decision table is then constructedA limited entry decision table is then constructed
from the directed graph reflecting thesefrom the directed graph reflecting these
dependencies (i.e., causes 2 & 3 result in effectdependencies (i.e., causes 2 & 3 result in effect
4; causes 2, 3 & 5 result in effect 6 etc.)4; causes 2, 3 & 5 result in effect 6 etc.)
 The decision table is then reduced and testThe decision table is then reduced and test
cases chosen to exercise each column of thecases chosen to exercise each column of the
tabletable
 Since many aspects of the cause-effect graphingSince many aspects of the cause-effect graphing
can be automated, it is an attractive tool forcan be automated, it is an attractive tool for
aiding in the generation of Functional Test casesaiding in the generation of Functional Test cases
Testing Competency 21
Advantages of Black-BoxAdvantages of Black-Box
TestingTesting
 More effective on larger units of code thanMore effective on larger units of code than
glass box testingglass box testing
 Tester needs no knowledge ofTester needs no knowledge of
implementation, including specificimplementation, including specific
programming languagesprogramming languages
 Tester and programmer are independentTester and programmer are independent
of each otherof each other
Testing Competency 22
Advantages of Black-BoxAdvantages of Black-Box
Testing Contd…Testing Contd…
 Tests are done from a user's point of viewTests are done from a user's point of view
 Will help to expose any ambiguities orWill help to expose any ambiguities or
inconsistencies in the specificationsinconsistencies in the specifications
 Test cases can be designed as soon asTest cases can be designed as soon as
the specifications are completethe specifications are complete
Testing Competency 23
Disadvantages of Black-BoxDisadvantages of Black-Box
TestingTesting
 Only a small number of possible inputs canOnly a small number of possible inputs can
actually be tested, to test every possible inputactually be tested, to test every possible input
stream would take nearly foreverstream would take nearly forever
 Without clear and concise specifications, testWithout clear and concise specifications, test
cases are hard to designcases are hard to design
 There may be unnecessary repetition of testThere may be unnecessary repetition of test
inputs if the tester is not informed of test casesinputs if the tester is not informed of test cases
the programmer has already triedthe programmer has already tried
Testing Competency 24
Disadvantages of Black-Box TestingDisadvantages of Black-Box Testing
Contd…Contd…
 May leave many program paths untestedMay leave many program paths untested
 Cannot be directed toward specificCannot be directed toward specific
segments of code which may be verysegments of code which may be very
complex (and therefore more error prone)complex (and therefore more error prone)
Testing Competency 25
White-Box TestingWhite-Box Testing
 White-box test design allows one to peekWhite-box test design allows one to peek
inside the "box“inside the "box“
 Synonyms for White-box are Structural,Synonyms for White-box are Structural,
Glass-box and Clear-boxGlass-box and Clear-box
Testing Competency 26
cont…cont…
 White-box Testing assumes that the pathWhite-box Testing assumes that the path
of logic in a unit or program is knownof logic in a unit or program is known
 White-box Testing consists of testingWhite-box Testing consists of testing
paths, branch by branch, to producepaths, branch by branch, to produce
predictable resultspredictable results
 Focuses specifically on using internalFocuses specifically on using internal
knowledge of the software to guide theknowledge of the software to guide the
selection of test dataselection of test data
Testing Competency 27
White-Box TestingWhite-Box Testing
TechniquesTechniques
 Statement CoverageStatement Coverage
 execute all statements at least onceexecute all statements at least once
 Decision CoverageDecision Coverage
 execute each decision direction at least onceexecute each decision direction at least once
 Condition CoverageCondition Coverage
 execute each decision with all possibleexecute each decision with all possible
outcomes at least onceoutcomes at least once
Testing Competency 28
cont…cont…
 Decision/Condition CoverageDecision/Condition Coverage
 execute all possible combinations of conditionexecute all possible combinations of condition
outcomes in each decisionoutcomes in each decision
 Multiple Condition CoverageMultiple Condition Coverage
 invoke each point of entry at least onceinvoke each point of entry at least once
Choose the combinations of techniquesChoose the combinations of techniques
appropriate for the applicationappropriate for the application
Testing Competency 29
Statement CoverageStatement Coverage
 Necessary but not sufficient, doesn’t address allNecessary but not sufficient, doesn’t address all
outcomes of decisionsoutcomes of decisions
 For exampleFor example
…………..
Begin()Begin()
If (function1())If (function1())
OpenFile1()OpenFile1()
ElseElse
Shutdown();Shutdown();
………………
 Here if the first IF statement is true thenHere if the first IF statement is true then
Shutdown will never occurShutdown will never occur
Testing Competency 30
Decision CoverageDecision Coverage
 Validates the Branch Statements in softwareValidates the Branch Statements in software
 Overcomes the drawbacks of statementOvercomes the drawbacks of statement
coveragecoverage
 Each decision is tested for a TrueEach decision is tested for a True && FalseFalse
valuevalue
 Each branch direction must be traversed atEach branch direction must be traversed at
least onceleast once
 Branches like if…else, while, for do...whileBranches like if…else, while, for do...while
are to be evaluated for both true and falseare to be evaluated for both true and false
 Test cases will be arrived with the help of aTest cases will be arrived with the help of a
Decision tableDecision table
Testing Competency 31
Cont…Cont…
Decision TableDecision Table
• Table which helps to derive the test casesTable which helps to derive the test cases
StepsSteps
• Identify the variables which are responsible forIdentify the variables which are responsible for
decisiondecision
• Identify the total number of decisions (GiveIdentify the total number of decisions (Give
numbers to them like IF1, IF2… While1, While2numbers to them like IF1, IF2… While1, While2
etc)etc)
• Put thePut the variablesvariables as rows andas rows and decisionsdecisions asas
verticalsverticals
• Start to map the values for each variablesStart to map the values for each variables
corresponding to each decisionscorresponding to each decisions
Testing Competency 32
An ExampleAn Example
Procedure liability (age, sex, married, premium);Procedure liability (age, sex, married, premium);
beginbegin
premium=500;premium=500;
If ((age<25) and (sex=male) and (not married))If ((age<25) and (sex=male) and (not married))  IF-1IF-1
thenthen
premium=Premium+1500;premium=Premium+1500;
elseelse
(if (married or (sex=female))(if (married or (sex=female))  IF-2IF-2
thenthen
premium=premium-200;premium=premium-200;
If( (age>45) and (age<65))If( (age>45) and (age<65))  IF-3IF-3
thenthen
premium= premium-100;premium= premium-100;
end;end;
Here variables areHere variables are age, sexage, sex andand marriedmarried
Decisions are IF1; IF2 ; IF3Decisions are IF1; IF2 ; IF3
Testing Competency 33
DecisionDecision
CoverageCoverage
AgeAge SexSex MarriedMarried TestTest
casecase
IF-1IF-1 <25<25 MaleMale FalseFalse (1) 23 M F(1) 23 M F
IF-1IF-1 <25<25 FemaleFemale FalseFalse (2) 23 F F(2) 23 F F
IF-2IF-2 ** FemaleFemale ** (2)(2)
IF-2IF-2 >=25>=25 MaleMale FalseFalse (3) 50 M F(3) 50 M F
IF-3IF-3 <=45<=45 FemaleFemale ** (2)(2)
IF-3IF-3 >45>45
<65<65
** ** (3)(3)
Decision TableDecision Table
Testing Competency 34
Condition CoverageCondition Coverage
 Validates logical relations and conditionsValidates logical relations and conditions
 All the conditions should be executed at leastAll the conditions should be executed at least
once for the both false and trueonce for the both false and true
 Conditions using relational and logical operatorsConditions using relational and logical operators
should be checked for all possible outcomesshould be checked for all possible outcomes
 Condition coverage checks for true and falseCondition coverage checks for true and false
outcome of each Boolean sub expressionoutcome of each Boolean sub expression
 Test cases will be arrived from using sameTest cases will be arrived from using same
Decision table by putting conditions in place ofDecision table by putting conditions in place of
decisionsdecisions
Testing Competency 35
Test conditionsTest conditions
ConditionCondition
CoverageCoverage
AgeAge SexSex MarriedMarried Test CaseTest Case
IF-1IF-1 <25<25 FemaleFemale FalseFalse (1) 23 F F(1) 23 F F
IF-1IF-1 >=25>=25 MaleMale TrueTrue (2) 30 M T(2) 30 M T
IF-2IF-2 ** MaleMale TrueTrue (2)(2)
IF-2IF-2 ** FemaleFemale FalseFalse (1)(1)
IF-3IF-3 <=45<=45 ** ** (1)(1)
IF-3IF-3 >45>45 ** ** (3) 70 F F(3) 70 F F
IF-3IF-3 <65<65 ** ** (2)(2)
IF-3IF-3 >=65>=65 ** ** (3)(3)
Testing Competency 36
Condition/Decision Coverage
 We may not always get result either in
decision coverage or condition coverage.
In such cases, go in for decision &
condition coverage
 Test cases will be arrived form both
decision as well as condition coverage
Testing Competency 37
Condition/Decision Test caseCondition/Decision Test case
Decision/condition coverageDecision/condition coverage AgeAge SexSex MarriedMarried Test CaseTest Case
IF-1(decision)IF-1(decision) <25<25 MaleMale FalseFalse (1) 23 M F(1) 23 M F
IF-1(decision)IF-1(decision) <25<25 FemaleFemale FalseFalse (2) 23 F F(2) 23 F F
IF-1(condition)IF-1(condition) <25<25 FemaleFemale FalseFalse (2)(2)
IF-1(condition)IF-1(condition) >=25>=25 MaleMale TrueTrue (3) 70 M T(3) 70 M T
IF-2(decision)IF-2(decision) ** FemaleFemale ** (2)(2)
IF-2(decision)IF-2(decision) >=25>=25 MaleMale FalseFalse (4) 50 M F(4) 50 M F
IF-2(condition)IF-2(condition) ** MaleMale TrueTrue (3)(3)
IF-2(condition)IF-2(condition) ** FemaleFemale FalseFalse (2)(2)
IF-3(decision)IF-3(decision) <=45<=45 ** ** (2)(2)
IF-3(decision)IF-3(decision) >45, <65>45, <65 ** ** (4)(4)
IF-3(condition)IF-3(condition) <=45<=45 ** ** (2)(2)
IF-3(condition)IF-3(condition) >45>45 ** ** (4)(4)
IF-3(condition)IF-3(condition) <65<65 ** ** (4)(4)
IF-3(condition)IF-3(condition) >=65>=65 ** ** (3)(3)
Testing Competency 38
Multiple ConditionMultiple Condition
CoverageCoverage
 Checks whether every possible combination ofChecks whether every possible combination of
Boolean sub expression occurs at least onceBoolean sub expression occurs at least once
(2n), where “n” is the number of variables in a(2n), where “n” is the number of variables in a
given branchgiven branch
 Test cases required for this method can beTest cases required for this method can be
arrived at by using truth table of the conditionsarrived at by using truth table of the conditions
 Large number of test cases may be required forLarge number of test cases may be required for
full multiple condition coveragefull multiple condition coverage
Testing Competency 39
Multiple Conditions Coverage –
Test cases
Multiple condition coverageMultiple condition coverage AgeAge SexSex MarriedMarried Test CaseTest Case
IF-1IF-1 <25<25 MaleMale TrueTrue (1) 23 M T(1) 23 M T
IF-1IF-1 <25<25 MaleMale FalseFalse (2) 23 M F(2) 23 M F
IF-1IF-1 <25<25 FemaleFemale TrueTrue (3) 23 F T(3) 23 F T
IF-1IF-1 <25<25 FemaleFemale FalseFalse (4) 23 F F(4) 23 F F
IF-1IF-1 >=25>=25 MaleMale TrueTrue (5) 30 M T(5) 30 M T
IF-1IF-1 >=25>=25 MaleMale FalseFalse (6) 70 M F(6) 70 M F
IF-1IF-1 >=25>=25 FemaleFemale TrueTrue (7) 50 F T(7) 50 F T
IF-1IF-1 >=25>=25 FemaleFemale FalseFalse (8) 30 F F(8) 30 F F
IF-2IF-2 ** MaleMale TrueTrue (5)(5)
IF-2IF-2 ** MaleMale FalseFalse (6)(6)
IF-2IF-2 ** FemaleFemale TrueTrue (7)(7)
IF-2IF-2 ** FemaleFemale FalseFalse (8)(8)
IF-3IF-3 <=45, >=65<=45, >=65 ** ** ImpossibleImpossible
IF-3IF-3 <=45,<65<=45,<65 ** ** (8)(8)
IF-3IF-3 >45, >=65>45, >=65 ** ** (6)(6)
IF-3IF-3 >45, <65>45, <65 ** ** (7)(7)
Testing Competency 40
Gray-Box TestingGray-Box Testing
: An Introduction: An Introduction
 Blending of Structural and FunctionalBlending of Structural and Functional
Testing methods throughout the entireTesting methods throughout the entire
testing proceduretesting procedure
 Examines the activity of back-endExamines the activity of back-end
components during test case executioncomponents during test case execution
Testing Competency 41
Thank you !Thank you !

Más contenido relacionado

La actualidad más candente

Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.ppt
Komal Garg
 

La actualidad más candente (20)

Software testing
Software testingSoftware testing
Software testing
 
Software Testing Techniques: An Overview
Software Testing Techniques: An Overview Software Testing Techniques: An Overview
Software Testing Techniques: An Overview
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.ppt
 
Unit testing
Unit testing Unit testing
Unit testing
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Chapter 8 software testing
Chapter 8 software testingChapter 8 software testing
Chapter 8 software testing
 
White Box Testing
White Box Testing White Box Testing
White Box Testing
 
software design principles
software design principlessoftware design principles
software design principles
 
Chapter 15 software product metrics
Chapter 15 software product metricsChapter 15 software product metrics
Chapter 15 software product metrics
 
Software testing
Software testing Software testing
Software testing
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | Edureka
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Equivalence class testing
Equivalence  class testingEquivalence  class testing
Equivalence class testing
 
Software Verification & Validation
Software Verification & ValidationSoftware Verification & Validation
Software Verification & Validation
 
Software Metrics
Software MetricsSoftware Metrics
Software Metrics
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycle
 
Path testing, data flow testing
Path testing, data flow testingPath testing, data flow testing
Path testing, data flow testing
 

Similar a Black box & white-box testing technique

software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
jeyasrig
 
Black box testing lecture 11
Black box testing lecture 11Black box testing lecture 11
Black box testing lecture 11
Abdul Basit
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
ersanbilik
 
Computer Software Testing Basics introduced.ppt
Computer Software Testing Basics introduced.pptComputer Software Testing Basics introduced.ppt
Computer Software Testing Basics introduced.ppt
TrevorChinguwo
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
Nishant Worah
 
Software testing
Software testingSoftware testing
Software testing
Bala Ganesh
 

Similar a Black box & white-box testing technique (20)

black-box-1.pdf
black-box-1.pdfblack-box-1.pdf
black-box-1.pdf
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
 
Black box testing lecture 11
Black box testing lecture 11Black box testing lecture 11
Black box testing lecture 11
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4
 
Testing
TestingTesting
Testing
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
 
Computer Software Testing Basics introduced.ppt
Computer Software Testing Basics introduced.pptComputer Software Testing Basics introduced.ppt
Computer Software Testing Basics introduced.ppt
 
Black box testing
Black box testingBlack box testing
Black box testing
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
 
Software testing
Software testingSoftware testing
Software testing
 
SE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptxSE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptx
 
Testing
TestingTesting
Testing
 
Test Case Design Techniques
Test Case Design TechniquesTest Case Design Techniques
Test Case Design Techniques
 
Software testing definition
Software testing definitionSoftware testing definition
Software testing definition
 
Test Techniques
Test TechniquesTest Techniques
Test Techniques
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
Test design technique
Test design techniqueTest design technique
Test design technique
 
Testing
TestingTesting
Testing
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
Blackbox
BlackboxBlackbox
Blackbox
 

Más de SivaprasanthRentala1975 (20)

Testing using load runner performance testing
Testing using load runner  performance testingTesting using load runner  performance testing
Testing using load runner performance testing
 
Why contract savings are missing
Why contract savings are missingWhy contract savings are missing
Why contract savings are missing
 
Voyager scm
Voyager scmVoyager scm
Voyager scm
 
Volumes
VolumesVolumes
Volumes
 
The new mainframe
The new mainframeThe new mainframe
The new mainframe
 
Test execution may_04_2006
Test execution may_04_2006Test execution may_04_2006
Test execution may_04_2006
 
Telecom testing
Telecom testingTelecom testing
Telecom testing
 
Six sigma
Six sigmaSix sigma
Six sigma
 
Sdlc models
Sdlc modelsSdlc models
Sdlc models
 
Sdlc
SdlcSdlc
Sdlc
 
Scm
ScmScm
Scm
 
Pt presentation1
Pt presentation1Pt presentation1
Pt presentation1
 
Pp employee learnnig initiative-iss-220-g tle 2007
Pp employee learnnig initiative-iss-220-g tle 2007Pp employee learnnig initiative-iss-220-g tle 2007
Pp employee learnnig initiative-iss-220-g tle 2007
 
Performance testing and rpt
Performance testing and rptPerformance testing and rpt
Performance testing and rpt
 
Patents
PatentsPatents
Patents
 
Xpediter kanbay
Xpediter kanbayXpediter kanbay
Xpediter kanbay
 
Copy of good quotes.ppt
Copy of good quotes.pptCopy of good quotes.ppt
Copy of good quotes.ppt
 
Contract savings new
Contract savings newContract savings new
Contract savings new
 
Contract savings schema
Contract savings schemaContract savings schema
Contract savings schema
 
Contract savings may 10th 2004 by gm euro
Contract savings may 10th 2004 by gm euroContract savings may 10th 2004 by gm euro
Contract savings may 10th 2004 by gm euro
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Black box & white-box testing technique

  • 1. Testing CompetencyTesting Competency 11 White Box & Black BoxWhite Box & Black Box Testing TechniquesTesting Techniques ManishManish Roopa SRoopa S
  • 2. Testing Competency 2 What does Test meanWhat does Test mean  The word “TEST” is derived from the LatinThe word “TEST” is derived from the Latin word “Testum” meaning a pottery vesselword “Testum” meaning a pottery vessel used to measure or assessused to measure or assess
  • 3. Testing Competency 3 Software TestingSoftware Testing  Testing of software means assessing orTesting of software means assessing or Measuring the software to determineMeasuring the software to determine its QUALITYits QUALITY  Area of testing is one of the key processArea of testing is one of the key process areas of project life cycle in ensuringareas of project life cycle in ensuring the QUALITY of the softwarethe QUALITY of the software
  • 4. Testing Competency 4 QUALITYQUALITY What is Quality product ?What is Quality product ?  A quality product is one which is fit for use.A quality product is one which is fit for use.  A quality product is one which is producedA quality product is one which is produced as per pre-defined specifications.as per pre-defined specifications.
  • 5. Testing Competency 5 Various TestingVarious Testing TechniquesTechniques  Structural & FunctionalStructural & Functional  Verification & Validation (V&V)Verification & Validation (V&V)  Static & DynamicStatic & Dynamic  White-Box & Black-BoxWhite-Box & Black-Box
  • 6. Testing Competency 6 Levels of TestingLevels of Testing Levels of TestingLevels of Testing Testing TechniquesTesting Techniques Unit TestingUnit Testing Structural Testing IntegrationIntegration Structural & Functional SystemSystem Functional, Risk based AcceptanceAcceptance Functional, Risk based
  • 7. Testing Competency 7 Test Design MethodsTest Design Methods  Black-Box and White-Box are Test DesignBlack-Box and White-Box are Test Design MethodsMethods
  • 8. Testing Competency 8 Black-Box TestingBlack-Box Testing  Black Box Testing is testing technique havingBlack Box Testing is testing technique having no knowledge of the internalno knowledge of the internal functionality/structure of the systemfunctionality/structure of the system  Synonyms for Black-Box are Behavioral,Synonyms for Black-Box are Behavioral, Functional, Opaque-Box, Closed-Box etc.Functional, Opaque-Box, Closed-Box etc.
  • 9. Testing Competency 9 contd…contd…  Black-box Testing focuses on testing theBlack-box Testing focuses on testing the function of the program or application against itsfunction of the program or application against its specificationspecification  Determines whether combinations of inputs andDetermines whether combinations of inputs and operations produce expected resultsoperations produce expected results  When black box testing is applied to softwareWhen black box testing is applied to software engineering, the tester would only know theengineering, the tester would only know the "legal" inputs and what the expected outputs"legal" inputs and what the expected outputs should be, but not how the program actuallyshould be, but not how the program actually arrives at those outputsarrives at those outputs
  • 10. Testing Competency 10 Focus of Black-Box TestingFocus of Black-Box Testing  In this technique, we do not use the codeIn this technique, we do not use the code to determine a test suite; rather, knowingto determine a test suite; rather, knowing the problem that we're trying to solve, wethe problem that we're trying to solve, we come up with four types of test data:come up with four types of test data:  Easy-to-compute dataEasy-to-compute data  Typical dataTypical data  Boundary / extreme dataBoundary / extreme data  Bogus dataBogus data
  • 11. Testing Competency 11 Black-Box TestingBlack-Box Testing TechniquesTechniques  Equivalence PartitioningEquivalence Partitioning  Boundary Value AnalysisBoundary Value Analysis  Error GuessingError Guessing  Cause-Effect GraphingCause-Effect Graphing
  • 12. Testing Competency 12 Equivalence PartitioningEquivalence Partitioning  An equivalence class is a subset of dataAn equivalence class is a subset of data that is representative of a larger classthat is representative of a larger class  Equivalence partitioning is a technique forEquivalence partitioning is a technique for testing equivalence classes rather thantesting equivalence classes rather than undertaking exhaustive testing of eachundertaking exhaustive testing of each value of the larger classvalue of the larger class
  • 13. Testing Competency 13 Example - EPExample - EP  For example, a program which edits creditFor example, a program which edits credit limits within a given range ($10,000 -limits within a given range ($10,000 - $15,000) would have three equivalence$15,000) would have three equivalence classesclasses  < $10,000 (invalid)< $10,000 (invalid)  Between $10,000 and $15,000 (valid)Between $10,000 and $15,000 (valid)  > $15,000 (invalid)> $15,000 (invalid)
  • 14. Testing Competency 14 Boundary AnalysisBoundary Analysis  This technique consists of developing testThis technique consists of developing test cases and data that focus on the input andcases and data that focus on the input and output boundaries of a given functionoutput boundaries of a given function
  • 15. Testing Competency 15 Example – Boundary AnalysisExample – Boundary Analysis  In the same credit limit example, boundaryIn the same credit limit example, boundary analysis would test.analysis would test.  Low boundary -/+ one ($9,999 and $10,001)Low boundary -/+ one ($9,999 and $10,001)  On the boundary ($10,000 and $15,000)On the boundary ($10,000 and $15,000)  Upper boundary -/+ one ($14,999 andUpper boundary -/+ one ($14,999 and $15,001)$15,001)
  • 16. Testing Competency 16 Error GuessingError Guessing  Test cases can be developed based uponTest cases can be developed based upon the intuition and experience of the testerthe intuition and experience of the tester  For example, where one of the inputs isFor example, where one of the inputs is the date, a tester may try February 29,the date, a tester may try February 29, 20012001
  • 17. Testing Competency 17 Cause-Effect GraphingCause-Effect Graphing  Cause-effect graphing is a technique forCause-effect graphing is a technique for developing test cases for programs fromdeveloping test cases for programs from the high-level specifications (A high-levelthe high-level specifications (A high-level specification states desired characteristicsspecification states desired characteristics of the system)of the system)  These characteristics can be used toThese characteristics can be used to derive test dataderive test data
  • 18. Testing Competency 18 Example – Cause EffectExample – Cause Effect  For example, a program that has specifiedFor example, a program that has specified responses to eight characteristic stimuli (calledresponses to eight characteristic stimuli (called causes) given some input has 256 "types" ofcauses) given some input has 256 "types" of input (i.e., those with characteristics 1 & 3; 5, 7input (i.e., those with characteristics 1 & 3; 5, 7 & 8 etc.)& 8 etc.)  A poor approach is to generate 256 test casesA poor approach is to generate 256 test cases  A more methodical approach is to use theA more methodical approach is to use the program specifications to analyze the program'sprogram specifications to analyze the program's effect on the various types of inputseffect on the various types of inputs
  • 19. Testing Competency 19 contd…contd…  The program's output domain can be partitionedThe program's output domain can be partitioned into various classes called effectsinto various classes called effects  For example, inputs with characteristic 2 mightFor example, inputs with characteristic 2 might be subsumed by those with characteristics 3 &be subsumed by those with characteristics 3 & 4. Hence, it would not be necessary to test4. Hence, it would not be necessary to test inputs with characteristic 2 and characteristics 3inputs with characteristic 2 and characteristics 3 & 4, for they cause the same effect& 4, for they cause the same effect  This analysis results in a partitioning of theThis analysis results in a partitioning of the causes according to their corresponding effectscauses according to their corresponding effects
  • 20. Testing Competency 20 contd…contd…  A limited entry decision table is then constructedA limited entry decision table is then constructed from the directed graph reflecting thesefrom the directed graph reflecting these dependencies (i.e., causes 2 & 3 result in effectdependencies (i.e., causes 2 & 3 result in effect 4; causes 2, 3 & 5 result in effect 6 etc.)4; causes 2, 3 & 5 result in effect 6 etc.)  The decision table is then reduced and testThe decision table is then reduced and test cases chosen to exercise each column of thecases chosen to exercise each column of the tabletable  Since many aspects of the cause-effect graphingSince many aspects of the cause-effect graphing can be automated, it is an attractive tool forcan be automated, it is an attractive tool for aiding in the generation of Functional Test casesaiding in the generation of Functional Test cases
  • 21. Testing Competency 21 Advantages of Black-BoxAdvantages of Black-Box TestingTesting  More effective on larger units of code thanMore effective on larger units of code than glass box testingglass box testing  Tester needs no knowledge ofTester needs no knowledge of implementation, including specificimplementation, including specific programming languagesprogramming languages  Tester and programmer are independentTester and programmer are independent of each otherof each other
  • 22. Testing Competency 22 Advantages of Black-BoxAdvantages of Black-Box Testing Contd…Testing Contd…  Tests are done from a user's point of viewTests are done from a user's point of view  Will help to expose any ambiguities orWill help to expose any ambiguities or inconsistencies in the specificationsinconsistencies in the specifications  Test cases can be designed as soon asTest cases can be designed as soon as the specifications are completethe specifications are complete
  • 23. Testing Competency 23 Disadvantages of Black-BoxDisadvantages of Black-Box TestingTesting  Only a small number of possible inputs canOnly a small number of possible inputs can actually be tested, to test every possible inputactually be tested, to test every possible input stream would take nearly foreverstream would take nearly forever  Without clear and concise specifications, testWithout clear and concise specifications, test cases are hard to designcases are hard to design  There may be unnecessary repetition of testThere may be unnecessary repetition of test inputs if the tester is not informed of test casesinputs if the tester is not informed of test cases the programmer has already triedthe programmer has already tried
  • 24. Testing Competency 24 Disadvantages of Black-Box TestingDisadvantages of Black-Box Testing Contd…Contd…  May leave many program paths untestedMay leave many program paths untested  Cannot be directed toward specificCannot be directed toward specific segments of code which may be verysegments of code which may be very complex (and therefore more error prone)complex (and therefore more error prone)
  • 25. Testing Competency 25 White-Box TestingWhite-Box Testing  White-box test design allows one to peekWhite-box test design allows one to peek inside the "box“inside the "box“  Synonyms for White-box are Structural,Synonyms for White-box are Structural, Glass-box and Clear-boxGlass-box and Clear-box
  • 26. Testing Competency 26 cont…cont…  White-box Testing assumes that the pathWhite-box Testing assumes that the path of logic in a unit or program is knownof logic in a unit or program is known  White-box Testing consists of testingWhite-box Testing consists of testing paths, branch by branch, to producepaths, branch by branch, to produce predictable resultspredictable results  Focuses specifically on using internalFocuses specifically on using internal knowledge of the software to guide theknowledge of the software to guide the selection of test dataselection of test data
  • 27. Testing Competency 27 White-Box TestingWhite-Box Testing TechniquesTechniques  Statement CoverageStatement Coverage  execute all statements at least onceexecute all statements at least once  Decision CoverageDecision Coverage  execute each decision direction at least onceexecute each decision direction at least once  Condition CoverageCondition Coverage  execute each decision with all possibleexecute each decision with all possible outcomes at least onceoutcomes at least once
  • 28. Testing Competency 28 cont…cont…  Decision/Condition CoverageDecision/Condition Coverage  execute all possible combinations of conditionexecute all possible combinations of condition outcomes in each decisionoutcomes in each decision  Multiple Condition CoverageMultiple Condition Coverage  invoke each point of entry at least onceinvoke each point of entry at least once Choose the combinations of techniquesChoose the combinations of techniques appropriate for the applicationappropriate for the application
  • 29. Testing Competency 29 Statement CoverageStatement Coverage  Necessary but not sufficient, doesn’t address allNecessary but not sufficient, doesn’t address all outcomes of decisionsoutcomes of decisions  For exampleFor example ………….. Begin()Begin() If (function1())If (function1()) OpenFile1()OpenFile1() ElseElse Shutdown();Shutdown(); ………………  Here if the first IF statement is true thenHere if the first IF statement is true then Shutdown will never occurShutdown will never occur
  • 30. Testing Competency 30 Decision CoverageDecision Coverage  Validates the Branch Statements in softwareValidates the Branch Statements in software  Overcomes the drawbacks of statementOvercomes the drawbacks of statement coveragecoverage  Each decision is tested for a TrueEach decision is tested for a True && FalseFalse valuevalue  Each branch direction must be traversed atEach branch direction must be traversed at least onceleast once  Branches like if…else, while, for do...whileBranches like if…else, while, for do...while are to be evaluated for both true and falseare to be evaluated for both true and false  Test cases will be arrived with the help of aTest cases will be arrived with the help of a Decision tableDecision table
  • 31. Testing Competency 31 Cont…Cont… Decision TableDecision Table • Table which helps to derive the test casesTable which helps to derive the test cases StepsSteps • Identify the variables which are responsible forIdentify the variables which are responsible for decisiondecision • Identify the total number of decisions (GiveIdentify the total number of decisions (Give numbers to them like IF1, IF2… While1, While2numbers to them like IF1, IF2… While1, While2 etc)etc) • Put thePut the variablesvariables as rows andas rows and decisionsdecisions asas verticalsverticals • Start to map the values for each variablesStart to map the values for each variables corresponding to each decisionscorresponding to each decisions
  • 32. Testing Competency 32 An ExampleAn Example Procedure liability (age, sex, married, premium);Procedure liability (age, sex, married, premium); beginbegin premium=500;premium=500; If ((age<25) and (sex=male) and (not married))If ((age<25) and (sex=male) and (not married))  IF-1IF-1 thenthen premium=Premium+1500;premium=Premium+1500; elseelse (if (married or (sex=female))(if (married or (sex=female))  IF-2IF-2 thenthen premium=premium-200;premium=premium-200; If( (age>45) and (age<65))If( (age>45) and (age<65))  IF-3IF-3 thenthen premium= premium-100;premium= premium-100; end;end; Here variables areHere variables are age, sexage, sex andand marriedmarried Decisions are IF1; IF2 ; IF3Decisions are IF1; IF2 ; IF3
  • 33. Testing Competency 33 DecisionDecision CoverageCoverage AgeAge SexSex MarriedMarried TestTest casecase IF-1IF-1 <25<25 MaleMale FalseFalse (1) 23 M F(1) 23 M F IF-1IF-1 <25<25 FemaleFemale FalseFalse (2) 23 F F(2) 23 F F IF-2IF-2 ** FemaleFemale ** (2)(2) IF-2IF-2 >=25>=25 MaleMale FalseFalse (3) 50 M F(3) 50 M F IF-3IF-3 <=45<=45 FemaleFemale ** (2)(2) IF-3IF-3 >45>45 <65<65 ** ** (3)(3) Decision TableDecision Table
  • 34. Testing Competency 34 Condition CoverageCondition Coverage  Validates logical relations and conditionsValidates logical relations and conditions  All the conditions should be executed at leastAll the conditions should be executed at least once for the both false and trueonce for the both false and true  Conditions using relational and logical operatorsConditions using relational and logical operators should be checked for all possible outcomesshould be checked for all possible outcomes  Condition coverage checks for true and falseCondition coverage checks for true and false outcome of each Boolean sub expressionoutcome of each Boolean sub expression  Test cases will be arrived from using sameTest cases will be arrived from using same Decision table by putting conditions in place ofDecision table by putting conditions in place of decisionsdecisions
  • 35. Testing Competency 35 Test conditionsTest conditions ConditionCondition CoverageCoverage AgeAge SexSex MarriedMarried Test CaseTest Case IF-1IF-1 <25<25 FemaleFemale FalseFalse (1) 23 F F(1) 23 F F IF-1IF-1 >=25>=25 MaleMale TrueTrue (2) 30 M T(2) 30 M T IF-2IF-2 ** MaleMale TrueTrue (2)(2) IF-2IF-2 ** FemaleFemale FalseFalse (1)(1) IF-3IF-3 <=45<=45 ** ** (1)(1) IF-3IF-3 >45>45 ** ** (3) 70 F F(3) 70 F F IF-3IF-3 <65<65 ** ** (2)(2) IF-3IF-3 >=65>=65 ** ** (3)(3)
  • 36. Testing Competency 36 Condition/Decision Coverage  We may not always get result either in decision coverage or condition coverage. In such cases, go in for decision & condition coverage  Test cases will be arrived form both decision as well as condition coverage
  • 37. Testing Competency 37 Condition/Decision Test caseCondition/Decision Test case Decision/condition coverageDecision/condition coverage AgeAge SexSex MarriedMarried Test CaseTest Case IF-1(decision)IF-1(decision) <25<25 MaleMale FalseFalse (1) 23 M F(1) 23 M F IF-1(decision)IF-1(decision) <25<25 FemaleFemale FalseFalse (2) 23 F F(2) 23 F F IF-1(condition)IF-1(condition) <25<25 FemaleFemale FalseFalse (2)(2) IF-1(condition)IF-1(condition) >=25>=25 MaleMale TrueTrue (3) 70 M T(3) 70 M T IF-2(decision)IF-2(decision) ** FemaleFemale ** (2)(2) IF-2(decision)IF-2(decision) >=25>=25 MaleMale FalseFalse (4) 50 M F(4) 50 M F IF-2(condition)IF-2(condition) ** MaleMale TrueTrue (3)(3) IF-2(condition)IF-2(condition) ** FemaleFemale FalseFalse (2)(2) IF-3(decision)IF-3(decision) <=45<=45 ** ** (2)(2) IF-3(decision)IF-3(decision) >45, <65>45, <65 ** ** (4)(4) IF-3(condition)IF-3(condition) <=45<=45 ** ** (2)(2) IF-3(condition)IF-3(condition) >45>45 ** ** (4)(4) IF-3(condition)IF-3(condition) <65<65 ** ** (4)(4) IF-3(condition)IF-3(condition) >=65>=65 ** ** (3)(3)
  • 38. Testing Competency 38 Multiple ConditionMultiple Condition CoverageCoverage  Checks whether every possible combination ofChecks whether every possible combination of Boolean sub expression occurs at least onceBoolean sub expression occurs at least once (2n), where “n” is the number of variables in a(2n), where “n” is the number of variables in a given branchgiven branch  Test cases required for this method can beTest cases required for this method can be arrived at by using truth table of the conditionsarrived at by using truth table of the conditions  Large number of test cases may be required forLarge number of test cases may be required for full multiple condition coveragefull multiple condition coverage
  • 39. Testing Competency 39 Multiple Conditions Coverage – Test cases Multiple condition coverageMultiple condition coverage AgeAge SexSex MarriedMarried Test CaseTest Case IF-1IF-1 <25<25 MaleMale TrueTrue (1) 23 M T(1) 23 M T IF-1IF-1 <25<25 MaleMale FalseFalse (2) 23 M F(2) 23 M F IF-1IF-1 <25<25 FemaleFemale TrueTrue (3) 23 F T(3) 23 F T IF-1IF-1 <25<25 FemaleFemale FalseFalse (4) 23 F F(4) 23 F F IF-1IF-1 >=25>=25 MaleMale TrueTrue (5) 30 M T(5) 30 M T IF-1IF-1 >=25>=25 MaleMale FalseFalse (6) 70 M F(6) 70 M F IF-1IF-1 >=25>=25 FemaleFemale TrueTrue (7) 50 F T(7) 50 F T IF-1IF-1 >=25>=25 FemaleFemale FalseFalse (8) 30 F F(8) 30 F F IF-2IF-2 ** MaleMale TrueTrue (5)(5) IF-2IF-2 ** MaleMale FalseFalse (6)(6) IF-2IF-2 ** FemaleFemale TrueTrue (7)(7) IF-2IF-2 ** FemaleFemale FalseFalse (8)(8) IF-3IF-3 <=45, >=65<=45, >=65 ** ** ImpossibleImpossible IF-3IF-3 <=45,<65<=45,<65 ** ** (8)(8) IF-3IF-3 >45, >=65>45, >=65 ** ** (6)(6) IF-3IF-3 >45, <65>45, <65 ** ** (7)(7)
  • 40. Testing Competency 40 Gray-Box TestingGray-Box Testing : An Introduction: An Introduction  Blending of Structural and FunctionalBlending of Structural and Functional Testing methods throughout the entireTesting methods throughout the entire testing proceduretesting procedure  Examines the activity of back-endExamines the activity of back-end components during test case executioncomponents during test case execution
  • 41. Testing Competency 41 Thank you !Thank you !