SlideShare a Scribd company logo
1 of 29
White Box vs. Black Box Testing  Tor Stålhane
What is White Box testing  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Coverage report. Example – 1
Coverage report. Example – 2                                                                                                                               
McCabe’s cyclomatic complexity ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Graph example  We have eight nodes – N = 8 –  nine edges – E = 9 – and we have only one component – P = 1. Thus, we have  v(G) = 9 – 8 + 2 = 3.
Simple case - 1 S1; IF P1 THEN S2 ELSE S3 S4; One predicate – P1. v(G) = 2 Two test cases will cover all code S4 S3 S2 S1 P1
Simple case – 2  S1; IF P1 THEN X := a/c ELSE S3; S4; One predicate – P1. v(G) = 2 Two test cases will cover all paths but not all cases. What about the case c = 0? S4 S3 S1 a/c P1
Using v(G) ,[object Object],[object Object],[object Object],[object Object]
Problem – the loop S4 S2 S1 P1 S5 S3 P2 S1; DO IF P1 THEN S2 ELSE S3; S4 OD UNTIL P2 S5; No DAG. v(G) = 3 and Max  is 4 but there is an “infinite”  number of paths.
Nested decisions  S1; IF P1 THEN S2 ELSE S3; IF P2 THEN S4 ELSE S5 FI S6;  v(G) = 3, while Max = 4.  Three test case will cover all paths. P1 P2 S5 S4 S6 S3 S2 S1
Using a decision table – 1 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Using a decision table – 2  1 1 1 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 Test description or reference  P3 P2 P1
Using a decision table – 3 ,[object Object],[object Object],[object Object],[object Object]
Decision table example The last test is not necessary  P1 P2 S5 S4 S6 S3 S2 S1 S1, S2. S6 1 1 S1, S2. S6 0 1 S1, S3, S4, S6 1 0 S1, S3, S5, S6 0 0 Test description or reference  P2 P1
What about loops ,[object Object],[object Object],[object Object],[object Object],[object Object]
Error messages ,[object Object],[object Object],[object Object],[object Object]
What is Black Box testing ,[object Object],[object Object],[object Object],[object Object],[object Object]
Info for Black Box testing ,[object Object],[object Object],[object Object],[object Object]
Clues from the algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object]
Black Box vs. White Box testing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Testing real time systems ,[object Object],[object Object],[object Object]
Basic scenario pattern - BSP Check for  precondition   Check  post-condition   PreCondition == true / {Set activation time } IsTimeout == true / [report fail] PostCondition == true / [report success]
BSP – example  ,[object Object],[object Object],[object Object],[object Object]
Key-event service pattern - KSP Check for key  event Check  post-condition  Check  precondition  PreCondition == true PostCondition == true / [report success] KeyEventOccurred / [SetActivationTime] IsTimeout == true / [report fail]
KSP- example  ,[object Object],[object Object],[object Object],[object Object],[object Object]
Timed key-event service pattern - TKSP Check for key  event Check  post-condition  Check  precondition  PreCondition == true IsTimeout == true / [report fail] PostCondition == true / [report success] KeyEventOccurred / [SetActivationTime] DurationExpired / [report not exercised]
TKSP – example (1)  ,[object Object],[object Object]
TKSP – example (2) ,[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

White box testing-200709
White box testing-200709White box testing-200709
White box testing-200709pragati3009
 
White Box Testing
White Box TestingWhite Box Testing
White Box TestingAlisha Roy
 
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 BugRaptors
 
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
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box TestingTestbytes
 
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 testingYisal Khan
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Whitebox testing
Whitebox testingWhitebox testing
Whitebox testingOana Feidi
 
Software Testing Foundations Part 4 - Black Box Testing
Software Testing Foundations Part 4 - Black Box TestingSoftware Testing Foundations Part 4 - Black Box Testing
Software Testing Foundations Part 4 - Black Box TestingNikita Knysh
 
Testing, black ,white and gray box testing
Testing, black ,white and gray box testingTesting, black ,white and gray box testing
Testing, black ,white and gray box testingAamir Shakir
 
Structural testing
Structural testingStructural testing
Structural testingSlideshare
 
Black box testing
Black box testingBlack box testing
Black box testingAbdul Basit
 

What's hot (20)

10 software testing_technique
10 software testing_technique10 software testing_technique
10 software testing_technique
 
Black-Box
Black-BoxBlack-Box
Black-Box
 
White box testing-200709
White box testing-200709White box testing-200709
White box testing-200709
 
White box ppt
White box pptWhite box ppt
White box ppt
 
White Box Testing
White Box TestingWhite Box Testing
White Box 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
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
White box testing
White box testingWhite box testing
White box testing
 
Lesson 2....PPT 1
Lesson 2....PPT 1Lesson 2....PPT 1
Lesson 2....PPT 1
 
Introduction to White box testing
Introduction to White box testingIntroduction to White box testing
Introduction to 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)
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
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
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
 
