SlideShare a Scribd company logo
1 of 11
Download to read offline
Testing Review                                                                           Fall 2006




                                                  Software Testing:
                                                       Review




                                                            1




                                  Verification vs. Validation
                                  • Verification:
                                      ?????
                                  • Validation:
       http://www.umsec.umn.edu




                                      ?????




                                                        2




                                  Verification vs. Validation:
                                  Right Definition
                                  • Verification:
                                      “are we building the product right?”
                                      The software should conform to its specification
                                  • Validation:
       http://www.umsec.umn.edu




                                      “are we building the right product?”
                                      The software should do what the user really
                                      requires
                                    Assuring that a software system
                                         meets a user’s needs
                                                        3




CSci 8801 - Dr. Mats Heimdahl                                                                   1
Testing Review                                                                                         Fall 2006




                                      Dynamic and Static Verification
                                      • Dynamic V & V
                                              Concerned with exercising and observing
                                              product behavior
                                              Testing
       http://www.umsec.umn.edu




                                      • Static V & V
                                              Concerned with analysis of the static system
                                              representation to discover problems
                                              Proofs
                                              Inspections

                                                                 4




                                      Static and Dynamic V&V

                                                                 Static
                                                               Verification
       http://www.umsec.umn.edu




                             Requirements         High-Level     Formal        Detailed
                                                                                          Program
                             Specification          Design     Specification   Design




                                                                                           Dynamic
                                  Prototype
                                                                                          Evaluation



                                                                 5




                                      Definitions of Testing
                                      • The process of executing a program (or part
                                          of a program) with the intention of finding
                                          errors (Myers, via Humphrey)
                                      •   The purpose of testing is to find errors
       http://www.umsec.umn.edu




                                              Testing is the process of trying to discover
                                              every conceivable fault or weakness in a work
                                              product (Myers, via Kit)
                                      • The process of searching for errors (Kaner)

                                                                 6




CSci 8801 - Dr. Mats Heimdahl                                                                                 2
Testing Review                                                                             Fall 2006




                                   What is a Test?
                                                              Test Cases


                                  Test Data                     Output

                                                                                 Correct
                                               Software                          result?
                                                under
                                                 Test              Oracle




                                   Test Data and Test Cases
                                   • Test data
                                       Inputs which have been devised to test the
                                       system
                                   • Test cases
       http://www.umsec.umn.edu




                                       Inputs to test the system and the predicted
                                       outputs from these inputs if the system operates
                                       according to its specification




                                                          8




                                   Bugs? What is That?
                                   • Failure
                                       An execution that yields an erroneous result
                                   • Fault
       http://www.umsec.umn.edu




                                       The source of the failure
                                   • Error
                                       The mistake that led to the fault being
                                       introduced in the code



                                                          9




CSci 8801 - Dr. Mats Heimdahl                                                                     3
Testing Review                                                                          Fall 2006




                                   Axiom of Testing


                                  “Program testing can be used to show
       http://www.umsec.umn.edu




                                   the presence of bugs, but never their
                                   absence.”
                                                                  Dijkstra, 1969




                                                          10




                                   Black and White Box
                                   • Black box testing:
                                         Designed without knowledge of the program’s
                                         internal structure and design
                                         Based on functional requirements
       http://www.umsec.umn.edu




                                   • White box testing:
                                         Examines the internal design of the program
                                         Requires detailed knowledge of its structure




                                                          11




                                   Black-Box Testing
                                   • Approach to testing where the program is
                                       considered as a “black-box”
                                   • The program test cases are based on the
                                       system specification
       http://www.umsec.umn.edu




                                   •   Test planning can begin early in the
                                       software process




                                                          12




