SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
TEST CASE DESIGN
BLACK BOX
TESTING
Test Case Design
Box
Black Box Testing
• Black-box testing: Testing, either functional
or non-functional, without reference to the
internal structure of the component or
system. (ISTQB)
Test Execution
Black Box Testing
– testing without knowing the internal workings of thecode
– WHAT a system does, rather than HOW it works it
– typically used at System Test phase, although can be useful
throughout the test lifecycle
– also known as specification based testing andfunction
testing
– Applies for Functional and Non-Functional testing
Input Output
If Output = Expected result then pass
White Box Testing
white-box testing: Testing based on
an analysis of the internal structure
of the component or system.
(ISTQB)
White Box Testing
– testing based upon the structure of the code
– typically undertaken at Component and Component
Integration Test phases by development teams
– also known as structural or glass box testingor
structure based testing
Execute with monitor the flow
Input Output
Test Case Design
• Terminologies
– Test condition – an item or event of a component or system that
could be verified by one or more test cases
– Test case specification– a set of input values, execution
preconditions, expected results, and executionpostconditions,
designed for a specific test objective or test condition
– A test procedure specification – a sequence of actions for the
execution of the test. It may consist of number of test cases.
– Test basis: All documents from which the SRS, SDS, code, or any
related documents of a component or a system can be inferred.
6
Test
Case
s
Test
Procedure
Specification
or
Manual Test
Script
Priority
Test Conditions, Cases, Procedures and
Schedule
What How How When
Test
Execution
Schedule
Automated
Test Script
Test
Condition
Sourced
Documentation
Test
Cases
S
Test Procedure
pecifications
Illustrative Example of Test Case Design -1
Inorderfor3integersa,b,andctobethe
sides of a triangle, the following conditions
must bemet:
Scalene: a+b>c,wherea<b<c
Isosceles: a+a>c,whereb=a
Equilateral:a=a=a,whereb=a,c=a,anda>0
A triangle is:
Scalene if no two sides are equal
Isoscelesif2sidesareequal
Equilateral if all 3 sides are equal
void triangle (int a, int b, int c)
{
int min,med, max;
if (a>b)
{
max=a;
min = b;
}
else
{
max = b;
min = a;
}
if (c>max)
max = c;
else if (c<max)
min = c;
med = a+b+c-min-max;
if (max>min+med)
cout << "Impossible trianglen";
else if (max==min)
cout << "Equilateral trianglen";
else if (max==med||med==min)
cout << "Isoceles trianglen";
else if (max*max==min*min + med*med)
cout << "Rightangled trianglen";
else
cout << "Any trianglen";
}
8
•
a b
c
Illustrative Example of Test Case Design -2
9
Why dynamic test techniques?
• Dynamic test technique is a sampling technique.
• Exhaustive testing is testing all potential inputs and
conditions is unrealistic
– So we need to use a subset of all potential test
cases
– Select the high likelihood of detecting defects
• There is a required processes to select the efficient
and intelligent test cases
– test case design techniques are such thought
processes
10
What is a testing technique?
• a process for selecting or designing test cases based
on a specification or structure model of the system
• successful when detecting defects
• 'best' practice
• It is a process of a best test cases derived
• a process of objectively evaluating the test effort
Testing should be rigorous, thorough and
systematic
11
Advantages of techniques
• Different people: similar probability find faults
– gain some independence of thought
• Effective testing: find more faults
– focus attention on specific types of fault
– know you're testing the right thing
• Efficient testing: find faults with less effort
– avoid duplication
– systematic techniques are measurable
Using techniques makes testing much
more effective 12
Measurement
• Objective assessment of thoroughness of testing
(with respect to use of each technique)
– useful for comparison of one test effort to another
• E.g.
Project C
30% Boundaries
partitions
40% Equivalence
70% Branches
Project D
70% Branches
partitions
50% Boundaries
45% Equivalence
13
Black Box Techniques for Test Case Design
14
Equivalence
partitioning (EP)
– primarily black box technique
– divide (partition) the inputs, outputs, etc. intoareas which are the same (equivalent)
– assumption: if one value works, all will work
– one from each partition better than all fromone
15
Equivalence Partitioning:
 It is very difficult, expensive and time consuming if not at
