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

More Related Content

What's hot

Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
Adeel Rasheed
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
Priya Sharma
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
ikhwanhayat
 
Unit 2 Unit Testing
Unit 2   Unit TestingUnit 2   Unit Testing
Unit 2 Unit Testing
ravikhimani
 
Unit test
Unit testUnit test
Unit test
Tran Duc
 
Python Installation Guide (1).pdf
Python Installation Guide  (1).pdfPython Installation Guide  (1).pdf
Python Installation Guide (1).pdf
SudhirSubramanya2
 
Unit testing and scaffolding
Unit testing and scaffoldingUnit testing and scaffolding
Unit testing and scaffolding
Valerio Maggio
 
White box & Black box testing
White box & Black box testingWhite box & Black box testing
White box & Black box testing
NitishMhaske1
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing Basics
Belal Raslan
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
priya_trivedi
 
Los pilares de la poo
Los pilares de la pooLos pilares de la poo
Los pilares de la poo
Santiago Rodríguez Paniagua
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
Ejercicios MS-DOS
Ejercicios MS-DOSEjercicios MS-DOS
Ejercicios MS-DOSVicenta
 
Standard Libraries in Python Programming
Standard Libraries in Python ProgrammingStandard Libraries in Python Programming
Standard Libraries in Python Programming
Rohan Chougule
 
Regression testing
Regression testingRegression testing
Regression testing
gokilabrindha
 
테스터가 말하는 테스트코드 작성 팁과 사례
테스터가 말하는 테스트코드 작성 팁과 사례테스터가 말하는 테스트코드 작성 팁과 사례
테스터가 말하는 테스트코드 작성 팁과 사례
SangIn Choung
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)
Mani Kanth
 
Working with Methods in Java.pptx
Working with Methods in Java.pptxWorking with Methods in Java.pptx
Working with Methods in Java.pptx
maryansagsgao
 

What's hot (20)

Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
Unit 2 Unit Testing
Unit 2   Unit TestingUnit 2   Unit Testing
Unit 2 Unit Testing
 
Unit test
Unit testUnit test
Unit test
 
Python Installation Guide (1).pdf
Python Installation Guide  (1).pdfPython Installation Guide  (1).pdf
Python Installation Guide (1).pdf
 
Unit testing and scaffolding
Unit testing and scaffoldingUnit testing and scaffolding
Unit testing and scaffolding
 
White box & Black box testing
White box & Black box testingWhite box & Black box testing
White box & Black box testing
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing Basics
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
Los pilares de la poo
Los pilares de la pooLos pilares de la poo
Los pilares de la poo
 
Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Ejercicios MS-DOS
Ejercicios MS-DOSEjercicios MS-DOS
Ejercicios MS-DOS
 
Black box software testing
Black box software testingBlack box software testing
Black box software testing
 
Standard Libraries in Python Programming
Standard Libraries in Python ProgrammingStandard Libraries in Python Programming
Standard Libraries in Python Programming
 
Regression testing
Regression testingRegression testing
Regression testing
 
테스터가 말하는 테스트코드 작성 팁과 사례
테스터가 말하는 테스트코드 작성 팁과 사례테스터가 말하는 테스트코드 작성 팁과 사례
테스터가 말하는 테스트코드 작성 팁과 사례
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)
 
Working with Methods in Java.pptx
Working with Methods in Java.pptxWorking with Methods in Java.pptx
Working with Methods in Java.pptx
 

Similar to Black Box Testing.pdf

White boxvsblackbox
White boxvsblackboxWhite boxvsblackbox
White boxvsblackboxsanerjjd
 
Lesson 2....PPT 1
Lesson 2....PPT 1Lesson 2....PPT 1
Lesson 2....PPT 1
bhushan Nehete
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
asifusman1998
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
Kiran Kumar
 
Test Techniques
Test TechniquesTest Techniques
Test Techniques
nazeer pasha
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
Kiran Kumar
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
Jimi 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 Chandigarh
Pankaj Thakur
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
CHANDUKAYALA
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
Rohit846825
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
PrashanthJanakiraman
 
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-4
SIMONTHOMAS 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 -- Evaluation
Thomas Ploetz
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality Assurance
Kiran Kumar
 
white box testing.ppt
white box testing.pptwhite box testing.ppt
white box testing.ppt
VISHNUSHANKARSINGH3
 
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
SyedAhmad732853
 

Similar to 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
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
Test Techniques
Test TechniquesTest Techniques
Test 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
 

Recently uploaded

Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Subhajit Sahu
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
u86oixdj
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 

Recently uploaded (20)

Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 

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