SlideShare a Scribd company logo
1 of 11
WHITE BOX
TESTING
1
CONTENTS
 What is white box testing?
 White box testing techniques
 Path testing
 Statement coverage testing
 Branch coverage testing
 Loop testing
 Advantages of white box testing
 Disadvantages of white box testing
2
WHAT IS WHITE BOX
TESTING?
 It is also know as:
 Glass based testing.
 Structural testing.
 White box testing is performed based on the knowledge of how the
system is implemented. It requires access to source code.
 The objective of white box testing is to validate whether code
implementation follows intended design in order to check implemented
security functionality and uncover exploitable vulnerabilities.
3
WHITE BOX TESTING
TECHNIQUES
Path testing
Statement Coverage Testing
Branch Coverage Testing
Loop Testing
4
PATH TESTING
 The objective of path testing is to define a set of linear independent
path, called basis set, that can be used to construct any path through
program flow graph.
 A path represents floe of execution from start of a method to its exit.
5
STATEMENT COVERAGE
TESTING
 Statement coverage testing identifies the statements in the method or class that have
been executed.
 The objective of statement coverage testing is to ensure that every statement in the
program is executed for at least one time.
 𝑆𝑡𝑎𝑡𝑒𝑚𝑒𝑛𝑡 𝑐𝑜𝑣𝑒𝑟𝑎𝑔𝑒 =
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑛𝑜𝑑𝑒𝑠 𝑐𝑜𝑣𝑒𝑟𝑒𝑑
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑛𝑜𝑑𝑒𝑠
∗100
6
BRANCH COVERAGE
TESTING
 A branch is the outcome of a decision, and branch coverage simply identifies the
decision outcomes that have been tested.
 Branch coverage takes in depth view of the source code that simple statement
coverage.
 Branch coverage aims to design test cases in such a way that each decision has a
true or false outcome at least once.
7
LOOP TESTING
 Loop testing is white box testing technique that focuses on loop constructed.
 There are following types of loops:
Simple loops
Nested loops
Concatenated loops
Unstructured loops
8
ADVANTAGES OF WHITE
BOX TESTING
 Helps in checking code standards and optimizing code.
 Extra code resulting in hidden defects can be removed.
 Reason of failure can be determined.
 Identifying test data is easy due to the knowledge of internal
implementation.
9
DISADVANTAGES OF
WHITE BOX TESTING
Testing should be highly skilled.
Cost of performing white box testing is high.
High complexity.
Impossible to look each piece of code to find the bug.
Exhaustive testing is not feasible.
10
THANK
YOU
11

More Related Content

What's hot

New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
Fincy V.J
 

What's hot (20)

Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow Testing
 
An Insight into the Black Box and White Box Software Testing
An Insight into the Black Box and White Box Software Testing An Insight into the Black Box and White Box Software Testing
An Insight into the Black Box and White Box Software Testing
 
WHITE BOX & BLACK BOX TESTING IN DATABASE
WHITE BOX & BLACK BOXTESTING IN DATABASEWHITE BOX & BLACK BOXTESTING IN DATABASE
WHITE BOX & BLACK BOX TESTING IN DATABASE
 
White box ppt
White box pptWhite box ppt
White box ppt
 
White box testing
White box testing White box testing
White box 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)
 
Unit 3 Control Flow Testing
Unit 3   Control Flow TestingUnit 3   Control Flow Testing
Unit 3 Control Flow Testing
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
Software coding & testing, software engineering
Software coding & testing, software engineeringSoftware coding & testing, software engineering
Software coding & testing, software engineering
 
Black & White Box testing
Black & White Box testingBlack & White Box testing
Black & White Box testing
 
Gray box testing
Gray box testingGray box testing
Gray box testing
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
Different techniques-of-software-testing
Different techniques-of-software-testingDifferent techniques-of-software-testing
Different techniques-of-software-testing
 
White box testing-200709
White box testing-200709White box testing-200709
White box testing-200709
 
Software Testing Techniques: An Overview
Software Testing Techniques: An Overview Software Testing Techniques: An Overview
Software Testing Techniques: An Overview
 
5 black box and grey box testing
5   black box and grey box testing5   black box and grey box testing
5 black box and grey box testing
 
Code coverage
Code coverageCode coverage
Code coverage
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
Unit testing
Unit testing Unit testing
Unit testing
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 

Similar to White box testing

blackboxandwhiteboxtesting in software testing.ppt
blackboxandwhiteboxtesting in software testing.pptblackboxandwhiteboxtesting in software testing.ppt
blackboxandwhiteboxtesting in software testing.ppt
suchita74
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
ersanbilik
 

