SlideShare a Scribd company logo
1 of 16
Chapter 7
Testing
Contents
• Dynamic White Box Testing
• Testing vs. Debugging
• Unit Testing and Integration Testing
• Coverage
04-Oct-14 Md. Masudur Rahman 2
Dynamic White-Box Testing
3
• What the code does and how it works to determine what to test,
what not to test, and how to approach the testing.
• Dynamic white-box testing isn’t limited just to seeing what the
code does. It also can involve directly testing and controlling
the software.
• The two techniques (Debugging & Testing) may appear similar
because they both involve dealing with software bugs and
looking at the code, but they’re very different in their goals.
• The goal of dynamic white-box testing is to find bugs. The goal
of debugging is to fix them.
• They do overlap, however, in the area of isolating where and
why the bug occurs.
04-Oct-14 Md. Masudur Rahman
Testing vs Debugging
4
FIGURE 7.2
Dynamic white-box testing and debugging have
different goals but they do overlap in the middle.
04-Oct-14 Md. Masudur Rahman
Tester vs Programmer’s work
• It’s important to have a clear separation between tester’s
work and the programmer’s work.
• Programmers write the code, testers find the bugs and
may need to write some code to drive their tests, and
programmers fix the bugs.
• Without this separation, issues can arise where tasks are
overlooked or work is duplicated.
504-Oct-14 Md. Masudur Rahman
Testing Types(Unit and Integration Testing)
• Testing that occurs at the lowest level is called unit testing or
module testing.
• As the units are tested and the low-level bugs are found and
fixed, they are integrated and integration testing is performed
against groups of modules.
• This process of incremental testing continues, putting together
more and more pieces of the software until the entire product—
or at least a major portion of it—is tested at once in a process
called system testing.
• There are two approaches to this incremental testing: bottom-up
and top-down.
604-Oct-14 Md. Masudur Rahman
Unit and Integration Testing
704-Oct-14 Md. Masudur Rahman
Data Coverage
• Data includes all the variables, constants, arrays, data structures,
keyboard and mouse input, files and screen input and output, and I/O
to other devices such as modems, networks, and so on.
• Data Flow
• Data flow coverage involves tracking a piece of data completely
through the software. At the unit test level this would just be through
an individual module or function. The same tracking
• could be done through several integrated modules or even through the
entire software product— although it would be more time-consuming
to do so.
• *** With black-box testing, you only know what the value of the
variable is at the beginning and at the end. With dynamic white-box
testing you could also check intermediate values during program
execution.
804-Oct-14 Md. Masudur Rahman
Code Coverage
9
you must test the program’s states and the program’s flow among
them. You must attempt to enter and exit every module, execute
every line of code, and follow every logic and decision path
through the software. Examining the software at this level of
detail is called code-coverage analysis.
Code-coverage analysis is a dynamic white-box testing technique
because it requires you to have full access to the code to view
what parts of the software you pass through when you run
your test cases.
The simplest form of code-coverage analysis is using your
compiler’s debugger to view the lines of code you visit as you
single-step through the program.
04-Oct-14 Md. Masudur Rahman
Line Coverage
The most straightforward form of code coverage is called
statement coverage or line coverage.
If you’re monitoring statement coverage while you test your
software, your goal is to make
sure that you execute every statement in the program at least
once.
• It can tell you if every statement is executed, but it can’t
tell you if you’ve taken all the paths through the software.
1004-Oct-14 Md. Masudur Rahman
Branch Coverage
• Attempting to cover all the paths in the software is called
path testing. The simplest form of path testing is called
branch coverage testing.
1104-Oct-14 Md. Masudur Rahman
Example 1/2
Statement Coverage:
1. PRINT “Hello World”
2. PRING “The date is: “; Date$
3. PRINT “The time is: “; Time$
4. END
• 100 percent statement coverage would be the
execution of lines 1 through 4.
1204-Oct-14 Md. Masudur Rahman
Example 2/2
Branch Coverage
1. PRINT “Hello World”
2. IF Date$ = “01-01-2000” THEN
3. PRINT “Happy New Year”
4. END IF
5. PRING “The date is: “; Date$
6. PRINT “The time is: “; Time$
7. END
• Test case with the date$ = january 1, 2000. The program would then execute
the path: lines 1, 2, 3, 4, 5, 6, 7.
• 100 percent statement coverage but not branch coverage!!!
• Test case with the date$ variable set to other than january 1, 2000. The
program would then execute this path: lines 1,2, 5, 6, 7.
• Most code coverage analyzers will account for code branches and report both
statement coverage and branch coverage results separately, giving you a
much better idea of your test’s effectiveness.
1304-Oct-14 Md. Masudur Rahman
Condition Coverage
*** The Multiple Conditions in the IF Statement Create More Paths Through the
Code
1. PRINT “Hello World”
2. IF Date$ = “01-01-2000” AND Time$ = “00:00:00” THEN
3. PRINT “Happy New Year”
4. END IF
5. PRINT “The date is: “; Date$
6. PRINT “The time is: “; Time$
7. END
*** Test Cases to Achieve Full Coverage of the Multiple IF Statement Condition
• Date$ Time$ Line # Execution
• 01-01-0000 11:11:11 1,2,5,6,7
• 01-01-0000 00:00:00 1,2,5,6,7
• 01-01-2000 11:11:11 1,2,5,6,7
• 01-01-2000 00:00:00 1,2,3,4,5,6,7
If you test for all the possible conditions, you will achieve branch coverage and therefore
achieve statement coverage.
1404-Oct-14 Md. Masudur Rahman
Reference
Book: Software Testing – Ron Patton
Chapter 7
1504-Oct-14 Md. Masudur Rahman
Thank You
1604-Oct-14 Md. Masudur Rahman

