SlideShare a Scribd company logo
1 of 34
AGENDA
1. Test case Design strategy
 Black Box Testing
 White Box Testing
3. Black Box Testing
 Quality Goal Identification
 Equivalence class partitioning
 Boundary value analysis
4. White Box Testing
 Path Coverage
QUALITY GOAL IDENTIFICATION
 The Driving Force
QUALITY GOAL IDENTIFICATION
Example:
Healthcare Information Exchange System(HIES)
QUALITY GOAL IDENTIFICATION
Goal Sub-factor Requirement Description
Functionality Accuracy •The bill of the medicines will be
calculated in Rupees accurately
in 2 fp with respect to their
prices.
•The generated report will
contain the patient name, the
test he wants and the total bill.
The bill of the required test
should be accurately calculated
by the system in Rupees.
It means that the system should
be able to accurately calculate
the bills up to 2 fp in Rupees.
For Example: The pharmacy bill
and the lab tests total bill.
QUALITY GOAL IDENTIFICATION
Goal Sub-factor Requirement Description
Functionality Security •If the unauthorized person
want to login “Login
unsuccessful” message
will be displayed.
•The password should be
between 6-9 characters
It means that the system
should be secure no
unauthorized person will
be able to access the
details of the system. For
Example: The
administration, patient,
doctor has their own
accounts and they can
access them only.
QUALITY GOAL IDENTIFICATION
Goal Sub-factor Requirement Description
Usability Operability •The user can be able to go
back on the previous page
and home page
•No field will be left
emptied. If any field will be
left emptied then it will give
an error message “No field
can be left emptied”
It means that the system
should be easy to use. For
Example: The system is
providing the facility to go
back on previous page and
home, and gives help
messages so that the user
will understand what action
they need to take. The use
of drop down menus
QUALITY GOAL IDENTIFICATION
Goal Sub-factor Requirement Description
Efficiency Time Behavior •The system should
generate the report of the
lab tests within 3 seconds.
It means that the system
should be efficient in terms
of time. For Example: The
reports of the lab tests
should be generated within
time of 3 seconds without
delay so that they can be
immediately emailed to the
patient or give him the print
BLACK BOX TESTING
BLACK BOX TESTING
Goal: Functionality –Accuracy
Test Data
Input Object ECP BVA
Bill
Valid Invalid Valid Invalid
Min Max Min Max
Bill=2fp 2fp>Bill>2fp 2fp 2fp 1fp 3fp
Test Case - ECP
Valid
Test Case id 1 2
Input: Bill 23.00 879.89
E.C.P Tested Bill=2fp Bill=2fp
Expected output Valid/Ok Valid/ok
Test Case - ECP
Invalid
Test Case id 1 2
Input: Bill 89 23.1
E.C.P Tested
2fp>Bill>2fp 2fp>Bill>2fp
Expected output
Invalid Invalid
Test Case - BVA
Valid
Test Case id 1 2
Input: Bill 34.00 567.89
BVA Tested Bill=2fp Bill=2fp
Expected output
Valid/Ok Valid/Ok
Test Case - BVA
Invalid
Test Case id 1 2
Input: Bill 23.1 45.678
BVA Tested 2fp>Bill>2fp 2fp>Bill>2fp
Expected output Invalid Invalid
Test case title: Bill calculation up to 2 Fp
Technique: Black Box Test data generation: E.CP+B.V
BLACK BOX TESTING
 Goal: Functionality-Security
Test case title: Authorize Access
Technique: Black Box Test Data generation technique: E.CP
Test Data
Input Object ECP
Authorize access
Valid Invalid
Patient={P1,P2…Pn}
Doctor={D1,D2…Dn}
Admin={A1,A2….An}
Patient={outside of the valid class}
Doctor={outside of the valid class}
Admin={outside of the valid class}
Test Case - ECP
Valid
Test Case id 1 2
Input: authorize
access
A1 A2
E.C.P Tested
Admin={A1,A2….
An}
Admin={A1,A2….
An}
Expected output Valid/ok
Valid/ok
Test Case - ECP
Invalid
Test Case id 1 2
Input: authorize access P1 D1
E.C.P Tested
Admin={outside
of the valid
class}
Admin={outside of
the valid class}
Expected output Invalid Invalid
BLACK BOX TESTING
Goal: Functionality-Security
Test case title: Authorize Access
Technique: Black Box Test Data generation technique: E.CP
Test Data
Input Object ECP
User name
Valid Invalid
Username= {alphabet, number } Username != special character
Test Case - ECP
Valid
Test Case id 1 2
Input: user name aliahmad 123234567
E.C.P Tested
Username=
{alphabet, number }
Username=
{alphabet, number
}
Expected output Valid/ok
Valid/ok
Test Case - ECP
Invalid
Test Case id 1 2
Input: user name &*& +(-
E.C.P Tested
Username !=
special character
Username !=
special character
Expected output Invalid Invalid
BLACK BOX TESTING
 Goal: Functionality-Security
Test case title: Authorize Access
Technique: Black Box Test Data generation technique: E.CP
Test Data
Input Object ECP BVA
password
Valid Invalid Valid Invalid
Min Max Min Max
6<Password<9 6>password>9, 6 9 5 10
Test Case - ECP
Valid
Test Case id 1 2
Input: password 7 8
E.C.P Tested 6<Password<9 6<Password<9
Expected output Valid/Ok Valid/ok
Test Case - ECP
Invalid
Test Case id 1 2
Input: password 4 11
E.C.P Tested 6>password>9
6>password>9
Expected output
Invalid Invalid
Test Case - BVA
Valid
Test Case id 1 2
Input: password 6 9
BVA Tested 6<Password<9 6<Password<9
Expected output
Valid/Ok Valid/Ok
Test Case - BVA
Invalid
Test Case id 1 2
Input: password 5 10
BVA Tested 6>password>9 6>password>9
Expected output Invalid Invalid
BLACK BOX TESTING
 Goal: Efficiency- Time
Test case title: Efficiency in terms of time
Technique: Black Box testing Test data generation technique: E.C.P+B.V
Test Data
Input Object ECP BVA
Report Generation
Time(RGT)
Valid Invalid Valid Invalid
Min Max Min Max
0<RGT<=3 sec 0>RGT>=3 sec
0 sec 3 sec -1 sec 4 sec
Test Case - ECP
Valid
Test Case id 1 2
Input: RGT 1 2
E.C.P Tested 0<RGT<=3 sec 0<RGT<=3 sec
Expected output Valid/ok Valid/ok
Test Case - ECP
Invalid
Test Case id 1 2
Input: RGT 5 11
E.C.P Tested
0>RGT>=3 sec 0>RGT>=3 sec
Expected output
Invalid Invalid
Test Case - BVA
Valid
Test Case id 1 2
Input: RGT 0 3
BVA Tested 0<RGT<=3 sec 0<RGT<=3 sec
Expected output
Valid/Ok Valid/Ok
Test Case - BVA
Invalid
Test Case id 1 2
Input: RGT -1 4
BVA Tested 0>RGT>=3 sec 0>RGT>=3 sec
Expected output Invalid Invalid
WHITE BOX TESTING
WHITE BOX TESTING
WHITE BOX TESTING
Goal : Accuracy (Accurately calculate the tax)
Control Flow Graph:
 Income
 nDependent
 Subtotal
 Exemption
 Total tax
SIMPLE FORM OF GRAPH
WHITE BOX TESTING
Testing Technique
 Statement coverage:
We will not do statement coverage here because this chunk of code includes different decision
statements. To test every statement is exhaustive and impossible due to many reasons like time etc.
 Branch Coverage:
If we will only test true and false branches it will not ensure the testing of all statements. May be some
statements are critical and need to be tested.
 Path Coverage:
As this code includes multiple if and else conditions which makes the code complex. There are multiple
decision statements.
WHITE BOX TESTING
Path1: (abc)
Income < 0 [Negative income]
Code:
if (Income < 0)
{
cout << "You cannot have a negative income.n";
return 0;
}
WHITE BOX TESTING
Path2: (adefg)
Income >= 0, nDependents <= 0
[Invalid dependants]
Code:
cout << "Enter the number of dependents you have, including yourself: ";
cin >> nDependents;
// second if - check dependents
if (nDependents <= 0)
{
cout <<"You must have at least one dependent.n";
return 0;
}
WHITE BOX TESTING
Path3: (adehijpqr)
Income >= 0, nDependents > 0
Income < 10000, Tax Total < 0
[Negative tax]
Code:
// third if (else-if) - compute tax subtotal
if (Income < 10000)
TaxSubTotal = .02 * Income;
Exemption= nDependents * 50;
TaxTotal=TaxSubTotal - Exemption;
if (TaxTotal<0)
//In case of negative tax
TaxTotal=0;
WHITE BOX TESTING
Path4: (adehklmpqr)
Income >= 0
nDependents > 0
10000 <= Income < 50000
Tax Total < 0
[Negative tax]
Code:
else if (Income < 50000)
TaxSubTotal = 200 + .03 * (Income - 10000);
Exemption= nDependents * 50;
TaxTotal=TaxSubTotal - Exemption;
if (TaxTotal<0)
//In case of negative tax
TaxTotal=0;
WHITE BOX TESTING
Path5: (adehknopqr)
Income >= 0
nDependents > 0
Income >= 50000
Tax Total < 0
[Negative Tax]
Code:
else
TaxSubTotal = 1400 + .04 * (Income - 50000);
Exemption= nDependents * 50;
TaxTotal=TaxSubTotal - Exemption;
// last if - check negative tax
if (TaxTotal<0) //In case of negative tax TaxTotal=0;
WHITE BOX TESTING
Path6: (adehijpqt)
Income >= 0
NDependents > 0
Income < 10000
Tax Total >= 0
[Total Tax]
Code:
// third if (else-if) - compute tax subtotal
if (Income < 10000)
TaxSubTotal = .02 * Income;
Exemption= nDependents * 50;
TaxTotal=TaxSubTotal - Exemption;
// last if - check negative tax
if (TaxTotal<0) //In case of negative tax
TaxTotal=0;
WHITE BOX TESTING
Path7: (adehklmpqt)
Income >= 0
NDependents > 0
10000 <= Income < 50000
Tax Total >= 0
Code:
else if (Income < 50000)
TaxSubTotal = 200 + .03 * (Income - 10000);
else
TaxSubTotal = 1400 + .04 * (Income - 50000);
Exemption= nDependents * 50;
TaxTotal=TaxSubTotal - Exemption;
// last if - check negative tax
if (TaxTotal<0) //In case of negative tax
TaxTotal=0;
Path8: (adehknopqt)
Income >= 0
NDependents > 0
Income >= 50000
Tax Total >= 0
[Total Tax]
Code:
else
TaxSubTotal = 1400 + .04 * (Income - 50000);
Exemption= nDependents * 50;
TaxTotal=TaxSubTotal - Exemption;
// last if - check negative tax
if (TaxTotal<0) //In case of negative tax
TaxTotal=0;
WHITE BOX TESTING
 Path Decision
SIMPLE CFG
Path Decisions Edges/links Prior
ity
2 5 7 9 14 a b c d e f g h i j k l m n o p q r t
abc Y    P8
adefg Y Y      P7
adehijpq
r
Y Y Y          P6
adehklm
pqr
Y Y Y Y           P1
adehkn
opqr
Y Y Y Y Y           P3
adehijpq
t
Y Y Y Y          P2
adehklm
pqt
Y Y Y Y           P5
adehkn
opqt
Y Y Y Y Y           P4
WHITE BOX TESTING
 Path 4 (adehklmpqr)
 Path 6 (adehijpqt)
WHITE BOX TESTING
Test data and Test Case Generation
WHITE BOX TESTING
Test Case title: Negative tax
Technique: Path Coverage
Test Data
Input Object
Income
nDependent
Path Tested
nDependents > 0 , 10000 <= Income <
50000, Tax Total < 0
Red Path
Test Case
Test Case id 1
Input: Income
40000
Path Tested Red Path
Expected output Negative Tax
Test Case
Test Case id 1
Input: nDependent
11
Path Tested Red Path
Expected output Negative Tax
WHITE BOX TESTING
 Test Case title: Total Tax
Technique: Path Coverage
Test Data
Input Object
Income
nDependent
Path Tested
NDependents > 0, Income < 10000
Tax Total >= 0
Orange Path
Test Case
Test Case id 1
Input: Income
8000
Path Tested Orange Path
Expected output Total Tax
Test Case
Test Case id 1
Input: nDependent
8
Path Tested Orange Path
Expected output Total Tax

More Related Content

Similar to Black-box-testing & white-box-testing

EXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
EXTENT 2019: Exactpro Quality Assurance for Financial Market InfrastructuresEXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
EXTENT 2019: Exactpro Quality Assurance for Financial Market InfrastructuresIosif Itkin
 
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ ykblckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ ykSMayankSharma
 
Test design techniques
Test design techniquesTest design techniques
Test design techniquesBipul Roy Bpl
 
Software testing lab manual
Software testing lab manualSoftware testing lab manual
Software testing lab manualTanzeem Syed
 
Software Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solutionSoftware Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solutionMazenetsolution
 
Testcase design techniques final
Testcase design techniques finalTestcase design techniques final
Testcase design techniques finalshraavank
 
Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...
Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...
Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...Hironori Washizaki
 
Writing Test Cases 20110808
Writing Test Cases 20110808Writing Test Cases 20110808
Writing Test Cases 20110808slovejoy
 
Html Server Input Checkbox Control CS
Html Server Input Checkbox Control CSHtml Server Input Checkbox Control CS
Html Server Input Checkbox Control CSsunmitraeducation
 
Chapter 3 Control structures.ppt
Chapter 3 Control structures.pptChapter 3 Control structures.ppt
Chapter 3 Control structures.pptRahulBorate10
 
Lavenya Testing.pptx
Lavenya Testing.pptxLavenya Testing.pptx
Lavenya Testing.pptxssuser94400e
 
Production & Operation Management Chapter9[1]
Production & Operation Management Chapter9[1]Production & Operation Management Chapter9[1]
Production & Operation Management Chapter9[1]Hariharan Ponnusamy
 
Struggles and Challenges in STLC in Ques No.13
Struggles and Challenges in STLC in Ques No.13Struggles and Challenges in STLC in Ques No.13
Struggles and Challenges in STLC in Ques No.13Sadaaki Emura
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic TestingJimi Patel
 

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

EXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
EXTENT 2019: Exactpro Quality Assurance for Financial Market InfrastructuresEXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
EXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
 
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ ykblckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
 
Test design techniques
Test design techniquesTest design techniques
Test design techniques
 
Software testing lab manual
Software testing lab manualSoftware testing lab manual
Software testing lab manual
 
Software Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solutionSoftware Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solution
 
Testcase design techniques final
Testcase design techniques finalTestcase design techniques final
Testcase design techniques final
 
Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...
Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...
Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...
 
Test case, test sets and test scripts
Test case, test sets and test scriptsTest case, test sets and test scripts
Test case, test sets and test scripts
 
Writing Test Cases 20110808
Writing Test Cases 20110808Writing Test Cases 20110808
Writing Test Cases 20110808
 
06
0606
06
 
Html Server Input Checkbox Control CS
Html Server Input Checkbox Control CSHtml Server Input Checkbox Control CS
Html Server Input Checkbox Control CS
 
Chapter 3 Control structures.ppt
Chapter 3 Control structures.pptChapter 3 Control structures.ppt
Chapter 3 Control structures.ppt
 
Lavenya Testing.pptx
Lavenya Testing.pptxLavenya Testing.pptx
Lavenya Testing.pptx
 
Production & Operation Management Chapter9[1]
Production & Operation Management Chapter9[1]Production & Operation Management Chapter9[1]
Production & Operation Management Chapter9[1]
 
Chapter9[1]
Chapter9[1]Chapter9[1]
Chapter9[1]
 
VLSI lab manual
VLSI lab manualVLSI lab manual
VLSI lab manual
 
CTFL Module 04
CTFL Module 04CTFL Module 04
CTFL Module 04
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
Struggles and Challenges in STLC in Ques No.13
Struggles and Challenges in STLC in Ques No.13Struggles and Challenges in STLC in Ques No.13
Struggles and Challenges in STLC in Ques No.13
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 

Recently uploaded

Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypseTomasz Kowalczewski
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationElement34
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio, Inc.
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Conceptsthomashtkim
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphNeo4j
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Clinic
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14VMware Tanzu
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Flutter Agency
 
Rapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and InsightsRapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and Insightsrapidoform
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAShane Coughlan
 

Recently uploaded (20)

Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
Rapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and InsightsRapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and Insights
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 

Black-box-testing & white-box-testing

  • 1. AGENDA 1. Test case Design strategy  Black Box Testing  White Box Testing 3. Black Box Testing  Quality Goal Identification  Equivalence class partitioning  Boundary value analysis 4. White Box Testing  Path Coverage
  • 3. QUALITY GOAL IDENTIFICATION Example: Healthcare Information Exchange System(HIES)
  • 4. QUALITY GOAL IDENTIFICATION Goal Sub-factor Requirement Description Functionality Accuracy •The bill of the medicines will be calculated in Rupees accurately in 2 fp with respect to their prices. •The generated report will contain the patient name, the test he wants and the total bill. The bill of the required test should be accurately calculated by the system in Rupees. It means that the system should be able to accurately calculate the bills up to 2 fp in Rupees. For Example: The pharmacy bill and the lab tests total bill.
  • 5. QUALITY GOAL IDENTIFICATION Goal Sub-factor Requirement Description Functionality Security •If the unauthorized person want to login “Login unsuccessful” message will be displayed. •The password should be between 6-9 characters It means that the system should be secure no unauthorized person will be able to access the details of the system. For Example: The administration, patient, doctor has their own accounts and they can access them only.
  • 6. QUALITY GOAL IDENTIFICATION Goal Sub-factor Requirement Description Usability Operability •The user can be able to go back on the previous page and home page •No field will be left emptied. If any field will be left emptied then it will give an error message “No field can be left emptied” It means that the system should be easy to use. For Example: The system is providing the facility to go back on previous page and home, and gives help messages so that the user will understand what action they need to take. The use of drop down menus
  • 7. QUALITY GOAL IDENTIFICATION Goal Sub-factor Requirement Description Efficiency Time Behavior •The system should generate the report of the lab tests within 3 seconds. It means that the system should be efficient in terms of time. For Example: The reports of the lab tests should be generated within time of 3 seconds without delay so that they can be immediately emailed to the patient or give him the print
  • 9. BLACK BOX TESTING Goal: Functionality –Accuracy Test Data Input Object ECP BVA Bill Valid Invalid Valid Invalid Min Max Min Max Bill=2fp 2fp>Bill>2fp 2fp 2fp 1fp 3fp Test Case - ECP Valid Test Case id 1 2 Input: Bill 23.00 879.89 E.C.P Tested Bill=2fp Bill=2fp Expected output Valid/Ok Valid/ok Test Case - ECP Invalid Test Case id 1 2 Input: Bill 89 23.1 E.C.P Tested 2fp>Bill>2fp 2fp>Bill>2fp Expected output Invalid Invalid Test Case - BVA Valid Test Case id 1 2 Input: Bill 34.00 567.89 BVA Tested Bill=2fp Bill=2fp Expected output Valid/Ok Valid/Ok Test Case - BVA Invalid Test Case id 1 2 Input: Bill 23.1 45.678 BVA Tested 2fp>Bill>2fp 2fp>Bill>2fp Expected output Invalid Invalid Test case title: Bill calculation up to 2 Fp Technique: Black Box Test data generation: E.CP+B.V
  • 10. BLACK BOX TESTING  Goal: Functionality-Security Test case title: Authorize Access Technique: Black Box Test Data generation technique: E.CP Test Data Input Object ECP Authorize access Valid Invalid Patient={P1,P2…Pn} Doctor={D1,D2…Dn} Admin={A1,A2….An} Patient={outside of the valid class} Doctor={outside of the valid class} Admin={outside of the valid class} Test Case - ECP Valid Test Case id 1 2 Input: authorize access A1 A2 E.C.P Tested Admin={A1,A2…. An} Admin={A1,A2…. An} Expected output Valid/ok Valid/ok Test Case - ECP Invalid Test Case id 1 2 Input: authorize access P1 D1 E.C.P Tested Admin={outside of the valid class} Admin={outside of the valid class} Expected output Invalid Invalid
  • 11. BLACK BOX TESTING Goal: Functionality-Security Test case title: Authorize Access Technique: Black Box Test Data generation technique: E.CP Test Data Input Object ECP User name Valid Invalid Username= {alphabet, number } Username != special character Test Case - ECP Valid Test Case id 1 2 Input: user name aliahmad 123234567 E.C.P Tested Username= {alphabet, number } Username= {alphabet, number } Expected output Valid/ok Valid/ok Test Case - ECP Invalid Test Case id 1 2 Input: user name &*& +(- E.C.P Tested Username != special character Username != special character Expected output Invalid Invalid
  • 12. BLACK BOX TESTING  Goal: Functionality-Security Test case title: Authorize Access Technique: Black Box Test Data generation technique: E.CP Test Data Input Object ECP BVA password Valid Invalid Valid Invalid Min Max Min Max 6<Password<9 6>password>9, 6 9 5 10 Test Case - ECP Valid Test Case id 1 2 Input: password 7 8 E.C.P Tested 6<Password<9 6<Password<9 Expected output Valid/Ok Valid/ok Test Case - ECP Invalid Test Case id 1 2 Input: password 4 11 E.C.P Tested 6>password>9 6>password>9 Expected output Invalid Invalid Test Case - BVA Valid Test Case id 1 2 Input: password 6 9 BVA Tested 6<Password<9 6<Password<9 Expected output Valid/Ok Valid/Ok Test Case - BVA Invalid Test Case id 1 2 Input: password 5 10 BVA Tested 6>password>9 6>password>9 Expected output Invalid Invalid
  • 13. BLACK BOX TESTING  Goal: Efficiency- Time Test case title: Efficiency in terms of time Technique: Black Box testing Test data generation technique: E.C.P+B.V Test Data Input Object ECP BVA Report Generation Time(RGT) Valid Invalid Valid Invalid Min Max Min Max 0<RGT<=3 sec 0>RGT>=3 sec 0 sec 3 sec -1 sec 4 sec Test Case - ECP Valid Test Case id 1 2 Input: RGT 1 2 E.C.P Tested 0<RGT<=3 sec 0<RGT<=3 sec Expected output Valid/ok Valid/ok Test Case - ECP Invalid Test Case id 1 2 Input: RGT 5 11 E.C.P Tested 0>RGT>=3 sec 0>RGT>=3 sec Expected output Invalid Invalid Test Case - BVA Valid Test Case id 1 2 Input: RGT 0 3 BVA Tested 0<RGT<=3 sec 0<RGT<=3 sec Expected output Valid/Ok Valid/Ok Test Case - BVA Invalid Test Case id 1 2 Input: RGT -1 4 BVA Tested 0>RGT>=3 sec 0>RGT>=3 sec Expected output Invalid Invalid
  • 16. WHITE BOX TESTING Goal : Accuracy (Accurately calculate the tax) Control Flow Graph:  Income  nDependent  Subtotal  Exemption  Total tax
  • 17.
  • 18. SIMPLE FORM OF GRAPH
  • 19. WHITE BOX TESTING Testing Technique  Statement coverage: We will not do statement coverage here because this chunk of code includes different decision statements. To test every statement is exhaustive and impossible due to many reasons like time etc.  Branch Coverage: If we will only test true and false branches it will not ensure the testing of all statements. May be some statements are critical and need to be tested.  Path Coverage: As this code includes multiple if and else conditions which makes the code complex. There are multiple decision statements.
  • 20. WHITE BOX TESTING Path1: (abc) Income < 0 [Negative income] Code: if (Income < 0) { cout << "You cannot have a negative income.n"; return 0; }
  • 21. WHITE BOX TESTING Path2: (adefg) Income >= 0, nDependents <= 0 [Invalid dependants] Code: cout << "Enter the number of dependents you have, including yourself: "; cin >> nDependents; // second if - check dependents if (nDependents <= 0) { cout <<"You must have at least one dependent.n"; return 0; }
  • 22. WHITE BOX TESTING Path3: (adehijpqr) Income >= 0, nDependents > 0 Income < 10000, Tax Total < 0 [Negative tax] Code: // third if (else-if) - compute tax subtotal if (Income < 10000) TaxSubTotal = .02 * Income; Exemption= nDependents * 50; TaxTotal=TaxSubTotal - Exemption; if (TaxTotal<0) //In case of negative tax TaxTotal=0;
  • 23. WHITE BOX TESTING Path4: (adehklmpqr) Income >= 0 nDependents > 0 10000 <= Income < 50000 Tax Total < 0 [Negative tax] Code: else if (Income < 50000) TaxSubTotal = 200 + .03 * (Income - 10000); Exemption= nDependents * 50; TaxTotal=TaxSubTotal - Exemption; if (TaxTotal<0) //In case of negative tax TaxTotal=0;
  • 24. WHITE BOX TESTING Path5: (adehknopqr) Income >= 0 nDependents > 0 Income >= 50000 Tax Total < 0 [Negative Tax] Code: else TaxSubTotal = 1400 + .04 * (Income - 50000); Exemption= nDependents * 50; TaxTotal=TaxSubTotal - Exemption; // last if - check negative tax if (TaxTotal<0) //In case of negative tax TaxTotal=0;
  • 25. WHITE BOX TESTING Path6: (adehijpqt) Income >= 0 NDependents > 0 Income < 10000 Tax Total >= 0 [Total Tax] Code: // third if (else-if) - compute tax subtotal if (Income < 10000) TaxSubTotal = .02 * Income; Exemption= nDependents * 50; TaxTotal=TaxSubTotal - Exemption; // last if - check negative tax if (TaxTotal<0) //In case of negative tax TaxTotal=0;
  • 26. WHITE BOX TESTING Path7: (adehklmpqt) Income >= 0 NDependents > 0 10000 <= Income < 50000 Tax Total >= 0 Code: else if (Income < 50000) TaxSubTotal = 200 + .03 * (Income - 10000); else TaxSubTotal = 1400 + .04 * (Income - 50000); Exemption= nDependents * 50; TaxTotal=TaxSubTotal - Exemption; // last if - check negative tax if (TaxTotal<0) //In case of negative tax TaxTotal=0;
  • 27. Path8: (adehknopqt) Income >= 0 NDependents > 0 Income >= 50000 Tax Total >= 0 [Total Tax] Code: else TaxSubTotal = 1400 + .04 * (Income - 50000); Exemption= nDependents * 50; TaxTotal=TaxSubTotal - Exemption; // last if - check negative tax if (TaxTotal<0) //In case of negative tax TaxTotal=0;
  • 28. WHITE BOX TESTING  Path Decision
  • 30. Path Decisions Edges/links Prior ity 2 5 7 9 14 a b c d e f g h i j k l m n o p q r t abc Y    P8 adefg Y Y      P7 adehijpq r Y Y Y          P6 adehklm pqr Y Y Y Y           P1 adehkn opqr Y Y Y Y Y           P3 adehijpq t Y Y Y Y          P2 adehklm pqt Y Y Y Y           P5 adehkn opqt Y Y Y Y Y           P4
  • 31. WHITE BOX TESTING  Path 4 (adehklmpqr)  Path 6 (adehijpqt)
  • 32. WHITE BOX TESTING Test data and Test Case Generation
  • 33. WHITE BOX TESTING Test Case title: Negative tax Technique: Path Coverage Test Data Input Object Income nDependent Path Tested nDependents > 0 , 10000 <= Income < 50000, Tax Total < 0 Red Path Test Case Test Case id 1 Input: Income 40000 Path Tested Red Path Expected output Negative Tax Test Case Test Case id 1 Input: nDependent 11 Path Tested Red Path Expected output Negative Tax
  • 34. WHITE BOX TESTING  Test Case title: Total Tax Technique: Path Coverage Test Data Input Object Income nDependent Path Tested NDependents > 0, Income < 10000 Tax Total >= 0 Orange Path Test Case Test Case id 1 Input: Income 8000 Path Tested Orange Path Expected output Total Tax Test Case Test Case id 1 Input: nDependent 8 Path Tested Orange Path Expected output Total Tax