SlideShare a Scribd company logo
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 !
Ad

More Related Content

What's hot (20)

Regression testing
Regression testingRegression testing
Regression testing
Mohua Amin
 
White Box Testing
White Box Testing White Box Testing
White Box Testing
MariamKhan120
 
Black box and white box testing
Black box and white box testingBlack box and white box testing
Black box and white box testing
AWADHESH PRATAP SINGH UNIVERSITY, REWA (M.P.)
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
Nivetha Padmanaban
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
Confiz
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
Raghu Kiran
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
Rathna Priya
 
Cyclomatic complexity
Cyclomatic complexityCyclomatic complexity
Cyclomatic complexity
Nikita Kesharwani
 
White box & Black box testing
White box & Black box testingWhite box & Black box testing
White box & Black box testing
NitishMhaske1
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.ppt
Komal Garg
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
 
Software testing
Software testingSoftware testing
Software testing
balamurugan.k Kalibalamurugan
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing Fundamentals
Chankey Pathak
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
NayyabMirTahir
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
Archana Krushnan
 
The Art of Debugging.pptx
The Art of Debugging.pptxThe Art of Debugging.pptx
The Art of Debugging.pptx
KarthigaiSelviS3
 
White box ppt
White box pptWhite box ppt
White box ppt
Chintakunta Hariteja
 
TESTING STRATEGY.ppt
TESTING STRATEGY.pptTESTING STRATEGY.ppt
TESTING STRATEGY.ppt
FawazHussain4
 
Software Development Life Cycle (SDLC )
Software Development Life Cycle (SDLC )Software Development Life Cycle (SDLC )
Software Development Life Cycle (SDLC )
eshtiyak
 
Software Testing
Software TestingSoftware Testing
Software Testing
Mousmi Pawar
 

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

UNIT-IV SE_engineering_software_ipu.pptx
UNIT-IV SE_engineering_software_ipu.pptxUNIT-IV SE_engineering_software_ipu.pptx
UNIT-IV SE_engineering_software_ipu.pptx
kchitkara24
 
black-box-1.pdf
black-box-1.pdfblack-box-1.pdf
black-box-1.pdf
SupunLakshan4
 
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
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4
SIMONTHOMAS S
 
Testing
TestingTesting
Testing
Sonali Chauhan
 
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
 
Black box testing
Black box testingBlack box testing
Black box testing
Abdul Basit
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
Nishant Worah
 
Black & White Box testing
Black & White Box testingBlack & White Box testing
Black & White Box testing
Mohamed Zeinelabdeen Abdelgader Farh jber
 
Software testing
Software testingSoftware testing
Software testing
Bala Ganesh
 
testing(2).pptjjsieieo2i33kejjskskosowwiwk
testing(2).pptjjsieieo2i33kejjskskosowwiwktesting(2).pptjjsieieo2i33kejjskskosowwiwk
testing(2).pptjjsieieo2i33kejjskskosowwiwk
mhuzaifasultan8
 
SE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptxSE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptx
200723KarthikeyanD
 
white box and black box testing in software engineering
white box and black box testing in software engineeringwhite box and black box testing in software engineering
white box and black box testing in software engineering
NabeelRehman21
 
Testing
TestingTesting
Testing
Mohammed
 
Test Case Design Techniques
Test Case Design TechniquesTest Case Design Techniques
Test Case Design Techniques
Murageppa-QA
 
Software testing definition
Software testing definitionSoftware testing definition
Software testing definition
Hiro Mia
 
Test Techniques
Test TechniquesTest Techniques
Test Techniques
nazeer pasha
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
Kiran Kumar
 
UNIT-IV SE_engineering_software_ipu.pptx
UNIT-IV SE_engineering_software_ipu.pptxUNIT-IV SE_engineering_software_ipu.pptx
UNIT-IV SE_engineering_software_ipu.pptx
kchitkara24
 
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
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4
SIMONTHOMAS S
 
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
 
Black box testing
Black box testingBlack box testing
Black box testing
Abdul Basit
 
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
 
testing(2).pptjjsieieo2i33kejjskskosowwiwk
testing(2).pptjjsieieo2i33kejjskskosowwiwktesting(2).pptjjsieieo2i33kejjskskosowwiwk
testing(2).pptjjsieieo2i33kejjskskosowwiwk
mhuzaifasultan8
 
white box and black box testing in software engineering
white box and black box testing in software engineeringwhite box and black box testing in software engineering
white box and black box testing in software engineering
NabeelRehman21
 
Test Case Design Techniques
Test Case Design TechniquesTest Case Design Techniques
Test Case Design Techniques
Murageppa-QA
 
Software testing definition
Software testing definitionSoftware testing definition
Software testing definition
Hiro Mia
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
Kiran Kumar
 
Ad

More from 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
SivaprasanthRentala1975
 
Why contract savings are missing
Why contract savings are missingWhy contract savings are missing
Why contract savings are missing
SivaprasanthRentala1975
 
Voyager scm
Voyager scmVoyager scm
Voyager scm
SivaprasanthRentala1975
 
Volumes
VolumesVolumes
Volumes
SivaprasanthRentala1975
 
The new mainframe
The new mainframeThe new mainframe
The new mainframe
SivaprasanthRentala1975
 
Test execution may_04_2006
Test execution may_04_2006Test execution may_04_2006
Test execution may_04_2006
SivaprasanthRentala1975
 
Telecom testing
Telecom testingTelecom testing
Telecom testing
SivaprasanthRentala1975
 
Six sigma
Six sigmaSix sigma
Six sigma
SivaprasanthRentala1975
 
Sdlc models
Sdlc modelsSdlc models
Sdlc models
SivaprasanthRentala1975
 
Sdlc
SdlcSdlc
Sdlc
SivaprasanthRentala1975
 
Scm
ScmScm
Scm
SivaprasanthRentala1975
 
Pt presentation1
Pt presentation1Pt presentation1
Pt presentation1
SivaprasanthRentala1975
 
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
SivaprasanthRentala1975
 
Performance testing and rpt
Performance testing and rptPerformance testing and rpt
Performance testing and rpt
SivaprasanthRentala1975
 
Patents
PatentsPatents
Patents
SivaprasanthRentala1975
 
Xpediter kanbay
Xpediter kanbayXpediter kanbay
Xpediter kanbay
SivaprasanthRentala1975
 
Copy of good quotes.ppt
Copy of good quotes.pptCopy of good quotes.ppt
Copy of good quotes.ppt
SivaprasanthRentala1975
 
Contract savings new
Contract savings newContract savings new
Contract savings new
SivaprasanthRentala1975
 
Contract savings schema
Contract savings schemaContract savings schema
Contract savings schema
SivaprasanthRentala1975
 
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
SivaprasanthRentala1975
 
Ad

Recently uploaded (20)

How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Association for Project Management
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Association for Project Management
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 

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 !
  翻译: