SlideShare une entreprise Scribd logo
1  sur  13
Chapter 19
         Testing Object-Oriented Applications
          Slide Set to accompany
          Software Engineering: A Practitioner’s Approach, 7/e
          by Roger S. Pressman

          Slides copyright © 1996, 2001, 2005, 2009 by Roger S. Pressman


          For non-profit educational use only
          May be reproduced ONLY for student use at the university level when used in conjunction
          with Software Engineering: A Practitioner's Approach, 7/e. Any other reproduction or use is
 These slides are designed to
          prohibited without the express written permission of the author.

accompany Software Engineering: A on a website for student
        All copyright information MUST appear if these slides are posted
        use.
Practitioner’s Approach, 7/e (McGraw-
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                                          1
OO Testing
       To adequately test OO systems, three things
        must be done:
           the definition of testing must be broadened to
            include error discovery techniques applied to object-
            oriented analysis and design models
           the strategy for unit and integration testing must
            change significantly, and
           the design of test cases must account for the unique
            characteristics of OO software.
 These slides are designed to
accompany Software Engineering: A
Practitioner’s Approach, 7/e (McGraw-
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                         2
‘Testing’ OO Models
       The review of OO analysis and design models
        is especially useful because the same semantic
        constructs (e.g., classes, attributes, operations,
        messages) appear at the analysis, design, and
        code level
       Therefore, a problem in the definition of class
        attributes that is uncovered during analysis
        will circumvent side affects that might occur if
 These the problem were not discovered until design
         slides are designed to
accompany Software Engineering: A
        or code (or even the next iteration of analysis).
Practitioner’s Approach, 7/e (McGraw-
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                     3
Correctness of OO Models
       During analysis and design, semantic correctness can be
        asesssed based on the model’s conformance to the real
        world problem domain.
     If the model accurately reflects the real world (to a level
        of detail that is appropriate to the stage of development
        at which the model is reviewed) then it is semantically
        correct.
     To determine whether the model does, in fact, reflect
        real world requirements, it should be presented to
        problem domain experts who will examine the class
 These definitions and hierarchy for omissions and ambiguity.
         slides are designed to
accompany relationships (instance connections) are evaluated
     Class
               Software Engineering: A
        to determine whether they accurately reflect real-world
Practitioner’s Approach, 7/e (McGraw-
        object connections.
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                         4
Class Model Consistency
       Revisit the CRC model and the object-relationship
        model.
     Inspect the description of each CRC index card to
        determine if a delegated responsibility is part of the
        collaborator’s definition.
     Invert the connection to ensure that each collaborator
        that is asked for service is receiving requests from a
        reasonable source.
     Using the inverted connections examined in the
        preceding step, determine whether other classes might
 These be required or whether responsibilities are properly
         slides are designed to
accompany Softwarethe classes.
        grouped among
                           Engineering: A
     Determine whether widely requested responsibilities
Practitioner’s Approach,into a(McGraw-
        might be combined 7/e single responsibility.
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                        5
OO Testing Strategies
         Unit testing
              the concept of the unit changes
              the smallest testable unit is the encapsulated class
              a single operation can no longer be tested in isolation (the
               conventional view of unit testing) but rather, as part of a
               class
         Integration Testing
           Thread-based testing integrates the set of classes required to respond
           
           to one input or event for the system
          Use-based testing begins the construction of the system by testing
           those classes (called independent classes) that use very few (if any)
 These slides are designed to
           of server classes. After the independent classes are tested, the next
           layer of classes, called dependent classes
accompany Software Engineering: A of collaborating classes
          Cluster testing [McG94] defines a cluster

Practitioner’s Approach, 7/e the CRC and object-relationship model)
           (determined by examining (McGraw-
           is exercised by designing test cases that attempt to uncover errors
Hill 2009).in the collaborations.
             Slides copyright 2009 by
Roger Pressman.                                                      6
OO Testing Strategies
       Validation Testing
          details of class connections disappear
          draw upon use cases (Chapters 5 and 6) that are part
           of the requirements model
          Conventional black-box testing methods (Chapter
           18) can be used to drive validation tests




 These slides are designed to
accompany Software Engineering: A
Practitioner’s Approach, 7/e (McGraw-
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                       7
OOT Methods
   Berard [Ber93] proposes the following approach:

      1. Each test case should be uniquely identified and should be
      explicitly associated with the class to be tested,
      2. The purpose of the test should be stated,
      3. A list of testing steps should be developed for each test and
      should contain [BER94]:
         a. a list of specified states for the object that is to be tested
         b. a list of messages and operations that will be exercised as
            a consequence of the test
         c.   a list of exceptions that may occur as the object is tested
          d. a list of external conditions (i.e., changes in the
 These slides are designed to
      environment                   external to the software that must
      exist in order to properly                conduct the test)
accompany Software information that willA in understanding or
         e. supplementary
                           Engineering: aid
Practitioner’s Approach, 7/e (McGraw-
            implementing the test.

Hill 2009). Slides copyright 2009 by
Roger Pressman.                                       8
Testing Methods
         Fault-based testing
               The tester looks for plausible faults (i.e., aspects of the
               implementation of the system that may result in defects). To
               determine whether these faults exist, test cases are designed to
               exercise the design or code.
         Class Testing and the Class Hierarchy
              Inheritance does not obviate the need for thorough testing of all
               derived classes. In fact, it can actually complicate the testing
               process.
         Scenario-Based Test Design
           
          Scenario-based testing concentrates on what the user does, not
 These slides the product does. This means capturing the tasks (via use-
          what are designed to
accompany Software Engineering:then applying them and their
          cases) that the user has to perform, A
          variants as tests.
Practitioner’s Approach, 7/e (McGraw-
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                                         9
OOT Methods: Random Testing
      Random testing
          identify operations applicable to a class
          define constraints on their use
          identify a minimum test sequence
            • an operation sequence that defines the minimum life
              history of the class (object)
          generate a variety of random (but valid) test sequences
           • exercise other (more complex) class instance life
 These slides are designed to
             histories

accompany Software Engineering: A
Practitioner’s Approach, 7/e (McGraw-
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                            10
OOT Methods: Partition Testing
         Partition Testing
              reduces the number of test cases required to test a class in
               much the same way as equivalence partitioning for
               conventional software
              state-based partitioning
                • categorize and test operations based on their ability to change
                  the state of a class
              attribute-based partitioning
                • categorize and test operations based on the attributes that they
                  use
              category-based partitioning
 These slidescategorize and test operations based on the generic function
            • are designed to
              each performs
accompany Software Engineering: A
Practitioner’s Approach, 7/e (McGraw-
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                                11
OOT Methods: Inter-Class Testing
       Inter-class testing
         
         For each client class, use the list of class operators to
         generate a series of random test sequences. The
         operators will send messages to other server classes.
       For each message that is generated, determine the
         collaborator class and the corresponding operator in the
         server object.
       For each operator in the server object (that has been
         invoked by messages sent from the client object),
         determine the messages that it transmits.
       For each of the messages, determine the next level of

These slides arethat are invoked and incorporate these into the
         operators designed to
         test sequence
accompany Software Engineering: A
Practitioner’s Approach, 7/e (McGraw-
Hill 2009). Slides copyright 2009 by
Roger Pressman.                                            12
OOT Methods: Behavior Testing
   The tests to be                        empty                   set up
   designed should         open            acct   setup Accnt      acct

   achieve all state
   coverage [KIR94].
                                                                     deposit
                                                                     (initial)
   That is, the                                                                   deposit
   operation
   sequences should                                              working
                                                                  acct
   cause the                                       balance
                                                     credit                       withdraw
   Account class to                               accntInfo
   make transition                                                   withdrawal
   through all                                                       (final)


These slides states
   allowable
                are designed to            dead                 nonworking
                                           acct                    acct
accompany Software Engineering: A
                                                     close


Practitioner’s Approach, 7/e at(McGraw-class (adapt ed f rom [ KIR94] )
                       Figure 14.3 St e diagram f or Account

Hill 2009). Slides copyright 2009 by
Roger Pressman.                                               13

Contenu connexe

Tendances

Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)Damian T. Gordon
 
Software Testing
Software TestingSoftware Testing
Software TestingKiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software TestingKiran Kumar
 
Structural and functional testing
Structural and functional testingStructural and functional testing
Structural and functional testingHimanshu
 
Testing terms & definitions
Testing terms & definitionsTesting terms & definitions
Testing terms & definitionsSachin MK
 
Testing and types of Testing
Testing and types of TestingTesting and types of Testing
Testing and types of TestingMunaam Munawar
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software TestingNishant Worah
 
Testing chapter updated (1)
Testing chapter updated (1)Testing chapter updated (1)
Testing chapter updated (1)abdullah619
 
SE2_Lec 20_Software Testing
SE2_Lec 20_Software TestingSE2_Lec 20_Software Testing
SE2_Lec 20_Software TestingAmr E. Mohamed
 
Quality assurance tests
Quality assurance testsQuality assurance tests
Quality assurance testsamitzore
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniquesFincy V.J
 
Importance of Software testing in SDLC and Agile
Importance of Software testing in SDLC and AgileImportance of Software testing in SDLC and Agile
Importance of Software testing in SDLC and AgileChandan Mishra
 

Tendances (20)

Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)
 
Software testing methods
Software testing methodsSoftware testing methods
Software testing methods
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
11 software testing_strategy
11 software testing_strategy11 software testing_strategy
11 software testing_strategy
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Testing
TestingTesting
Testing
 
H testing and debugging
H testing and debuggingH testing and debugging
H testing and debugging
 
@#$@#$@#$"""@#$@#$"""
@#$@#$@#$"""@#$@#$"""@#$@#$@#$"""@#$@#$"""
@#$@#$@#$"""@#$@#$"""
 
Structural and functional testing
Structural and functional testingStructural and functional testing
Structural and functional testing
 
Testing terms & definitions
Testing terms & definitionsTesting terms & definitions
Testing terms & definitions
 
debugging and testing
debugging and testingdebugging and testing
debugging and testing
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Testing and types of Testing
Testing and types of TestingTesting and types of Testing
Testing and types of Testing
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
 
Testing chapter updated (1)
Testing chapter updated (1)Testing chapter updated (1)
Testing chapter updated (1)
 
Test cases
Test casesTest cases
Test cases
 
SE2_Lec 20_Software Testing
SE2_Lec 20_Software TestingSE2_Lec 20_Software Testing
SE2_Lec 20_Software Testing
 
Quality assurance tests
Quality assurance testsQuality assurance tests
Quality assurance tests
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
Importance of Software testing in SDLC and Agile
Importance of Software testing in SDLC and AgileImportance of Software testing in SDLC and Agile
Importance of Software testing in SDLC and Agile
 

Similaire à Ppt19

Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing StrategiesNayyabMirTahir
 
5- Requirement.ppt
5- Requirement.ppt5- Requirement.ppt
5- Requirement.pptssusera1c25a
 
TESTING STRATEGY.ppt
TESTING STRATEGY.pptTESTING STRATEGY.ppt
TESTING STRATEGY.pptFawazHussain4
 
SE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELSSE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELSAbrar ali
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examplesMani Deepak Choudhry
 
Chapter 2_Process Models sunorgamisedASE_finalised.ppt
Chapter 2_Process Models sunorgamisedASE_finalised.pptChapter 2_Process Models sunorgamisedASE_finalised.ppt
Chapter 2_Process Models sunorgamisedASE_finalised.pptBule Hora University
 
Chapter 4 Software Testing_Finalised_BW.ppt
Chapter 4 Software Testing_Finalised_BW.pptChapter 4 Software Testing_Finalised_BW.ppt
Chapter 4 Software Testing_Finalised_BW.pptBule Hora University
 
Process models
Process modelsProcess models
Process modelsStudent
 
Chapter 08
Chapter 08Chapter 08
Chapter 08guru3188
 
Presentasi testing throughout the software life cycle 2
Presentasi testing throughout the software life cycle 2Presentasi testing throughout the software life cycle 2
Presentasi testing throughout the software life cycle 2Egi Ilham Elnusa
 
Unit iii(part d - component level design)
Unit   iii(part d - component level design)Unit   iii(part d - component level design)
Unit iii(part d - component level design)BALAJI A
 
EXTRACTING THE MINIMIZED TEST SUITE FOR REVISED SIMULINK/STATEFLOW MODEL
EXTRACTING THE MINIMIZED TEST SUITE FOR REVISED SIMULINK/STATEFLOW MODELEXTRACTING THE MINIMIZED TEST SUITE FOR REVISED SIMULINK/STATEFLOW MODEL
EXTRACTING THE MINIMIZED TEST SUITE FOR REVISED SIMULINK/STATEFLOW MODELijaia
 
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010TEST Huddle
 
Testing throughout the software life cycle
Testing throughout the software life cycleTesting throughout the software life cycle
Testing throughout the software life cycleEmi Rizki Ayunanda
 
Test Case Optimization and Redundancy Reduction Using GA and Neural Networks
Test Case Optimization and Redundancy Reduction Using GA and Neural Networks Test Case Optimization and Redundancy Reduction Using GA and Neural Networks
Test Case Optimization and Redundancy Reduction Using GA and Neural Networks IJECEIAES
 
Gui path oriented test generation algorithms paper
Gui path oriented test generation algorithms paperGui path oriented test generation algorithms paper
Gui path oriented test generation algorithms paperIzzat Alsmadi
 

Similaire à Ppt19 (20)

Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
5- Requirement.ppt
5- Requirement.ppt5- Requirement.ppt
5- Requirement.ppt
 
TESTING STRATEGY.ppt
TESTING STRATEGY.pptTESTING STRATEGY.ppt
TESTING STRATEGY.ppt
 
SE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELSSE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELS
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examples
 
Chapter 2_Process Models sunorgamisedASE_finalised.ppt
Chapter 2_Process Models sunorgamisedASE_finalised.pptChapter 2_Process Models sunorgamisedASE_finalised.ppt
Chapter 2_Process Models sunorgamisedASE_finalised.ppt
 
Chapter 4 Software Testing_Finalised_BW.ppt
Chapter 4 Software Testing_Finalised_BW.pptChapter 4 Software Testing_Finalised_BW.ppt
Chapter 4 Software Testing_Finalised_BW.ppt
 
Process models
Process modelsProcess models
Process models
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Presentasi testing throughout the software life cycle 2
Presentasi testing throughout the software life cycle 2Presentasi testing throughout the software life cycle 2
Presentasi testing throughout the software life cycle 2
 
ch3.pptx
ch3.pptxch3.pptx
ch3.pptx
 
Unit iii(part d - component level design)
Unit   iii(part d - component level design)Unit   iii(part d - component level design)
Unit iii(part d - component level design)
 
EXTRACTING THE MINIMIZED TEST SUITE FOR REVISED SIMULINK/STATEFLOW MODEL
EXTRACTING THE MINIMIZED TEST SUITE FOR REVISED SIMULINK/STATEFLOW MODELEXTRACTING THE MINIMIZED TEST SUITE FOR REVISED SIMULINK/STATEFLOW MODEL
EXTRACTING THE MINIMIZED TEST SUITE FOR REVISED SIMULINK/STATEFLOW MODEL
 
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
 
Chapter_25.ppt
Chapter_25.pptChapter_25.ppt
Chapter_25.ppt
 
Testing throughout the software life cycle
Testing throughout the software life cycleTesting throughout the software life cycle
Testing throughout the software life cycle
 
Test Case Optimization and Redundancy Reduction Using GA and Neural Networks
Test Case Optimization and Redundancy Reduction Using GA and Neural Networks Test Case Optimization and Redundancy Reduction Using GA and Neural Networks
Test Case Optimization and Redundancy Reduction Using GA and Neural Networks
 
Gui path oriented test generation algorithms paper
Gui path oriented test generation algorithms paperGui path oriented test generation algorithms paper
Gui path oriented test generation algorithms paper
 
Higher Order Testing
Higher Order TestingHigher Order Testing
Higher Order Testing
 

Dernier

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Dernier (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

Ppt19

  • 1. Chapter 19  Testing Object-Oriented Applications Slide Set to accompany Software Engineering: A Practitioner’s Approach, 7/e by Roger S. Pressman Slides copyright © 1996, 2001, 2005, 2009 by Roger S. Pressman For non-profit educational use only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach, 7/e. Any other reproduction or use is These slides are designed to prohibited without the express written permission of the author. accompany Software Engineering: A on a website for student All copyright information MUST appear if these slides are posted use. Practitioner’s Approach, 7/e (McGraw- Hill 2009). Slides copyright 2009 by Roger Pressman. 1
  • 2. OO Testing  To adequately test OO systems, three things must be done:  the definition of testing must be broadened to include error discovery techniques applied to object- oriented analysis and design models  the strategy for unit and integration testing must change significantly, and  the design of test cases must account for the unique characteristics of OO software. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw- Hill 2009). Slides copyright 2009 by Roger Pressman. 2
  • 3. ‘Testing’ OO Models  The review of OO analysis and design models is especially useful because the same semantic constructs (e.g., classes, attributes, operations, messages) appear at the analysis, design, and code level  Therefore, a problem in the definition of class attributes that is uncovered during analysis will circumvent side affects that might occur if These the problem were not discovered until design slides are designed to accompany Software Engineering: A or code (or even the next iteration of analysis). Practitioner’s Approach, 7/e (McGraw- Hill 2009). Slides copyright 2009 by Roger Pressman. 3
  • 4. Correctness of OO Models  During analysis and design, semantic correctness can be asesssed based on the model’s conformance to the real world problem domain.  If the model accurately reflects the real world (to a level of detail that is appropriate to the stage of development at which the model is reviewed) then it is semantically correct.  To determine whether the model does, in fact, reflect real world requirements, it should be presented to problem domain experts who will examine the class These definitions and hierarchy for omissions and ambiguity. slides are designed to accompany relationships (instance connections) are evaluated  Class Software Engineering: A to determine whether they accurately reflect real-world Practitioner’s Approach, 7/e (McGraw- object connections. Hill 2009). Slides copyright 2009 by Roger Pressman. 4
  • 5. Class Model Consistency  Revisit the CRC model and the object-relationship model.  Inspect the description of each CRC index card to determine if a delegated responsibility is part of the collaborator’s definition.  Invert the connection to ensure that each collaborator that is asked for service is receiving requests from a reasonable source.  Using the inverted connections examined in the preceding step, determine whether other classes might These be required or whether responsibilities are properly slides are designed to accompany Softwarethe classes. grouped among Engineering: A  Determine whether widely requested responsibilities Practitioner’s Approach,into a(McGraw- might be combined 7/e single responsibility. Hill 2009). Slides copyright 2009 by Roger Pressman. 5
  • 6. OO Testing Strategies  Unit testing  the concept of the unit changes  the smallest testable unit is the encapsulated class  a single operation can no longer be tested in isolation (the conventional view of unit testing) but rather, as part of a class  Integration Testing Thread-based testing integrates the set of classes required to respond  to one input or event for the system  Use-based testing begins the construction of the system by testing those classes (called independent classes) that use very few (if any) These slides are designed to of server classes. After the independent classes are tested, the next layer of classes, called dependent classes accompany Software Engineering: A of collaborating classes  Cluster testing [McG94] defines a cluster Practitioner’s Approach, 7/e the CRC and object-relationship model) (determined by examining (McGraw- is exercised by designing test cases that attempt to uncover errors Hill 2009).in the collaborations. Slides copyright 2009 by Roger Pressman. 6
  • 7. OO Testing Strategies  Validation Testing  details of class connections disappear  draw upon use cases (Chapters 5 and 6) that are part of the requirements model  Conventional black-box testing methods (Chapter 18) can be used to drive validation tests These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw- Hill 2009). Slides copyright 2009 by Roger Pressman. 7
  • 8. OOT Methods Berard [Ber93] proposes the following approach: 1. Each test case should be uniquely identified and should be explicitly associated with the class to be tested, 2. The purpose of the test should be stated, 3. A list of testing steps should be developed for each test and should contain [BER94]: a. a list of specified states for the object that is to be tested b. a list of messages and operations that will be exercised as a consequence of the test c. a list of exceptions that may occur as the object is tested d. a list of external conditions (i.e., changes in the These slides are designed to environment external to the software that must exist in order to properly conduct the test) accompany Software information that willA in understanding or e. supplementary Engineering: aid Practitioner’s Approach, 7/e (McGraw- implementing the test. Hill 2009). Slides copyright 2009 by Roger Pressman. 8
  • 9. Testing Methods  Fault-based testing  The tester looks for plausible faults (i.e., aspects of the implementation of the system that may result in defects). To determine whether these faults exist, test cases are designed to exercise the design or code.  Class Testing and the Class Hierarchy  Inheritance does not obviate the need for thorough testing of all derived classes. In fact, it can actually complicate the testing process.  Scenario-Based Test Design  Scenario-based testing concentrates on what the user does, not These slides the product does. This means capturing the tasks (via use- what are designed to accompany Software Engineering:then applying them and their cases) that the user has to perform, A variants as tests. Practitioner’s Approach, 7/e (McGraw- Hill 2009). Slides copyright 2009 by Roger Pressman. 9
  • 10. OOT Methods: Random Testing  Random testing  identify operations applicable to a class  define constraints on their use  identify a minimum test sequence • an operation sequence that defines the minimum life history of the class (object)  generate a variety of random (but valid) test sequences • exercise other (more complex) class instance life These slides are designed to histories accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw- Hill 2009). Slides copyright 2009 by Roger Pressman. 10
  • 11. OOT Methods: Partition Testing  Partition Testing  reduces the number of test cases required to test a class in much the same way as equivalence partitioning for conventional software  state-based partitioning • categorize and test operations based on their ability to change the state of a class  attribute-based partitioning • categorize and test operations based on the attributes that they use  category-based partitioning These slidescategorize and test operations based on the generic function • are designed to each performs accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw- Hill 2009). Slides copyright 2009 by Roger Pressman. 11
  • 12. OOT Methods: Inter-Class Testing  Inter-class testing  For each client class, use the list of class operators to generate a series of random test sequences. The operators will send messages to other server classes.  For each message that is generated, determine the collaborator class and the corresponding operator in the server object.  For each operator in the server object (that has been invoked by messages sent from the client object), determine the messages that it transmits.  For each of the messages, determine the next level of These slides arethat are invoked and incorporate these into the operators designed to test sequence accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw- Hill 2009). Slides copyright 2009 by Roger Pressman. 12
  • 13. OOT Methods: Behavior Testing The tests to be empty set up designed should open acct setup Accnt acct achieve all state coverage [KIR94]. deposit (initial) That is, the deposit operation sequences should working acct cause the balance credit withdraw Account class to accntInfo make transition withdrawal through all (final) These slides states allowable are designed to dead nonworking acct acct accompany Software Engineering: A close Practitioner’s Approach, 7/e at(McGraw-class (adapt ed f rom [ KIR94] ) Figure 14.3 St e diagram f or Account Hill 2009). Slides copyright 2009 by Roger Pressman. 13