SlideShare a Scribd company logo
White box testing
Objective What is White box testing Techniques of white box testing What is Grey Box testing
Testing the internal structure of the software Understand the code and the code will set you free!  White-box testing is testing that takes into account the internal mechanism of a system or component It’s also known as Structural testing, clear box testing and glass box testing What is it?
Techniques Statement coverage Loop testing Path testing Branch testing
Statement Coverage 100% method coverage: All methods in all classes are called. 100% statement coverage: All statements in a method are executed. void foo (int a, b, c, d, e) { if (a == 0) { return; } int x = 0; if ((a==b) OR ((c==d) AND bug(a) )) { x =1; } e = 1/x; }
Loop testing Test the ‘ for’  and ‘ while’  loops in the code. Look for exceptions of infinite loop. Cause execution of loop to be skipped. Loop to be executed exactly once. Loop to be executed more than once
Path testing Make sure all the paths are covered. Determine the paths Construct a logic flow chart
Path testing: Determine Paths FindMean (FILE ScoreFile) {  float SumOfScores = 0.0;  int NumberOfScores = 0;  float Mean=0.0; float Score; Read(ScoreFile, Score); while (! EOF(ScoreFile) { if (Score  > 0.0 ) { SumOfScores = SumOfScores + Score; NumberOfScores++; } Read(ScoreFile, Score); } /* Compute the mean and print the result */ if (NumberOfScores > 0) { Mean = SumOfScores / NumberOfScores; printf(“ The mean score is %f\n”, Mean); } else printf (“No scores found in file\n”); } 1 2 3 4 5 7 6 8 9
Path testing: Logic flow diagram
Branch testing Also known as Conditional Testing Make sure that each possible outcome from a condition is tested at least once. if (i=true)    printf (“I am true”) else   printf (“I am false”) Possible Testcases are  1. i=true; 2. i=false
Grey box testing What is it? Mixture of both black box and white box.  Test the system with a basic outlook of internals. When you do? Once the functionality is developed Example Database testing Using SQL
Grey box testing: SQL Some times testers may have to use SQL to help in the black box testing.  Types of Grey box using SQL Data Validation Data security Query for system updates
Grey box testing: My examples Testing I did! Test the inventory by using the inventory table Reservation retrieval  Data encryption: Credit Card number
Questions?

More Related Content

PPT
Whitebox
PPTX
White Box Testing
PPT
Whitebox testing
PPT
White box testing
PPSX
White Box testing by Pankaj Thakur, NITTTR Chandigarh
PPT
White box testing-200709
PPTX
Structural testing
ODP
White box ppt
Whitebox
White Box Testing
Whitebox testing
White box testing
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White box testing-200709
Structural testing
White box ppt

What's hot (20)

PPT
White box testing
PPTX
Black box testing or behavioral testing
PPTX
Introduction to White box testing
PPTX
Black box software testing
PPTX
PPTX
5 black box and grey box testing
PPT
Software Quality Testing
PPTX
Structure testing
PPT
Black box & white-box testing technique
PPS
Boundary and equivalnce systematic test design
PPT
Black box testing
PPT
New software testing-techniques
PPTX
10 software testing_technique
PPTX
White box & Black box testing
PPT
Testing, black ,white and gray box testing
PPT
Testing Fundamentals
PPTX
Control Flow Testing
PPT
White boxvsblackbox
DOC
Black box testing
PDF
Black Box Testing
White box testing
Black box testing or behavioral testing
Introduction to White box testing
Black box software testing
5 black box and grey box testing
Software Quality Testing
Structure testing
Black box & white-box testing technique
Boundary and equivalnce systematic test design
Black box testing
New software testing-techniques
10 software testing_technique
White box & Black box testing
Testing, black ,white and gray box testing
Testing Fundamentals
Control Flow Testing
White boxvsblackbox
Black box testing
Black Box Testing
Ad

Viewers also liked (19)

PDF
White Box Testing
PPT
Black Box Testing
PPTX
Black Box
PPS
Testing techniques
PPTX
Black box
PPT
Software Testing Techniques
PPT
Types of Software Testing
PPT
Manual testing - Introduction to Manual Software testing
PPTX
White Box Testing
PPT
12 white box testing-fixed
PPTX
Teachmeet #niedcamp
PPTX
Black Box Thinking
PPTX
The Aggregation of Marginal Gains in Software Engineering
PDF
Dave Brailsford Model of Marginal Gains
PPTX
Marginal Gains - Rocksolid Tour 2013
PPTX
Flight data recorder
PPTX
PPT
Travis jf flip flops
PPT
FDR and CVR of Aircrafts
White Box Testing
Black Box Testing
Black Box
Testing techniques
Black box
Software Testing Techniques
Types of Software Testing
Manual testing - Introduction to Manual Software testing
White Box Testing
12 white box testing-fixed
Teachmeet #niedcamp
Black Box Thinking
The Aggregation of Marginal Gains in Software Engineering
Dave Brailsford Model of Marginal Gains
Marginal Gains - Rocksolid Tour 2013
Flight data recorder
Travis jf flip flops
FDR and CVR of Aircrafts
Ad

Similar to White Box Testing V0.2 (20)

PPTX
white-box-testing.pptx
PPTX
Java Unit Testing
PDF
Unit testing - A&BP CC
PPT
ch11a23424234242342342342423244lect1.ppt
PPT
ch11lect1.ppt
PPT
ch11lect1.pptghjgjhjkkljkkkjkjkjljkjhytytgh
PPT
ch11lect1.ppt
PPT
testing(2).pptjjsieieo2i33kejjskskosowwiwk
PPT
Software testing definition
PPT
ppt_onsoftware_Engineering_chapter11.ppt
PPTX
Loops in c
PDF
DSR Testing (Part 1)
PPT
Introduzione al TDD
PPTX
chumma gorgeous testing touch documentary
PPTX
Week 6 Control Structure -Iterations .pptx
PDF
Factories, mocks and spies: a tester's little helpers
PPSX
Bsit1
PPTX
02 - Prepcode
PPTX
Testing in Python: doctest and unittest
PPT
TESTING_METHODOSoftware Testing is a type of investigation to find out if the...
white-box-testing.pptx
Java Unit Testing
Unit testing - A&BP CC
ch11a23424234242342342342423244lect1.ppt
ch11lect1.ppt
ch11lect1.pptghjgjhjkkljkkkjkjkjljkjhytytgh
ch11lect1.ppt
testing(2).pptjjsieieo2i33kejjskskosowwiwk
Software testing definition
ppt_onsoftware_Engineering_chapter11.ppt
Loops in c
DSR Testing (Part 1)
Introduzione al TDD
chumma gorgeous testing touch documentary
Week 6 Control Structure -Iterations .pptx
Factories, mocks and spies: a tester's little helpers
Bsit1
02 - Prepcode
Testing in Python: doctest and unittest
TESTING_METHODOSoftware Testing is a type of investigation to find out if the...

More from Nivetha Padmanaban (8)

PPT
Sahi Conference
PPT
Agile Testing Vs V
PPT
Test Planning
PPT
Introduction
PPT
Introducing Agile
PPT
Automation With A Tool Demo
PPT
Agile Testing Vs V
PPT
Keyword Driven Framework using WATIR
Sahi Conference
Agile Testing Vs V
Test Planning
Introduction
Introducing Agile
Automation With A Tool Demo
Agile Testing Vs V
Keyword Driven Framework using WATIR

Recently uploaded (20)

PPTX
Introduction to Managemeng Chapter 1..pptx
PPTX
4.5.1 Financial Governance_Appropriation & Finance.pptx
PDF
Bladex Earnings Call Presentation 2Q2025
PDF
ADVANCE TAX Reduction using traditional insurance
PDF
ABriefOverviewComparisonUCP600_ISP8_URDG_758.pdf
PDF
Understanding University Research Expenditures (1)_compressed.pdf
PDF
discourse-2025-02-building-a-trillion-dollar-dream.pdf
PPTX
Session 3. Time Value of Money.pptx_finance
PDF
caregiving tools.pdf...........................
PDF
ECONOMICS AND ENTREPRENEURS LESSONSS AND
PDF
Mathematical Economics 23lec03slides.pdf
PDF
NAPF_RESPONSE_TO_THE_PENSIONS_COMMISSION_8 _2_.pdf
PPTX
Globalization-of-Religion. Contemporary World
PPTX
Session 11-13. Working Capital Management and Cash Budget.pptx
PPTX
What is next for the Fractional CFO - August 2025
PDF
way to join Real illuminati agent 0782561496,0756664682
PDF
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
PDF
Spending, Allocation Choices, and Aging THROUGH Retirement. Are all of these ...
PDF
Is Retirement Income a Three Dimensional (3-D) problem_ What is the differenc...
PPTX
The discussion on the Economic in transportation .pptx
Introduction to Managemeng Chapter 1..pptx
4.5.1 Financial Governance_Appropriation & Finance.pptx
Bladex Earnings Call Presentation 2Q2025
ADVANCE TAX Reduction using traditional insurance
ABriefOverviewComparisonUCP600_ISP8_URDG_758.pdf
Understanding University Research Expenditures (1)_compressed.pdf
discourse-2025-02-building-a-trillion-dollar-dream.pdf
Session 3. Time Value of Money.pptx_finance
caregiving tools.pdf...........................
ECONOMICS AND ENTREPRENEURS LESSONSS AND
Mathematical Economics 23lec03slides.pdf
NAPF_RESPONSE_TO_THE_PENSIONS_COMMISSION_8 _2_.pdf
Globalization-of-Religion. Contemporary World
Session 11-13. Working Capital Management and Cash Budget.pptx
What is next for the Fractional CFO - August 2025
way to join Real illuminati agent 0782561496,0756664682
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
Spending, Allocation Choices, and Aging THROUGH Retirement. Are all of these ...
Is Retirement Income a Three Dimensional (3-D) problem_ What is the differenc...
The discussion on the Economic in transportation .pptx

White Box Testing V0.2

  • 2. Objective What is White box testing Techniques of white box testing What is Grey Box testing
  • 3. Testing the internal structure of the software Understand the code and the code will set you free! White-box testing is testing that takes into account the internal mechanism of a system or component It’s also known as Structural testing, clear box testing and glass box testing What is it?
  • 4. Techniques Statement coverage Loop testing Path testing Branch testing
  • 5. Statement Coverage 100% method coverage: All methods in all classes are called. 100% statement coverage: All statements in a method are executed. void foo (int a, b, c, d, e) { if (a == 0) { return; } int x = 0; if ((a==b) OR ((c==d) AND bug(a) )) { x =1; } e = 1/x; }
  • 6. Loop testing Test the ‘ for’ and ‘ while’ loops in the code. Look for exceptions of infinite loop. Cause execution of loop to be skipped. Loop to be executed exactly once. Loop to be executed more than once
  • 7. Path testing Make sure all the paths are covered. Determine the paths Construct a logic flow chart
  • 8. Path testing: Determine Paths FindMean (FILE ScoreFile) { float SumOfScores = 0.0; int NumberOfScores = 0; float Mean=0.0; float Score; Read(ScoreFile, Score); while (! EOF(ScoreFile) { if (Score > 0.0 ) { SumOfScores = SumOfScores + Score; NumberOfScores++; } Read(ScoreFile, Score); } /* Compute the mean and print the result */ if (NumberOfScores > 0) { Mean = SumOfScores / NumberOfScores; printf(“ The mean score is %f\n”, Mean); } else printf (“No scores found in file\n”); } 1 2 3 4 5 7 6 8 9
  • 9. Path testing: Logic flow diagram
  • 10. Branch testing Also known as Conditional Testing Make sure that each possible outcome from a condition is tested at least once. if (i=true) printf (“I am true”) else printf (“I am false”) Possible Testcases are 1. i=true; 2. i=false
  • 11. Grey box testing What is it? Mixture of both black box and white box. Test the system with a basic outlook of internals. When you do? Once the functionality is developed Example Database testing Using SQL
  • 12. Grey box testing: SQL Some times testers may have to use SQL to help in the black box testing. Types of Grey box using SQL Data Validation Data security Query for system updates
  • 13. Grey box testing: My examples Testing I did! Test the inventory by using the inventory table Reservation retrieval Data encryption: Credit Card number