yudan_test.ppt

536 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
536
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

yudan_test.ppt

  1. 1. Object Oriented Software Testing CSC532 Presentation Yudan Liu
  2. 2. Overview <ul><li>Brief review of software testing </li></ul><ul><li>OO Concepts effect on testing </li></ul><ul><li>Unit testing </li></ul><ul><li>Integration testing </li></ul><ul><li>System testing </li></ul><ul><li>Conclusion </li></ul>
  3. 3. Brief review of software testing <ul><li>The process of executing a program (or part of a program) with the intention of finding errors (Myers, via Humphrey) </li></ul><ul><li>The purpose of testing is to find errors </li></ul><ul><ul><li>Testing is the process of trying to discover every conceivable fault or weakness in a work product (Myers, via Kit) </li></ul></ul><ul><li>The process of searching for errors (Kaner) </li></ul>
  4. 4. Brief review of software testing (cont’d) <ul><li>Classifications based on testing stages </li></ul><ul><ul><li>Unit testing </li></ul></ul><ul><ul><li>Integration testing </li></ul></ul><ul><ul><li>System testing </li></ul></ul><ul><li>Classifications based on test case generation methods </li></ul><ul><ul><li>Black-box testing </li></ul></ul><ul><ul><li>White-box testing </li></ul></ul>
  5. 5. OO Concepts Effects on Testing <ul><li>Implications of Encapsulation </li></ul><ul><li>Implications of inheritance </li></ul><ul><li>Implications of Polymorphism </li></ul>
  6. 6. Implications of Encapsulation <ul><li>The class encapsulates the data and has methods that operate on the data </li></ul><ul><li>Since method of the class manipulate the data defined in the class, methods cannot be isolated from the class </li></ul><ul><li>Testing of the method requires observing the impact of method execution on the state of the object. </li></ul><ul><li>The class is a complete unit can be tested independently. </li></ul>
  7. 7. Implications of Inheritance <ul><li>Inheritance allows a new class (subclass) to be derived from an already existing class (superclass). </li></ul><ul><li>Each subclass must be tested individually </li></ul><ul><li>In conventional software, module once tested is seldom tested again. </li></ul><ul><li>Any change in a super class requires re-testing of the super class and all its descendants </li></ul>
  8. 8. Implications of Polymorphism <ul><li>Polymorphism means using the same interface name for more than one method. </li></ul><ul><li>The binding to the correct method may be static or dynamic. </li></ul><ul><li>Static binding happens at compile time and dynamic binding occurs at runtime. </li></ul><ul><li>Testing for the method that gets executed in response to a method call becomes more complicated </li></ul>
  9. 9. Unit testing <ul><li>Class is the basic unit of testing in object oriented software. </li></ul><ul><li>Testing methods and tools for procedural approach can be used to test individual methods in each class </li></ul><ul><li>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. </li></ul><ul><li>Gray-box testing is based on both the examination of the specification of the software and the underlying implementation for the same. </li></ul>
  10. 10. Integration Testing <ul><li>Integration testing tests for errors in the interacting subsystem. </li></ul><ul><li>Subsystem in OO SW is a grouping of classes related with each other via relationships like inheritance, aggregation and dynamic binding. </li></ul><ul><li>Since lack of hierarchical control structure, strictly top-down and bottom-up integration strategies are less meaningful </li></ul><ul><li>New errors emerge when already tested units are integrated via different relationships. </li></ul><ul><li>Defines a test order that minimizes efforts. </li></ul>
  11. 11. System Testing <ul><li>In system testing the complete application software is tested. </li></ul><ul><li>System testing of object oriented software is similar to system testing of the conventional software. </li></ul><ul><li>All rules and methods of traditional systems testing are also applicable to object-oriented. </li></ul>
  12. 12. Conclusion <ul><li>The unique features of the OO software results in several testing </li></ul><ul><li>issues that are different from the conventional software. </li></ul><ul><li>Class is the basic unit of testing in object oriented software. </li></ul><ul><li>Inheritance hierarchy requires retesting of the inherited methods in context of the subclasses. </li></ul><ul><li>Due to dynamic binding, the method called is known only at runtime </li></ul><ul><li>Integration testing is more complicated .Relationships like inheritance, dynamic binding, aggregation and association are tested. </li></ul><ul><li>System testing of object oriented software is same as conventional software system testing. </li></ul>
  13. 13. References <ul><li>[1] Object-Oriented Software Testing- Some Research and Development </li></ul><ul><li>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 </li></ul><ul><li>[2] An automatic approach to object-oriented software testing and metrics for C++ inheritance hierarchies Chun-Chia Wang; Shih, T.K.; Yule-Chyun Lin; Pai, W.C.; Information, Communications and Signal Processing, 1997. ICICS., Proceedings of 1997 International Conference on 9-12 Sept. 1997 Page(s):934 - 938 vol.2 </li></ul><ul><li>[3] Test order for inter-class integration testing of object-oriented software Kuo-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 </li></ul><ul><li>[4] Introduction to Testing Object-Oriented Software </li></ul><ul><li>http://www.awprofessional.com/articles/article.asp?p=167907&rl=1 </li></ul>
  14. 14. <ul><li>Thanks any ? </li></ul>

×