times impossible to test every single input value
combination for a system.
 We can break our set of test cases into sub- sets. We then
choose representative values for each subset and ensure that
we test these.
Each subset of tests is thought of as a partition between neighbouring
subsets or domains.
 Equivalence Partitioning:
 Makes use of the principle that software acts in a general
way (generalises) in the way it deals with subsets of data,
 Selects Groups of inputs that will be expected to be
handled in the same way.
 Within a group of data, a representative input can be
selected for testing.
 For many professional testers this is fairly intuitive.
 The approach formalises the technique allowing an
intuitive approach to become repeatable.
 EP Example:
 Consider a requirement for a software system:
 “The customer is eligible for a life assurance
discount if they are at least 18 and no older
than 56 years of age.”
For the exercise only consider integer years.
One of the fields on a form contains a text box
which accepts numeric values in the range
of 18 to 26. Identify the invalid Equivalence
class.
a) 17
b) 19
c) 25
d) 21
 In an Examination a candidate has to score
minimum of 25 marks in order to pass the exam.
The maximum that he can score is 50 marks.
Identify the Valid Equivalence values if
the student passes the exam.
a) 22,24,27
b) 21,39,40
c) 29,30,31
d) 0,15,22
Boundary value analysis (BVA)
– faults tend to lurk near boundaries
– good place to look for faults
– test values on both sides of boundaries
17
A program validates a numeric field as follows: values less than 10 are rejected,
values between 10 and 21 are accepted, values greater than or equal to 22 are
rejected. Which of the following covers the MOST boundary values?
a. 9,10,11,22
b. 9,10,21,22
c. 10,11,21,22
d. 10,11,20,21
In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax-free.
The next £1500 is taxed at 10%.
The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
To the nearest whole pound, which of these is a valid Boundary Value Analysis
test case?
a) £28000
b) £33501
c) £32001
d) £1500
Example 1: EP
void ValveControl (int pressure, inttemperature)
{
if (pressure <= 10)
{
OpenTheValve();
printf (“Valve openedn”);
}
if (pressure > 100)
{
CloseTheValve();
printf (“Valve closedn”);
}
else
{
ShutDown();
}
if (temperature > 27)
{
EnableCoolingCoil();
printf (“Cooling coil enabledn”);
}
else
{
• Using EP and BV,
derive the set of
values for pressure
and temperature.
• Enumerate
exhaustively all the
values of pressure
and temperature to
form a complete test
suite.
DisableCollingCoil();
}
} 18
Example 2: EP & BVA
• Scenario: If you take the train before 9:30 am
or in the afternoon after 4:00pm until 7:30 pm
(‘the rush hour’), you must pay full fare. A
saver ticket is available for trains between
9:30 am and 4:00 pm.
– Identify the partitions
– Identify the boundary values to test train times for
ticket type
– Derive the test cases using EP and BVA
19
Example 3: EP
20
Valid partitions
• The valid partitions can be
– 0<=exam mark <=75
– 0<=coursework <=25
21
Invalid partitions
• The most obvious partitions are
– Exam mark > 75
– Exam mark < 0
– Coursework mark > 25
– Coursework mark <0
22
Exam mark and c/w mark
23
Less obvious invalid input EP
• invalid INPUT EP should include
24
Partitions for the OUTPUTS
• EP for valid OUTPUTS should include
25
The EP and boundaries
• The EP and boundaries for total mark
26
Unspecified Outputs
• Three unspecfied Outputs can be identified
(very subjective)
– Output = “E”
– Output = “A+”
– Output = “null”
27
Total EP
28
Test Cases corresponding to EP exam
mark (INPUT)
29
Test Case 4-6 (coursework)
30
Test case for Invalid inputs
31
Test cases for outputs:1
32
Test cases for outputs:2
33
Test cases for invalid outputs:3
34

Weitere ähnliche Inhalte

Was ist angesagt?

Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data StructureZidny Nafan
 