CSci 8801 - Dr. Mats Heimdahl                                                                  4
Testing Review                                                                                         Fall 2006




                                   Black-Box Testing
                                                                         Input causing
                                                                         anomalous behavior

                                  Input test data              Ie
       http://www.umsec.umn.edu




                                                                             Output which reveal
                                                    Software                 the presence of defects




                                  Output results                Oe
                                                          13




                                   Equivalence Partitioning


                                                               Ie       Ie
       http://www.umsec.umn.edu




                                                    Software


                                                                Oe

                                                          14




                                   Structural Coverage Testing
                                   • (In)adequacy criteria
                                        If significant parts of program structure are not
                                        tested, testing is surely inadequate
                                   • Control flow coverage criteria
       http://www.umsec.umn.edu




                                        Statement (node, basic block) coverage
                                        Branch (edge) coverage
                                        Condition coverage
                                        Path coverage
                                        Data flow (syntactic dependency) coverage
                                   • Attempted compromise between the
                                     impossible and the inadequate
                                                          15




CSci 8801 - Dr. Mats Heimdahl                                                                                 5
Testing Review                                                                                               Fall 2006




                                     Statement Coverage
                                    int select(int A[], int N, int X)       i=0
                                    {
                                      int i=0;
                                      while (i<N and A[i] <X)          i<N and A[i] <X
                                      {                                                  True
                                          if (A[i]<0)                 False
       http://www.umsec.umn.edu




                                                                                     A[i]<0
                                              A[i] = - A[i];                                        True
                                          i++;                                 False
                                                                                            A[i] = - A[i];
                                      }
                                      return(1);                 return(1)
                                    }                                                            i++

                                  One test datum (N=1, A[0]=-7, X=9) is enough to guarantee statement
                                  coverage of function select
                                  Faults in handling positive values of A[i] would not be revealed

                                                                     16




                                     Branch Coverage
                                    int select(int A[], int N, int X)       i=0
                                    {
                                      int i=0;
                                      while (i<N and A[i] <X)         i<N and A[i] <X
                                      {                                                  True
                                          if (A[i]<0)                 False
       http://www.umsec.umn.edu




                                                                                     A[i]<0
                                              A[i] = - A[i];                                        True
                                          i++;                                 False
                                                                                           A[i] = - A[i];
                                      }
                                                                 return(1)
                                      return(1);
                                    }                                                           i++

                                  We must add a test datum (N=1, A[0]=7, X=9) to cover branch False of
                                  the if statement. Faults in handling positive values of A[i] would be
                                  revealed. Faults in exiting the loop with condition A[i] <X would not be
                                  revealed
                                                                     17




                                     Path Coverage
                                    int select(int A[], int N, int X)       i=0
                                    {
                                      int i=0;
                                      while (i<N and A[i] <X)         i<N and A[i] <X
                                      {                                                  True
                                          if (A[i]<0)                 False
       http://www.umsec.umn.edu




                                                                                     A[i]<0
                                              A[i] = - A[i];                                          True
                                          i++;                                 False
                                      }                                                     A[i] = - A[i];
                                      return(1);                 return(1)
                                    }                                                           i++;


                                   The loop must be iterated given number of times.
                                   PROBLEM: uncontrolled growth of test sets. We need to select a
                                   significant subset of test cases.
                                                                     18




CSci 8801 - Dr. Mats Heimdahl                                                                                       6
Testing Review                                                                                                   Fall 2006




                                      Condition Coverage
                                      int select(int A[], int N, int X)       i=0
                                      {
                                        int i=0;
                                        while (i<N and A[i] <X)          i<N and A[i] <X
                                        {                                                     True
                                            if (A[i]<0)                 False
       http://www.umsec.umn.edu




                                                                                       A[i]<0
                                                A[i] = - A[i];                                        True
                                            i++;                                 False
                                                                                            A[i] = - A[i];
                                        }
                                                                   return(1)
                                        return(1);
                                      }                                                            i++

                                  Both conditions (i<N), (A[i]<X) must be false and true for different tests.
                                  In this case, we must add tests that cause the while loop to exit for a
                                  value greater than X. Faults that arise after several iterations of the loop
                                  would not be revealed.
                                                                       19




                                      Basic Condition Coverage
                                      • Make each condition both True and False

                                                Test Case Cond 1                  Cond 2
       http://www.umsec.umn.edu




                                                    1     True                    False
                                                      2          False            True




                                                                       20




                                      Compound Condition Coverage

                                    • Evaluate every combination of the conditions
                                               Test Case Cond 1                  Cond 2
       http://www.umsec.umn.edu




                                                     1          True             True
                                                     2          True             False
                                                     3          False            True
                                                     4          False            False


                                                                       21




