tailieunhanh - Lecture Software testing and analysis: Chapter 15 - Mauro Pezzè, Michal Young
Systematic testing of object-oriented software is fundamentally similar to systematic testing approaches for procedural software. In this chapter, we begin with functional tests based on specification of intended behavior, add selected structural test cases based on the software structure, and work from unit testing and small-scale integration testing toward larger integration and then system testing. | Testing Object Oriented Software Chapter 15 Learning objectives • Understand how object orientation impacts software testing – What characteristics matter? Why? – What adaptations are needed? • Understand basic techniques to cope with each key characteristic • Understand staging of unit and integration testing for OO software (intra-class and interclass testing) (c) 2008 Mauro Pezzè & Michal Young Ch 15, slide 2 Characteristics of OO Software Typical OO software characteristics that impact testing • State dependent behavior • Encapsulation • Inheritance • Polymorphism and dynamic binding • Abstract and generic classes • Exception handling (c) 2008 Mauro Pezzè & Michal Young Ch 15, slide 3 Review Quality activities and OO SW (c) 2008 Mauro Pezzè & Michal Young Ch 15, slide 4 OO definitions of unit and integration testing • Procedural software – unit = single program, function, or procedure more often: a unit of work that may correspond to one or more intertwined functions or programs • Object oriented software – unit = class or (small) cluster of strongly related classes (., sets of Java classes that correspond to exceptions) – unit testing = intra-class testing – integration testing = inter-class testing (cluster of classes) – dealing with single methods separately is usually too expensive (complex scaffolding), so methods are usually tested in the context of the class they belong to (c) 2008 Mauro Pezzè & Michal Young Ch 15, slide .
đang nạp các trang xem trước