More Related Content

What's hot

Ch15 software reliability
Ch15 software reliabilityCh15 software reliability
Ch15 software reliabilityAbraham Paul
 
Chapter 7 software reliability
Chapter 7 software reliabilityChapter 7 software reliability
Chapter 7 software reliabilitydespicable me
 
Concept of Failure, error, fault and defect
Concept of Failure, error, fault and defectConcept of Failure, error, fault and defect
Concept of Failure, error, fault and defectchaklee191
 
Manual testing interview questions and answers
Manual testing interview questions and answersManual testing interview questions and answers
Manual testing interview questions and answersRajnish Sharma
 
Software reliability growth model
Software reliability growth modelSoftware reliability growth model
Software reliability growth modelHimanshu
 
Chapter 5 - Automating the Test Execution
Chapter 5 - Automating the Test ExecutionChapter 5 - Automating the Test Execution
Chapter 5 - Automating the Test ExecutionNeeraj Kumar Singh
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and typesConfiz
 
Fundamentals of testing (1)
Fundamentals of testing (1)Fundamentals of testing (1)
Fundamentals of testing (1)Aziz Chikhly
 
Fundamentals of Testing
Fundamentals of TestingFundamentals of Testing
Fundamentals of TestingCode95
 
Software reliability & quality
Software reliability & qualitySoftware reliability & quality
Software reliability & qualityNur Islam
 
Software Testing - Software Quality (Part 2)
Software Testing - Software Quality (Part 2)Software Testing - Software Quality (Part 2)
Software Testing - Software Quality (Part 2)Ajeng Savitri
 
Successive Software Reliability Growth Model: A Modular Approach
Successive Software Reliability Growth Model: A Modular ApproachSuccessive Software Reliability Growth Model: A Modular Approach
Successive Software Reliability Growth Model: A Modular Approachajeetmnnit
 
Software Reliability Testing Training Crash Course - Tonex Training
Software Reliability Testing Training Crash Course - Tonex TrainingSoftware Reliability Testing Training Crash Course - Tonex Training
Software Reliability Testing Training Crash Course - Tonex TrainingBryan Len
 
Comparing Software Quality Assurance Techniques And Activities
Comparing Software Quality Assurance Techniques And ActivitiesComparing Software Quality Assurance Techniques And Activities
Comparing Software Quality Assurance Techniques And ActivitiesLemia Algmri
 
Interview questions for manual testing technology.
Interview questions for manual testing technology.Interview questions for manual testing technology.
Interview questions for manual testing technology.Vinay Agnihotri
 
Role+Of+Testing+In+Sdlc
Role+Of+Testing+In+SdlcRole+Of+Testing+In+Sdlc
Role+Of+Testing+In+Sdlcmahendra singh
 

What's hot (20)

Ch15 software reliability
Ch15 software reliabilityCh15 software reliability
Ch15 software reliability
 
Quality & Reliability in Software Engineering
Quality & Reliability in Software EngineeringQuality & Reliability in Software Engineering
Quality & Reliability in Software Engineering
 
Software Reliability
Software ReliabilitySoftware Reliability
Software Reliability
 
Chapter 7 software reliability
Chapter 7 software reliabilityChapter 7 software reliability
Chapter 7 software reliability
 