CSci 8801 - Dr. Mats Heimdahl                                                                                           7
Testing Review                                                                                    Fall 2006




                                  Compound Coverage (cont.)
                                   • May lead to a lot of test cases
                                        Test Case   Cond 1   Cond 2       Cond 3   Cond 4
                                           1        True     False        False    False
                                           2        True     True         False    False
                                           3        True     True         True     False
                                           4        True     True         True     True
       http://www.umsec.umn.edu




                                           5        False    True         False    False
                                           6        False    True         True     False
                                           7        False    True         True     True
                                           8        False    False        True     False
                                           9        False    False        True     True
                                           10       False    False        False    True
                                           11       True     False        True     False
                                           12       True     False        True     True
                                           13       True     False        False    True
                                           14       False    True         True     False
                                           15       False    True         False    False
                                           16       False    False        True     False



                                                                     22




                                  The Infeasibility Problem
                                  • Syntactically indicated behaviors (paths, data
                                    flows, etc.) are often impossible
                                       Infeasible control flow, data flow, and data states
                                  • Adequacy criteria are typically impossible to
       http://www.umsec.umn.edu




                                    satisfy
                                  • Unsatisfactory approaches:
                                       Manual justification for omitting each impossible test
                                       case (esp. for more demanding criteria)
                                       Adequacy “scores” based on coverage
                                          example: 95% statement coverage, 80% def-use coverage


                                                                     23




                                  The Budget Coverage Criterion
                                  • Industry’s answer to “when is testing done”
                                       When the money is used up
                                       When the deadline is reached
                                  • This is sometimes a rational approach!
       http://www.umsec.umn.edu




                                       Implication 1:
                                          Adequacy criteria answer the wrong question.
                                          Selection is more important.
                                       Implication 2:
                                          Practical comparison of approaches must consider
                                          the cost of test case selection

                                                                     24




CSci 8801 - Dr. Mats Heimdahl                                                                            8
Testing Review                                                                                                           Fall 2006




                                        Top-down testing

                                                     Testing Sequence
                                      Level 1                                       Level 1
       http://www.umsec.umn.edu




                                                             Level 2          Level 2     Level 2       Level 2


                          Level-2 Stubs



                                                       Level-3 Stubs




                                                                         25




                                        Bottom-Up Testing

                                  Test Drivers
                                                                                                               Testing
                                                                                                              Sequence
       http://www.umsec.umn.edu




                                                 Level N-1              Level N-1              Level N-1


                        Test Drivers




                                       Level N        Level N            Level N              Level N      Level N


                                                                         26




                                        Create Scaffolding
                                                                       Goal
                                          To setup the environment for executing the test
                                      D
                                      R   initialization of non-local variables
                                      I        initialization of parameters                        ORACLE
                                      V
                                      E            activation of the unit                       check the
                                      R
                                                                                                correspondence
                                                     PROGRAM UNIT                               between the
                                                                                                produced and
                                          “templates” of modules used by the                    the expected
                                      S                                                         result
                                      T    unit (functions called by the unit)
                                      U
                                      B   “templates” of any other entity used
                                                       by the unit