Super keyword in java
Super keyword in javaSuper keyword in java
Super keyword in javaHitesh Kumar
 
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...Kuntal Bhowmick
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in javaRahulAnanda1
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Conceptsthinkphp
 
Array sorting
Array sortingArray sorting
Array sortingALI RAZA
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming pptNitesh Dubey
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
SCSJ3553 - Artificial Intelligence Final Exam paper - UTM
SCSJ3553 - Artificial Intelligence Final Exam paper - UTMSCSJ3553 - Artificial Intelligence Final Exam paper - UTM
SCSJ3553 - Artificial Intelligence Final Exam paper - UTMAbdul Khaliq
 
Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...
Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...
Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...Kuntal Bhowmick
 
context free language
context free languagecontext free language
context free languagekhush_boo31
 
08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.pptTareq Hasan
 
An overview of object oriented systems development
An overview of object oriented systems developmentAn overview of object oriented systems development
An overview of object oriented systems developmentAdri Jovin
 
Switch statements in Java
Switch statements  in JavaSwitch statements  in Java
Switch statements in JavaJin Castor
 
Ambiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarAmbiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarMdImamHasan1
 

Was ist angesagt? (20)

Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
 
CLASS & OBJECT IN JAVA
CLASS & OBJECT  IN JAVACLASS & OBJECT  IN JAVA
CLASS & OBJECT IN JAVA
 
Super keyword in java
Super keyword in javaSuper keyword in java
Super keyword in java
 
Planning Agent
Planning AgentPlanning Agent
Planning Agent
 
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Array sorting
Array sortingArray sorting
Array sorting
 
Python Flavors
Python FlavorsPython Flavors
Python Flavors
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
SCSJ3553 - Artificial Intelligence Final Exam paper - UTM
SCSJ3553 - Artificial Intelligence Final Exam paper - UTMSCSJ3553 - Artificial Intelligence Final Exam paper - UTM
SCSJ3553 - Artificial Intelligence Final Exam paper - UTM
 
Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...
Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...
Multiple Choice Questions on JAVA (object oriented programming) bank 6 -- inh...
 
Java program structure
Java program structureJava program structure
Java program structure
 
context free language
context free languagecontext free language
context free language
 
08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt
 
An overview of object oriented systems development
An overview of object oriented systems developmentAn overview of object oriented systems development
An overview of object oriented systems development
 
Switch statements in Java
Switch statements  in JavaSwitch statements  in Java
Switch statements in Java
 
Np complete
Np completeNp complete
Np complete
 
Ambiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarAmbiguous & Unambiguous Grammar
Ambiguous & Unambiguous Grammar
 

Ähnlich wie Black Box Testing.pdf

White boxvsblackbox
White boxvsblackboxWhite boxvsblackbox
White boxvsblackboxsanerjjd
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesKiran Kumar
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic TestingJimi Patel
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
Testcase design techniques final
Testcase design techniques finalTestcase design techniques final
Testcase design techniques finalshraavank
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4SIMONTHOMAS S
 
Bridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
Bridging the Gap: Machine Learning for Ubiquitous Computing -- EvaluationBridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
Bridging the Gap: Machine Learning for Ubiquitous Computing -- EvaluationThomas Ploetz
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality AssuranceKiran Kumar
 
5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.pptSyedAhmad732853
 

Ähnlich wie Black Box Testing.pdf (20)

White boxvsblackbox
White boxvsblackboxWhite boxvsblackbox
White boxvsblackbox
 
Whitebox
WhiteboxWhitebox
Whitebox
 
Lesson 2....PPT 1
Lesson 2....PPT 1Lesson 2....PPT 1
Lesson 2....PPT 1
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
 
Test Techniques
Test TechniquesTest Techniques
Test Techniques
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
 
Testing
TestingTesting
Testing
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
Testcase design techniques final
Testcase design techniques finalTestcase design techniques final
Testcase design techniques final
 
Test design techniques
Test design techniquesTest design techniques
Test design techniques
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4
 
Bridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
Bridging the Gap: Machine Learning for Ubiquitous Computing -- EvaluationBridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
Bridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality Assurance
 