Concept of Failure, error, fault and defect
Concept of Failure, error, fault and defectConcept of Failure, error, fault and defect
Concept of Failure, error, fault and defect
 
Manual testing interview questions and answers
Manual testing interview questions and answersManual testing interview questions and answers
Manual testing interview questions and answers
 
Software reliability growth model
Software reliability growth modelSoftware reliability growth model
Software reliability growth model
 
Chapter 5 - Automating the Test Execution
Chapter 5 - Automating the Test ExecutionChapter 5 - Automating the Test Execution
Chapter 5 - Automating the Test Execution
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
 
Fundamentals of testing (1)
Fundamentals of testing (1)Fundamentals of testing (1)
Fundamentals of testing (1)
 
Fundamentals of Testing
Fundamentals of TestingFundamentals of Testing
Fundamentals of Testing
 
Software reliability & quality
Software reliability & qualitySoftware reliability & quality
Software reliability & quality
 
Software Testing - Software Quality (Part 2)
Software Testing - Software Quality (Part 2)Software Testing - Software Quality (Part 2)
Software Testing - Software Quality (Part 2)
 
Neeraj_Kumar
Neeraj_KumarNeeraj_Kumar
Neeraj_Kumar
 
Successive Software Reliability Growth Model: A Modular Approach
Successive Software Reliability Growth Model: A Modular ApproachSuccessive Software Reliability Growth Model: A Modular Approach
Successive Software Reliability Growth Model: A Modular Approach
 
Pmt 05
Pmt 05Pmt 05
Pmt 05
 
Software Reliability Testing Training Crash Course - Tonex Training
Software Reliability Testing Training Crash Course - Tonex TrainingSoftware Reliability Testing Training Crash Course - Tonex Training
Software Reliability Testing Training Crash Course - Tonex Training
 
Comparing Software Quality Assurance Techniques And Activities
Comparing Software Quality Assurance Techniques And ActivitiesComparing Software Quality Assurance Techniques And Activities
Comparing Software Quality Assurance Techniques And Activities
 
Interview questions for manual testing technology.
Interview questions for manual testing technology.Interview questions for manual testing technology.
Interview questions for manual testing technology.
 
Role+Of+Testing+In+Sdlc
Role+Of+Testing+In+SdlcRole+Of+Testing+In+Sdlc
Role+Of+Testing+In+Sdlc
 

Viewers also liked

Cost of software quality ( software quality assurance )
Cost of software quality ( software quality assurance )Cost of software quality ( software quality assurance )
Cost of software quality ( software quality assurance )Kiran Hanjar
 
Application Of Software Design Pattern
Application Of Software Design PatternApplication Of Software Design Pattern
Application Of Software Design Patternguest46da5428
 
SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS
SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNSSOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS
SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNSshubbhi
 
Design Pattern Explained CH1
Design Pattern Explained CH1Design Pattern Explained CH1
Design Pattern Explained CH1Jamie (Taka) Wang
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurancelakshmi1693
 
Software quality assurance lecture 1
Software quality assurance lecture 1Software quality assurance lecture 1
Software quality assurance lecture 1Abdul Basit
 
Introduction To Software Quality Assurance
Introduction To Software Quality AssuranceIntroduction To Software Quality Assurance
Introduction To Software Quality Assuranceruth_reategui
 

Viewers also liked (7)

Cost of software quality ( software quality assurance )
Cost of software quality ( software quality assurance )Cost of software quality ( software quality assurance )
Cost of software quality ( software quality assurance )
 
Application Of Software Design Pattern
Application Of Software Design PatternApplication Of Software Design Pattern
Application Of Software Design Pattern
 
SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS
SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNSSOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS
SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS
 
Design Pattern Explained CH1
Design Pattern Explained CH1Design Pattern Explained CH1
Design Pattern Explained CH1
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Software quality assurance lecture 1
Software quality assurance lecture 1Software quality assurance lecture 1
Software quality assurance lecture 1
 
Introduction To Software Quality Assurance
Introduction To Software Quality AssuranceIntroduction To Software Quality Assurance
Introduction To Software Quality Assurance
 

Similar to Software Testing

White-box testing.pptx
White-box testing.pptxWhite-box testing.pptx
White-box testing.pptxhalaalz3by
 
Software testing & its technology
Software testing & its technologySoftware testing & its technology
Software testing & its technologyHasam Panezai
 
testing.pdf
testing.pdftesting.pdf
testing.pdfkumari36
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptxmianshafa
 
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 engineeringAnasHassan52
 