CSci 8801 - Dr. Mats Heimdahl                                                                                                   9
Testing Review                                                                                                  Fall 2006




                                      Generate Drivers and Stubs

                                       generic (for all tests)          specific (for subsets of tests)

                                                                        interactive: ask user for values
                                     Brute force coding
                                                                           automatic: (approximately)
                                                                           compute required values

                                                                       - parsing the unit to partially
                                     From driver/stub specs              generate the framework
                                                                       - add scripts to fill in the
                                                                         framework




                                      Problems and Tradeoffs
                                  effort in test execution and regression testing


                                           poorly designed
                                            drivers/stubs
                                                                                       high effort in
                                               low effort in                           development
                                               development
                                                                                       low effort in test
                                               high effort in test                     execution and
                                               execution and                           regression testing
                                               regression testing
                                                                                   well designed
                                                                                   drivers/stubs


                                                                     effort in developing drivers/stubs




                                      Who Should Test?
       http://www.umsec.umn.edu




                                     • Developer                           • Independent tester
                                           Understands the system               Must learn system
                                           But, will test gently                But, will attempt to break it
                                           And, is driven by                    And, is driven by “quality”
                                           deadlines
                                                                      30




CSci 8801 - Dr. Mats Heimdahl                                                                                         10
Testing Review                                                                 Fall 2006




                                  Axioms of Testing
                                  • As the number of detected defects in a
                                    piece of software increases, the
                                    probability of the existence of more
       http://www.umsec.umn.edu




                                    undetected defects also increases
                                  • Assign your best programmers to
                                    testing
                                  • Exhaustive testing is impossible
                                                    31




                                  Axioms of Testing
                                  • You cannot test a program completely
                                  • Even if you do find the last bug, you’ll
                                    never know it
       http://www.umsec.umn.edu




                                  • It takes more time than you have to test
                                    less than you’d like
                                  • You will run out of time before you run
                                    out of test cases

                                                    32




CSci 8801 - Dr. Mats Heimdahl                                                        11

More Related Content

What's hot

Accelerated reliability and durability testing technology flyer
Accelerated reliability and durability testing technology flyerAccelerated reliability and durability testing technology flyer
Accelerated reliability and durability testing technology flyerASQ Reliability Division
 
Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4JAMK
 
Test designandmanagementfreenest1dot4
Test designandmanagementfreenest1dot4Test designandmanagementfreenest1dot4
Test designandmanagementfreenest1dot4JAMK
 
Software Testing procure at ESS
Software Testing procure at ESSSoftware Testing procure at ESS
Software Testing procure at ESSDevasis Roy
 
Performance testing reference model
Performance testing reference modelPerformance testing reference model
Performance testing reference modelEduards Salnikovs
 
Benchmarking and Performance on AWS - AWS India Summit 2012
Benchmarking and Performance on AWS - AWS India Summit 2012Benchmarking and Performance on AWS - AWS India Summit 2012
Benchmarking and Performance on AWS - AWS India Summit 2012Amazon Web Services
 
An Approach to estimate Software Testing
An Approach to estimate Software TestingAn Approach to estimate Software Testing
An Approach to estimate Software TestingAgile Vietnam
 
Istqb glossary of testing terms 2 1
Istqb glossary of testing terms 2 1Istqb glossary of testing terms 2 1
Istqb glossary of testing terms 2 1Jenny Nguyen
 
Quality Assurance in REC Group
Quality Assurance in REC GroupQuality Assurance in REC Group
Quality Assurance in REC Grouptonyroz
 
Zapewnienie jakości w Grupie REC
Zapewnienie jakości w Grupie RECZapewnienie jakości w Grupie REC
Zapewnienie jakości w Grupie RECtonyroz
 
software quality assurance methodology
software quality assurance methodologysoftware quality assurance methodology
software quality assurance methodologyrockden
 
Essential Test Management
Essential Test ManagementEssential Test Management
Essential Test ManagementTechWell
 
Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)KMS Technology
 

What's hot (18)

Software testing
Software testingSoftware testing
Software testing
 