Whitebox testing
Whitebox testingWhitebox testing
Whitebox testing
 
Software Testing Foundations Part 4 - Black Box Testing
Software Testing Foundations Part 4 - Black Box TestingSoftware Testing Foundations Part 4 - Black Box Testing
Software Testing Foundations Part 4 - Black Box Testing
 
Testing, black ,white and gray box testing
Testing, black ,white and gray box testingTesting, black ,white and gray box testing
Testing, black ,white and gray box testing
 
Structural testing
Structural testingStructural testing
Structural testing
 
Black box testing
Black box testingBlack box testing
Black box testing
 
White Box Testing V0.2
White Box Testing V0.2White Box Testing V0.2
White Box Testing V0.2
 

Similar to White boxvsblackbox

Black Box Testing.pdf
Black Box Testing.pdfBlack Box Testing.pdf
Black Box Testing.pdfSupunLakshan4
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality AssuranceKiran Kumar
 
01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptxssuser586772
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptracha49
 
Introduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptIntroduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptBhargaviDalal4
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.pptHirenderPal
 
Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Mr. Jhon
 
Seii unit6 software-testing-techniques
Seii unit6 software-testing-techniquesSeii unit6 software-testing-techniques
Seii unit6 software-testing-techniquesAhmad sohail Kakar
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality TestingKiran Kumar
 

Similar to White boxvsblackbox (20)

Black Box Testing.pdf
Black Box Testing.pdfBlack Box Testing.pdf
Black Box Testing.pdf
 
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
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality Assurance
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
Testing
TestingTesting
Testing
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
 
DATA STRUCTURE.pdf
DATA STRUCTURE.pdfDATA STRUCTURE.pdf
DATA STRUCTURE.pdf
 
DATA STRUCTURE
DATA STRUCTUREDATA STRUCTURE
DATA STRUCTURE
 
CH05.pdf
CH05.pdfCH05.pdf
CH05.pdf
 
01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
Introduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptIntroduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.ppt
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
 
Code Tuning
Code TuningCode Tuning
Code Tuning
 
Whitebox
WhiteboxWhitebox
Whitebox
 
Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01
 
Seii unit6 software-testing-techniques
Seii unit6 software-testing-techniquesSeii unit6 software-testing-techniques
Seii unit6 software-testing-techniques
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality Testing
 

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.pdfQucHHunhnh
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
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.pptxheathfieldcps1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
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 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

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
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

White boxvsblackbox

  • 1. White Box vs. Black Box Testing Tor Stålhane
  • 2.
  • 4. Coverage report. Example – 2                                                                                                                            
  • 5.
  • 6. Graph example We have eight nodes – N = 8 – nine edges – E = 9 – and we have only one component – P = 1. Thus, we have v(G) = 9 – 8 + 2 = 3.
  • 7. Simple case - 1 S1; IF P1 THEN S2 ELSE S3 S4; One predicate – P1. v(G) = 2 Two test cases will cover all code S4 S3 S2 S1 P1
  • 8. Simple case – 2 S1; IF P1 THEN X := a/c ELSE S3; S4; One predicate – P1. v(G) = 2 Two test cases will cover all paths but not all cases. What about the case c = 0? S4 S3 S1 a/c P1
  • 9.
  • 10. Problem – the loop S4 S2 S1 P1 S5 S3 P2 S1; DO IF P1 THEN S2 ELSE S3; S4 OD UNTIL P2 S5; No DAG. v(G) = 3 and Max is 4 but there is an “infinite” number of paths.
  • 11. Nested decisions S1; IF P1 THEN S2 ELSE S3; IF P2 THEN S4 ELSE S5 FI S6; v(G) = 3, while Max = 4. Three test case will cover all paths. P1 P2 S5 S4 S6 S3 S2 S1
  • 12.
  • 13. Using a decision table – 2 1 1 1 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 Test description or reference P3 P2 P1
  • 14.
  • 15. Decision table example The last test is not necessary P1 P2 S5 S4 S6 S3 S2 S1 S1, S2. S6 1 1 S1, S2. S6 0 1 S1, S3, S4, S6 1 0 S1, S3, S5, S6 0 0 Test description or reference P2 P1
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Basic scenario pattern - BSP Check for precondition Check post-condition PreCondition == true / {Set activation time } IsTimeout == true / [report fail] PostCondition == true / [report success]
  • 24.
  • 25. Key-event service pattern - KSP Check for key event Check post-condition Check precondition PreCondition == true PostCondition == true / [report success] KeyEventOccurred / [SetActivationTime] IsTimeout == true / [report fail]
  • 26.
  • 27. Timed key-event service pattern - TKSP Check for key event Check post-condition Check precondition PreCondition == true IsTimeout == true / [report fail] PostCondition == true / [report success] KeyEventOccurred / [SetActivationTime] DurationExpired / [report not exercised]
  • 28.
  • 29.