Testing chapter updated (1)
Testing chapter updated (1)Testing chapter updated (1)
Testing chapter updated (1)abdullah619
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4 Mohammad Faizan
 
Testing Software Solutions
Testing Software SolutionsTesting Software Solutions
Testing Software Solutionsgavhays
 
Software testing part
Software testing partSoftware testing part
Software testing partPreeti Mishra
 
Unit & integration testing
Unit & integration testingUnit & integration testing
Unit & integration testingPavlo Hodysh
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxssrpr
 
Ch 2 Apraoaches Of Software Testing
Ch 2 Apraoaches Of Software Testing Ch 2 Apraoaches Of Software Testing
Ch 2 Apraoaches Of Software Testing Prof .Pragati Khade
 

Similar to Software Testing (20)

White-box testing.pptx
White-box testing.pptxWhite-box testing.pptx
White-box testing.pptx
 
Software testing & its technology
Software testing & its technologySoftware testing & its technology
Software testing & its technology
 
testing.pdf
testing.pdftesting.pdf
testing.pdf
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptx
 
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
 
Chapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.pptChapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.ppt
 
Testing chapter updated (1)
Testing chapter updated (1)Testing chapter updated (1)
Testing chapter updated (1)
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Software unit4
Software unit4Software unit4
Software unit4
 
Testing Software Solutions
Testing Software SolutionsTesting Software Solutions
Testing Software Solutions
 
Software testing part
Software testing partSoftware testing part
Software testing part
 
Software Testing
 Software Testing  Software Testing
Software Testing
 
Performance testing
Performance testingPerformance testing
Performance testing
 
Testing
Testing Testing
Testing
 
Unit & integration testing
Unit & integration testingUnit & integration testing
Unit & integration testing
 
software testing
software testingsoftware testing
software testing
 
Test plan
Test planTest plan
Test plan
 
6. oose testing
6. oose testing6. oose testing
6. oose testing
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptx
 
Ch 2 Apraoaches Of Software Testing
Ch 2 Apraoaches Of Software Testing Ch 2 Apraoaches Of Software Testing
Ch 2 Apraoaches Of Software Testing
 

More from University of Dhaka

More from University of Dhaka (7)

CV of Md Masudur Rahman
CV of Md Masudur RahmanCV of Md Masudur Rahman
CV of Md Masudur Rahman
 
Smashing the stack for fun and profit
Smashing the stack for fun and profitSmashing the stack for fun and profit
Smashing the stack for fun and profit
 
CV of Md. Masudur Rahman
CV of Md. Masudur RahmanCV of Md. Masudur Rahman
CV of Md. Masudur Rahman
 
CV of Md. Masudur Rahman
CV of Md. Masudur RahmanCV of Md. Masudur Rahman
CV of Md. Masudur Rahman
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Software Quality Assurance and Testing: QA in Context
Software Quality Assurance and Testing: QA in ContextSoftware Quality Assurance and Testing: QA in Context
Software Quality Assurance and Testing: QA in Context
 
Rokomari.com: An E-commerce Site
Rokomari.com: An E-commerce SiteRokomari.com: An E-commerce Site
Rokomari.com: An E-commerce Site
 

Recently uploaded

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
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 . pdfQucHHunhnh
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
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 GraphThiyagu K
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
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
 

Recently uploaded (20)

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
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"
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
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
 