Accelerated reliability and durability testing technology flyer
Accelerated reliability and durability testing technology flyerAccelerated reliability and durability testing technology flyer
Accelerated reliability and durability testing technology flyer
 
Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4
 
Test designandmanagementfreenest1dot4
Test designandmanagementfreenest1dot4Test designandmanagementfreenest1dot4
Test designandmanagementfreenest1dot4
 
Higher Order Testing
Higher Order TestingHigher Order Testing
Higher Order Testing
 
Software Testing procure at ESS
Software Testing procure at ESSSoftware Testing procure at ESS
Software Testing procure at ESS
 
Application Testing
Application TestingApplication Testing
Application Testing
 
St
StSt
St
 
Performance testing reference model
Performance testing reference modelPerformance testing reference model
Performance testing reference model
 
Benchmarking and Performance on AWS - AWS India Summit 2012
Benchmarking and Performance on AWS - AWS India Summit 2012Benchmarking and Performance on AWS - AWS India Summit 2012
Benchmarking and Performance on AWS - AWS India Summit 2012
 
An Approach to estimate Software Testing
An Approach to estimate Software TestingAn Approach to estimate Software Testing
An Approach to estimate Software Testing
 
Istqb glossary of testing terms 2 1
Istqb glossary of testing terms 2 1Istqb glossary of testing terms 2 1
Istqb glossary of testing terms 2 1
 
Quality Assurance in REC Group
Quality Assurance in REC GroupQuality Assurance in REC Group
Quality Assurance in REC Group
 
Zapewnienie jakości w Grupie REC
Zapewnienie jakości w Grupie RECZapewnienie jakości w Grupie REC
Zapewnienie jakości w Grupie REC
 
software quality assurance methodology
software quality assurance methodologysoftware quality assurance methodology
software quality assurance methodology
 
Qa Faqs
Qa FaqsQa Faqs
Qa Faqs
 
Essential Test Management
Essential Test ManagementEssential Test Management
Essential Test Management
 
Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)
 

Viewers also liked

An Evaluation of the Comprehensiveness of the BSc Honours in Psychology Degre...
An Evaluation of the Comprehensiveness of the BSc Honours in Psychology Degre...An Evaluation of the Comprehensiveness of the BSc Honours in Psychology Degre...
An Evaluation of the Comprehensiveness of the BSc Honours in Psychology Degre...iosrjce
 
Portfolio Project 3 - Test Plan
Portfolio Project 3 - Test PlanPortfolio Project 3 - Test Plan
Portfolio Project 3 - Test PlanRyan Batey
 
Test Plan for online auction system
Test Plan for online auction systemTest Plan for online auction system
Test Plan for online auction systemKomalah Nair
 

Viewers also liked (6)

An Evaluation of the Comprehensiveness of the BSc Honours in Psychology Degre...
An Evaluation of the Comprehensiveness of the BSc Honours in Psychology Degre...An Evaluation of the Comprehensiveness of the BSc Honours in Psychology Degre...
An Evaluation of the Comprehensiveness of the BSc Honours in Psychology Degre...
 
Portfolio Project 3 - Test Plan
Portfolio Project 3 - Test PlanPortfolio Project 3 - Test Plan
Portfolio Project 3 - Test Plan
 
Testplan
TestplanTestplan
Testplan
 
Test Plan for online auction system
Test Plan for online auction systemTest Plan for online auction system
Test Plan for online auction system
 
Sample test-plan-template
Sample test-plan-templateSample test-plan-template
Sample test-plan-template
 
Test plan
Test planTest plan
Test plan
 

Similar to Testing review-3

ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall ProjectsICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall ProjectsEliane Collins
 
Software testing by risk management
Software testing by risk managementSoftware testing by risk management
Software testing by risk managementKobi Vider
 
Unosquare SlideShare Presentation
Unosquare SlideShare PresentationUnosquare SlideShare Presentation
Unosquare SlideShare PresentationMichael Barrett
 
