1 / 14

Object Oriented Software Testing

Object Oriented Software Testing. CSC532 Presentation Yudan Liu . Overview. Brief review of software testing OO Concepts effect on testing Unit testing Integration testing System testing Conclusion. Brief review of software testing.

sylvana
Télécharger la présentation

Object Oriented Software Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object Oriented Software Testing CSC532 Presentation Yudan Liu

  2. Overview • Brief review of software testing • OO Concepts effect on testing • Unit testing • Integration testing • System testing • Conclusion

  3. Brief review of software 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 • 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)

  4. Brief review of software testing (cont’d) • Classifications based on testing stages • Unit testing • Integration testing • System testing • Classifications based on test case generation methods • Black-box testing • White-box testing

  5. OO Concepts Effects on Testing • Implications of Encapsulation • Implications of inheritance • Implications of Polymorphism

  6. Implications of Encapsulation • The class encapsulates the data and has methods that operate on the data • Since method of the class manipulate the data defined in the class, methods cannot be isolated from the class • Testing of the method requires observing the impact of method execution on the state of the object. • The class is a complete unit can be tested independently.

  7. Implications of Inheritance • Inheritance allows a new class (subclass) to be derived from an already existing class (superclass). • Each subclass must be tested individually • In conventional software, module once tested is seldom tested again. • Any change in a super class requires re-testing of the super class and all its descendants

  8. Implications of Polymorphism • Polymorphism means using the same interface name for more than one method. • The binding to the correct method may be static or dynamic. • Static binding happens at compile time and dynamic binding occurs at runtime. • Testing for the method that gets executed in response to a method call becomes more complicated

  9. Unit testing • Class is the basic unit of testing in object oriented software. • Testing methods and tools for procedural approach can be used to test individual methods in each class • A much better way to test the class is to use a combination of the black-box and white-box testing techniques. This is also called gray-box testing. • Gray-box testing is based on both the examination of the specification of the software and the underlying implementation for the same.

  10. Integration Testing • Integration testing tests for errors in the interacting subsystem. • Subsystem in OO SW is a grouping of classes related with each other via relationships like inheritance, aggregation and dynamic binding. • Since lack of hierarchical control structure, strictly top-down and bottom-up integration strategies are less meaningful • New errors emerge when already tested units are integrated via different relationships. • Defines a test order that minimizes efforts.

  11. System Testing • In system testing the complete application software is tested. • System testing of object oriented software is similar to system testing of the conventional software. • All rules and methods of traditional systems testing are also applicable to object-oriented.

  12. Conclusion • The unique features of the OO software results in several testing issues that are different from the conventional software. • Class is the basic unit of testing in object oriented software. • Inheritance hierarchy requires retesting of the inherited methods in context of the subclasses. • Due to dynamic binding, the method called is known only at runtime • Integration testing is more complicated .Relationships like inheritance, dynamic binding, aggregation and association are tested. • System testing of object oriented software is same as conventional software system testing.

  13. References • [1] Object-Oriented Software Testing- Some Research and Development David C. Kung and Pei Hsia Computer Science and Engineering Dept. The Univ. of Texas at Arlington Yasufumi Toyoshima, Cris Chen, Jerry Gao Fujitsu Network Communication Systems • [2] An automatic approach to object-oriented software testing and metrics for C++ inheritance hierarchiesChun-Chia Wang; Shih, T.K.; Yule-Chyun Lin; Pai, W.C.; Information, Communications and Signal Processing, 1997. ICICS., Proceedings of 1997 International Conference on9-12 Sept. 1997 Page(s):934 - 938 vol.2 • [3] Test order for inter-class integration testing of object-oriented softwareKuo-Chung Tai; Daniels, F.J.;Computer Software and Applications Conference, 1997. COMPSAC '97. Proceedings., The Twenty-First Annual International 13-15 Aug. 1997 Page(s):602 - 607 Digital Object Identifier 10.1109/CMPSAC.1997.625079 • [4] Introduction to Testing Object-Oriented Software • http://www.awprofessional.com/articles/article.asp?p=167907&rl=1

  14. Thanks any ?

More Related