Software Testing

  • 2. Testing Contents • Dynamic White Box Testing • Testing vs. Debugging • Unit Testing and Integration Testing • Coverage 04-Oct-14 Md. Masudur Rahman 2
  • 3. Dynamic White-Box Testing 3 • What the code does and how it works to determine what to test, what not to test, and how to approach the testing. • Dynamic white-box testing isn’t limited just to seeing what the code does. It also can involve directly testing and controlling the software. • The two techniques (Debugging & Testing) may appear similar because they both involve dealing with software bugs and looking at the code, but they’re very different in their goals. • The goal of dynamic white-box testing is to find bugs. The goal of debugging is to fix them. • They do overlap, however, in the area of isolating where and why the bug occurs. 04-Oct-14 Md. Masudur Rahman
  • 4. Testing vs Debugging 4 FIGURE 7.2 Dynamic white-box testing and debugging have different goals but they do overlap in the middle. 04-Oct-14 Md. Masudur Rahman
  • 5. Tester vs Programmer’s work • It’s important to have a clear separation between tester’s work and the programmer’s work. • Programmers write the code, testers find the bugs and may need to write some code to drive their tests, and programmers fix the bugs. • Without this separation, issues can arise where tasks are overlooked or work is duplicated. 504-Oct-14 Md. Masudur Rahman
  • 6. Testing Types(Unit and Integration Testing) • Testing that occurs at the lowest level is called unit testing or module testing. • As the units are tested and the low-level bugs are found and fixed, they are integrated and integration testing is performed against groups of modules. • This process of incremental testing continues, putting together more and more pieces of the software until the entire product— or at least a major portion of it—is tested at once in a process called system testing. • There are two approaches to this incremental testing: bottom-up and top-down. 604-Oct-14 Md. Masudur Rahman
  • 7. Unit and Integration Testing 704-Oct-14 Md. Masudur Rahman
  • 8. Data Coverage • Data includes all the variables, constants, arrays, data structures, keyboard and mouse input, files and screen input and output, and I/O to other devices such as modems, networks, and so on. • Data Flow • Data flow coverage involves tracking a piece of data completely through the software. At the unit test level this would just be through an individual module or function. The same tracking • could be done through several integrated modules or even through the entire software product— although it would be more time-consuming to do so. • *** With black-box testing, you only know what the value of the variable is at the beginning and at the end. With dynamic white-box testing you could also check intermediate values during program execution. 804-Oct-14 Md. Masudur Rahman
  • 9. Code Coverage 9 you must test the program’s states and the program’s flow among them. You must attempt to enter and exit every module, execute every line of code, and follow every logic and decision path through the software. Examining the software at this level of detail is called code-coverage analysis. Code-coverage analysis is a dynamic white-box testing technique because it requires you to have full access to the code to view what parts of the software you pass through when you run your test cases. The simplest form of code-coverage analysis is using your compiler’s debugger to view the lines of code you visit as you single-step through the program. 04-Oct-14 Md. Masudur Rahman
  • 10. Line Coverage The most straightforward form of code coverage is called statement coverage or line coverage. If you’re monitoring statement coverage while you test your software, your goal is to make sure that you execute every statement in the program at least once. • It can tell you if every statement is executed, but it can’t tell you if you’ve taken all the paths through the software. 1004-Oct-14 Md. Masudur Rahman
  • 11. Branch Coverage • Attempting to cover all the paths in the software is called path testing. The simplest form of path testing is called branch coverage testing. 1104-Oct-14 Md. Masudur Rahman
  • 12. Example 1/2 Statement Coverage: 1. PRINT “Hello World” 2. PRING “The date is: “; Date$ 3. PRINT “The time is: “; Time$ 4. END • 100 percent statement coverage would be the execution of lines 1 through 4. 1204-Oct-14 Md. Masudur Rahman
  • 13. Example 2/2 Branch Coverage 1. PRINT “Hello World” 2. IF Date$ = “01-01-2000” THEN 3. PRINT “Happy New Year” 4. END IF 5. PRING “The date is: “; Date$ 6. PRINT “The time is: “; Time$ 7. END • Test case with the date$ = january 1, 2000. The program would then execute the path: lines 1, 2, 3, 4, 5, 6, 7. • 100 percent statement coverage but not branch coverage!!! • Test case with the date$ variable set to other than january 1, 2000. The program would then execute this path: lines 1,2, 5, 6, 7. • Most code coverage analyzers will account for code branches and report both statement coverage and branch coverage results separately, giving you a much better idea of your test’s effectiveness. 1304-Oct-14 Md. Masudur Rahman
  • 14. Condition Coverage *** The Multiple Conditions in the IF Statement Create More Paths Through the Code 1. PRINT “Hello World” 2. IF Date$ = “01-01-2000” AND Time$ = “00:00:00” THEN 3. PRINT “Happy New Year” 4. END IF 5. PRINT “The date is: “; Date$ 6. PRINT “The time is: “; Time$ 7. END *** Test Cases to Achieve Full Coverage of the Multiple IF Statement Condition • Date$ Time$ Line # Execution • 01-01-0000 11:11:11 1,2,5,6,7 • 01-01-0000 00:00:00 1,2,5,6,7 • 01-01-2000 11:11:11 1,2,5,6,7 • 01-01-2000 00:00:00 1,2,3,4,5,6,7 If you test for all the possible conditions, you will achieve branch coverage and therefore achieve statement coverage. 1404-Oct-14 Md. Masudur Rahman
  • 15. Reference Book: Software Testing – Ron Patton Chapter 7 1504-Oct-14 Md. Masudur Rahman
  • 16. Thank You 1604-Oct-14 Md. Masudur Rahman