A Software Testing Intro
A Software Testing IntroA Software Testing Intro
A Software Testing IntroEvozon Test Lab
 
&lt;p>Software Testing&lt;/p>
&lt;p>Software Testing&lt;/p>&lt;p>Software Testing&lt;/p>
&lt;p>Software Testing&lt;/p>Atul Mishra
 
An overview to Software Testing
An overview to Software TestingAn overview to Software Testing
An overview to Software TestingAtul Mishra
 
Vericenter Summary
Vericenter SummaryVericenter Summary
Vericenter Summarydeyoepw
 
verification and validation
verification and validationverification and validation
verification and validationDinesh Pasi
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsDominik Dary
 
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...ShudipPal
 
Gabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web ApplicationsGabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web ApplicationsFrancesco Fullone
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testingHaris Jamil
 

Similar to Testing review-3 (20)

ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall ProjectsICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
 
Software testing by risk management
Software testing by risk managementSoftware testing by risk management
Software testing by risk management
 
Testing & Quality Assurance
Testing & Quality AssuranceTesting & Quality Assurance
Testing & Quality Assurance
 
Unosquare SlideShare Presentation
Unosquare SlideShare PresentationUnosquare SlideShare Presentation
Unosquare SlideShare Presentation
 
Logic Atollic True Verifier
Logic Atollic True VerifierLogic Atollic True Verifier
Logic Atollic True Verifier
 
A Software Testing Intro
A Software Testing IntroA Software Testing Intro
A Software Testing Intro
 
&lt;p>Software Testing&lt;/p>
&lt;p>Software Testing&lt;/p>&lt;p>Software Testing&lt;/p>
&lt;p>Software Testing&lt;/p>
 
An overview to Software Testing
An overview to Software TestingAn overview to Software Testing
An overview to Software Testing
 
Vericenter Summary
Vericenter SummaryVericenter Summary
Vericenter Summary
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
verification and validation
verification and validationverification and validation
verification and validation
 
Software testing and analysis
Software testing and analysisSoftware testing and analysis
Software testing and analysis
 
Pm 6 testing
Pm 6 testingPm 6 testing
Pm 6 testing
 
Pm 6 testing
Pm 6 testingPm 6 testing
Pm 6 testing
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
 
test
testtest
test
 
test
testtest
test
 
Gabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web ApplicationsGabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web Applications
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 

Recently uploaded

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesSHIVANANDaRV
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningMarc Dusseiller Dusjagr
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxakanksha16arora
 
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.pptxheathfieldcps1
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
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
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 