Similar to White box testing (20)

UNIT testing
UNIT testingUNIT testing
UNIT testing
 
BLACK BOX & WHITE BOX TESTING.pptx
BLACK BOX & WHITE BOX TESTING.pptxBLACK BOX & WHITE BOX TESTING.pptx
BLACK BOX & WHITE BOX TESTING.pptx
 
Testing
TestingTesting
Testing
 
White-box testing.pptx
White-box testing.pptxWhite-box testing.pptx
White-box testing.pptx
 
Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)
 
blackboxandwhiteboxtesting in software testing.ppt
blackboxandwhiteboxtesting in software testing.pptblackboxandwhiteboxtesting in software testing.ppt
blackboxandwhiteboxtesting in software testing.ppt
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
 
Unit testing - what is its importance
Unit testing - what is its importanceUnit testing - what is its importance
Unit testing - what is its importance
 
Software testing methods
Software testing methodsSoftware testing methods
Software testing methods
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
 
Chapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.pptChapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.ppt
 
Black box and white box testing
Black box and white box testingBlack box and white box testing
Black box and white box testing
 
Software testing definition
Software testing definitionSoftware testing definition
Software testing definition
 
Software testing (2)
Software testing (2)Software testing (2)
Software testing (2)
 
S440999102
S440999102S440999102
S440999102
 
Chapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringChapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineering
 
WHITE BOX TESTING ashu.pptx
WHITE BOX TESTING ashu.pptxWHITE BOX TESTING ashu.pptx
WHITE BOX TESTING ashu.pptx
 
Unit testing
Unit testingUnit testing
Unit testing
 
Boundary and equivalnce systematic test design
Boundary and equivalnce   systematic test designBoundary and equivalnce   systematic test design
Boundary and equivalnce systematic test design
 
black-box testing is a type of software testing in which the tester is not co...
black-box testing is a type of software testing in which the tester is not co...black-box testing is a type of software testing in which the tester is not co...
black-box testing is a type of software testing in which the tester is not co...
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 

White box testing

  • 2. CONTENTS  What is white box testing?  White box testing techniques  Path testing  Statement coverage testing  Branch coverage testing  Loop testing  Advantages of white box testing  Disadvantages of white box testing 2
  • 3. WHAT IS WHITE BOX TESTING?  It is also know as:  Glass based testing.  Structural testing.  White box testing is performed based on the knowledge of how the system is implemented. It requires access to source code.  The objective of white box testing is to validate whether code implementation follows intended design in order to check implemented security functionality and uncover exploitable vulnerabilities. 3
  • 4. WHITE BOX TESTING TECHNIQUES Path testing Statement Coverage Testing Branch Coverage Testing Loop Testing 4
  • 5. PATH TESTING  The objective of path testing is to define a set of linear independent path, called basis set, that can be used to construct any path through program flow graph.  A path represents floe of execution from start of a method to its exit. 5
  • 6. STATEMENT COVERAGE TESTING  Statement coverage testing identifies the statements in the method or class that have been executed.  The objective of statement coverage testing is to ensure that every statement in the program is executed for at least one time.  𝑆𝑡𝑎𝑡𝑒𝑚𝑒𝑛𝑡 𝑐𝑜𝑣𝑒𝑟𝑎𝑔𝑒 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑛𝑜𝑑𝑒𝑠 𝑐𝑜𝑣𝑒𝑟𝑒𝑑 𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑛𝑜𝑑𝑒𝑠 ∗100 6
  • 7. BRANCH COVERAGE TESTING  A branch is the outcome of a decision, and branch coverage simply identifies the decision outcomes that have been tested.  Branch coverage takes in depth view of the source code that simple statement coverage.  Branch coverage aims to design test cases in such a way that each decision has a true or false outcome at least once. 7
  • 8. LOOP TESTING  Loop testing is white box testing technique that focuses on loop constructed.  There are following types of loops: Simple loops Nested loops Concatenated loops Unstructured loops 8
  • 9. ADVANTAGES OF WHITE BOX TESTING  Helps in checking code standards and optimizing code.  Extra code resulting in hidden defects can be removed.  Reason of failure can be determined.  Identifying test data is easy due to the knowledge of internal implementation. 9
  • 10. DISADVANTAGES OF WHITE BOX TESTING Testing should be highly skilled. Cost of performing white box testing is high. High complexity. Impossible to look each piece of code to find the bug. Exhaustive testing is not feasible. 10