white box testing.ppt
white box testing.pptwhite box testing.ppt
white box testing.ppt
 
5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt
 

Kürzlich hochgeladen

Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 

Kürzlich hochgeladen (20)

Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 

Black Box Testing.pdf

  • 1. TEST CASE DESIGN BLACK BOX TESTING Test Case Design
  • 2. Box
  • 3. Black Box Testing • Black-box testing: Testing, either functional or non-functional, without reference to the internal structure of the component or system. (ISTQB)
  • 4. Test Execution Black Box Testing – testing without knowing the internal workings of thecode – WHAT a system does, rather than HOW it works it – typically used at System Test phase, although can be useful throughout the test lifecycle – also known as specification based testing andfunction testing – Applies for Functional and Non-Functional testing Input Output If Output = Expected result then pass
  • 5. White Box Testing white-box testing: Testing based on an analysis of the internal structure of the component or system. (ISTQB)
  • 6. White Box Testing – testing based upon the structure of the code – typically undertaken at Component and Component Integration Test phases by development teams – also known as structural or glass box testingor structure based testing Execute with monitor the flow Input Output
  • 7. Test Case Design • Terminologies – Test condition – an item or event of a component or system that could be verified by one or more test cases – Test case specification– a set of input values, execution preconditions, expected results, and executionpostconditions, designed for a specific test objective or test condition – A test procedure specification – a sequence of actions for the execution of the test. It may consist of number of test cases. – Test basis: All documents from which the SRS, SDS, code, or any related documents of a component or a system can be inferred. 6
  • 8. Test Case s Test Procedure Specification or Manual Test Script Priority Test Conditions, Cases, Procedures and Schedule What How How When Test Execution Schedule Automated Test Script Test Condition Sourced Documentation Test Cases S Test Procedure pecifications
  • 9. Illustrative Example of Test Case Design -1 Inorderfor3integersa,b,andctobethe sides of a triangle, the following conditions must bemet: Scalene: a+b>c,wherea<b<c Isosceles: a+a>c,whereb=a Equilateral:a=a=a,whereb=a,c=a,anda>0 A triangle is: Scalene if no two sides are equal Isoscelesif2sidesareequal Equilateral if all 3 sides are equal void triangle (int a, int b, int c) { int min,med, max; if (a>b) { max=a; min = b; } else { max = b; min = a; } if (c>max) max = c; else if (c<max) min = c; med = a+b+c-min-max; if (max>min+med) cout << "Impossible trianglen"; else if (max==min) cout << "Equilateral trianglen"; else if (max==med||med==min) cout << "Isoceles trianglen"; else if (max*max==min*min + med*med) cout << "Rightangled trianglen"; else cout << "Any trianglen"; } 8 • a b c
  • 10. Illustrative Example of Test Case Design -2 9
  • 11. Why dynamic test techniques? • Dynamic test technique is a sampling technique. • Exhaustive testing is testing all potential inputs and conditions is unrealistic – So we need to use a subset of all potential test cases – Select the high likelihood of detecting defects • There is a required processes to select the efficient and intelligent test cases – test case design techniques are such thought processes 10
  • 12. What is a testing technique? • a process for selecting or designing test cases based on a specification or structure model of the system • successful when detecting defects • 'best' practice • It is a process of a best test cases derived • a process of objectively evaluating the test effort Testing should be rigorous, thorough and systematic 11
  • 13. Advantages of techniques • Different people: similar probability find faults – gain some independence of thought • Effective testing: find more faults – focus attention on specific types of fault – know you're testing the right thing • Efficient testing: find faults with less effort – avoid duplication – systematic techniques are measurable Using techniques makes testing much more effective 12
  • 14. Measurement • Objective assessment of thoroughness of testing (with respect to use of each technique) – useful for comparison of one test effort to another • E.g. Project C 30% Boundaries partitions 40% Equivalence 70% Branches Project D 70% Branches partitions 50% Boundaries 45% Equivalence 13
  • 15. Black Box Techniques for Test Case Design 14
  • 16. Equivalence partitioning (EP) – primarily black box technique – divide (partition) the inputs, outputs, etc. intoareas which are the same (equivalent) – assumption: if one value works, all will work – one from each partition better than all fromone
  • 17. 15 Equivalence Partitioning:  It is very difficult, expensive and time consuming if not at times impossible to test every single input value combination for a system.  We can break our set of test cases into sub- sets. We then choose representative values for each subset and ensure that we test these. Each subset of tests is thought of as a partition between neighbouring subsets or domains.
  • 18.  Equivalence Partitioning:  Makes use of the principle that software acts in a general way (generalises) in the way it deals with subsets of data,  Selects Groups of inputs that will be expected to be handled in the same way.  Within a group of data, a representative input can be selected for testing.  For many professional testers this is fairly intuitive.  The approach formalises the technique allowing an intuitive approach to become repeatable.
  • 19.  EP Example:  Consider a requirement for a software system:  “The customer is eligible for a life assurance discount if they are at least 18 and no older than 56 years of age.” For the exercise only consider integer years.
  • 20.
  • 21. One of the fields on a form contains a text box which accepts numeric values in the range of 18 to 26. Identify the invalid Equivalence class. a) 17 b) 19 c) 25 d) 21
  • 22.  In an Examination a candidate has to score minimum of 25 marks in order to pass the exam. The maximum that he can score is 50 marks. Identify the Valid Equivalence values if the student passes the exam. a) 22,24,27 b) 21,39,40 c) 29,30,31 d) 0,15,22
  • 23. Boundary value analysis (BVA) – faults tend to lurk near boundaries – good place to look for faults – test values on both sides of boundaries
  • 24. 17
  • 25.
  • 26. A program validates a numeric field as follows: values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected. Which of the following covers the MOST boundary values? a. 9,10,11,22 b. 9,10,21,22 c. 10,11,21,22 d. 10,11,20,21
  • 27. In a system designed to work out the tax to be paid: An employee has £4000 of salary tax-free. The next £1500 is taxed at 10%. The next £28000 after that is taxed at 22%. Any further amount is taxed at 40%. To the nearest whole pound, which of these is a valid Boundary Value Analysis test case? a) £28000 b) £33501 c) £32001 d) £1500
  • 28. Example 1: EP void ValveControl (int pressure, inttemperature) { if (pressure <= 10) { OpenTheValve(); printf (“Valve openedn”); } if (pressure > 100) { CloseTheValve(); printf (“Valve closedn”); } else { ShutDown(); } if (temperature > 27) { EnableCoolingCoil(); printf (“Cooling coil enabledn”); } else { • Using EP and BV, derive the set of values for pressure and temperature. • Enumerate exhaustively all the values of pressure and temperature to form a complete test suite. DisableCollingCoil(); } } 18
  • 29. Example 2: EP & BVA • Scenario: If you take the train before 9:30 am or in the afternoon after 4:00pm until 7:30 pm (‘the rush hour’), you must pay full fare. A saver ticket is available for trains between 9:30 am and 4:00 pm. – Identify the partitions – Identify the boundary values to test train times for ticket type – Derive the test cases using EP and BVA 19
  • 31. Valid partitions • The valid partitions can be – 0<=exam mark <=75 – 0<=coursework <=25 21
  • 32. Invalid partitions • The most obvious partitions are – Exam mark > 75 – Exam mark < 0 – Coursework mark > 25 – Coursework mark <0 22
  • 33. Exam mark and c/w mark 23
  • 34. Less obvious invalid input EP • invalid INPUT EP should include 24
  • 35. Partitions for the OUTPUTS • EP for valid OUTPUTS should include 25
  • 36. The EP and boundaries • The EP and boundaries for total mark 26
  • 37. Unspecified Outputs • Three unspecfied Outputs can be identified (very subjective) – Output = “E” – Output = “A+” – Output = “null” 27
  • 39. Test Cases corresponding to EP exam mark (INPUT) 29
  • 40. Test Case 4-6 (coursework) 30
  • 41. Test case for Invalid inputs 31
  • 42. Test cases for outputs:1 32
  • 43. Test cases for outputs:2 33
  • 44. Test cases for invalid outputs:3 34