Testing review-3

  • 1. Testing Review Fall 2006 Software Testing: Review 1 Verification vs. Validation • Verification: ????? • Validation: http://www.umsec.umn.edu ????? 2 Verification vs. Validation: Right Definition • Verification: “are we building the product right?” The software should conform to its specification • Validation: http://www.umsec.umn.edu “are we building the right product?” The software should do what the user really requires Assuring that a software system meets a user’s needs 3 CSci 8801 - Dr. Mats Heimdahl 1
  • 2. Testing Review Fall 2006 Dynamic and Static Verification • Dynamic V & V Concerned with exercising and observing product behavior Testing http://www.umsec.umn.edu • Static V & V Concerned with analysis of the static system representation to discover problems Proofs Inspections 4 Static and Dynamic V&V Static Verification http://www.umsec.umn.edu Requirements High-Level Formal Detailed Program Specification Design Specification Design Dynamic Prototype Evaluation 5 Definitions of Testing • The process of executing a program (or part of a program) with the intention of finding errors (Myers, via Humphrey) • The purpose of testing is to find errors http://www.umsec.umn.edu Testing is the process of trying to discover every conceivable fault or weakness in a work product (Myers, via Kit) • The process of searching for errors (Kaner) 6 CSci 8801 - Dr. Mats Heimdahl 2
  • 3. Testing Review Fall 2006 What is a Test? Test Cases Test Data Output Correct Software result? under Test Oracle Test Data and Test Cases • Test data Inputs which have been devised to test the system • Test cases http://www.umsec.umn.edu Inputs to test the system and the predicted outputs from these inputs if the system operates according to its specification 8 Bugs? What is That? • Failure An execution that yields an erroneous result • Fault http://www.umsec.umn.edu The source of the failure • Error The mistake that led to the fault being introduced in the code 9 CSci 8801 - Dr. Mats Heimdahl 3
  • 4. Testing Review Fall 2006 Axiom of Testing “Program testing can be used to show http://www.umsec.umn.edu the presence of bugs, but never their absence.” Dijkstra, 1969 10 Black and White Box • Black box testing: Designed without knowledge of the program’s internal structure and design Based on functional requirements http://www.umsec.umn.edu • White box testing: Examines the internal design of the program Requires detailed knowledge of its structure 11 Black-Box Testing • Approach to testing where the program is considered as a “black-box” • The program test cases are based on the system specification http://www.umsec.umn.edu • Test planning can begin early in the software process 12 CSci 8801 - Dr. Mats Heimdahl 4
  • 5. Testing Review Fall 2006 Black-Box Testing Input causing anomalous behavior Input test data Ie http://www.umsec.umn.edu Output which reveal Software the presence of defects Output results Oe 13 Equivalence Partitioning Ie Ie http://www.umsec.umn.edu Software Oe 14 Structural Coverage Testing • (In)adequacy criteria If significant parts of program structure are not tested, testing is surely inadequate • Control flow coverage criteria http://www.umsec.umn.edu Statement (node, basic block) coverage Branch (edge) coverage Condition coverage Path coverage Data flow (syntactic dependency) coverage • Attempted compromise between the impossible and the inadequate 15 CSci 8801 - Dr. Mats Heimdahl 5
  • 6. Testing Review Fall 2006 Statement Coverage int select(int A[], int N, int X) i=0 { int i=0; while (i<N and A[i] <X) i<N and A[i] <X { True if (A[i]<0) False http://www.umsec.umn.edu A[i]<0 A[i] = - A[i]; True i++; False A[i] = - A[i]; } return(1); return(1) } i++ One test datum (N=1, A[0]=-7, X=9) is enough to guarantee statement coverage of function select Faults in handling positive values of A[i] would not be revealed 16 Branch Coverage int select(int A[], int N, int X) i=0 { int i=0; while (i<N and A[i] <X) i<N and A[i] <X { True if (A[i]<0) False http://www.umsec.umn.edu A[i]<0 A[i] = - A[i]; True i++; False A[i] = - A[i]; } return(1) return(1); } i++ We must add a test datum (N=1, A[0]=7, X=9) to cover branch False of the if statement. Faults in handling positive values of A[i] would be revealed. Faults in exiting the loop with condition A[i] <X would not be revealed 17 Path Coverage int select(int A[], int N, int X) i=0 { int i=0; while (i<N and A[i] <X) i<N and A[i] <X { True if (A[i]<0) False http://www.umsec.umn.edu A[i]<0 A[i] = - A[i]; True i++; False } A[i] = - A[i]; return(1); return(1) } i++; The loop must be iterated given number of times. PROBLEM: uncontrolled growth of test sets. We need to select a significant subset of test cases. 18 CSci 8801 - Dr. Mats Heimdahl 6
  • 7. Testing Review Fall 2006 Condition Coverage int select(int A[], int N, int X) i=0 { int i=0; while (i<N and A[i] <X) i<N and A[i] <X { True if (A[i]<0) False http://www.umsec.umn.edu A[i]<0 A[i] = - A[i]; True i++; False A[i] = - A[i]; } return(1) return(1); } i++ Both conditions (i<N), (A[i]<X) must be false and true for different tests. In this case, we must add tests that cause the while loop to exit for a value greater than X. Faults that arise after several iterations of the loop would not be revealed. 19 Basic Condition Coverage • Make each condition both True and False Test Case Cond 1 Cond 2 http://www.umsec.umn.edu 1 True False 2 False True 20 Compound Condition Coverage • Evaluate every combination of the conditions Test Case Cond 1 Cond 2 http://www.umsec.umn.edu 1 True True 2 True False 3 False True 4 False False 21 CSci 8801 - Dr. Mats Heimdahl 7
  • 8. Testing Review Fall 2006 Compound Coverage (cont.) • May lead to a lot of test cases Test Case Cond 1 Cond 2 Cond 3 Cond 4 1 True False False False 2 True True False False 3 True True True False 4 True True True True http://www.umsec.umn.edu 5 False True False False 6 False True True False 7 False True True True 8 False False True False 9 False False True True 10 False False False True 11 True False True False 12 True False True True 13 True False False True 14 False True True False 15 False True False False 16 False False True False 22 The Infeasibility Problem • Syntactically indicated behaviors (paths, data flows, etc.) are often impossible Infeasible control flow, data flow, and data states • Adequacy criteria are typically impossible to http://www.umsec.umn.edu satisfy • Unsatisfactory approaches: Manual justification for omitting each impossible test case (esp. for more demanding criteria) Adequacy “scores” based on coverage example: 95% statement coverage, 80% def-use coverage 23 The Budget Coverage Criterion • Industry’s answer to “when is testing done” When the money is used up When the deadline is reached • This is sometimes a rational approach! http://www.umsec.umn.edu Implication 1: Adequacy criteria answer the wrong question. Selection is more important. Implication 2: Practical comparison of approaches must consider the cost of test case selection 24 CSci 8801 - Dr. Mats Heimdahl 8
  • 9. Testing Review Fall 2006 Top-down testing Testing Sequence Level 1 Level 1 http://www.umsec.umn.edu Level 2 Level 2 Level 2 Level 2 Level-2 Stubs Level-3 Stubs 25 Bottom-Up Testing Test Drivers Testing Sequence http://www.umsec.umn.edu Level N-1 Level N-1 Level N-1 Test Drivers Level N Level N Level N Level N Level N 26 Create Scaffolding Goal To setup the environment for executing the test D R initialization of non-local variables I initialization of parameters ORACLE V E activation of the unit check the R correspondence PROGRAM UNIT between the produced and “templates” of modules used by the the expected S result T unit (functions called by the unit) U B “templates” of any other entity used by the unit CSci 8801 - Dr. Mats Heimdahl 9
  • 10. Testing Review Fall 2006 Generate Drivers and Stubs generic (for all tests) specific (for subsets of tests) interactive: ask user for values Brute force coding automatic: (approximately) compute required values - parsing the unit to partially From driver/stub specs generate the framework - add scripts to fill in the framework Problems and Tradeoffs effort in test execution and regression testing poorly designed drivers/stubs high effort in low effort in development development low effort in test high effort in test execution and execution and regression testing regression testing well designed drivers/stubs effort in developing drivers/stubs Who Should Test? http://www.umsec.umn.edu • Developer • Independent tester Understands the system Must learn system But, will test gently But, will attempt to break it And, is driven by And, is driven by “quality” deadlines 30 CSci 8801 - Dr. Mats Heimdahl 10
  • 11. Testing Review Fall 2006 Axioms of Testing • As the number of detected defects in a piece of software increases, the probability of the existence of more http://www.umsec.umn.edu undetected defects also increases • Assign your best programmers to testing • Exhaustive testing is impossible 31 Axioms of Testing • You cannot test a program completely • Even if you do find the last bug, you’ll never know it http://www.umsec.umn.edu • It takes more time than you have to test less than you’d like • You will run out of time before you run out of test cases 32 CSci 8801 - Dr. Mats Heimdahl 11