Skip to main content

A Specification-Based Approach to Testing Polymorphic Attributes

  • Conference paper
Formal Methods and Software Engineering (ICFEM 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3308))

Included in the following conference series:

Abstract

The object-oriented features, such as aggregation, inheritance and polymorphism, facilitate software reuse and improve software quality. But those features also cause new problems that traditional testing techniques cannot resolve effectively. Existing researches on object-oriented software testing are mainly based on some graph representations and seldom consider the combinational effect of aggregation, inheritance and polymorphism. For some model-based specifications that do not include graph representations, it is difficult to use the graph based testing techniques to derive test cases. This paper provides an approach to deriving test cases for testing the combinational effect of aggregation, inheritance and polymorphism from a model-based class specification. This approach contains two techniques at intra-class and inter-class testing levels and is mechanized using the algorithms presented in this paper. Finally, through the experimental analysis, we present the effectiveness and applicability of our testing approach.

This work is supported by the Natural Science Foundation of China (60173030) and National 973 Program (2002CB312001).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Mei, Chen, H., Kao, H.M.: Testing Object-Oriented Programs - An Integrated Approach. In: Proceedings of International Symposium on Software Reliability Engineering, Boca Raton, Florida, November 1999, pp. 73–82 (1999)

    Google Scholar 

  2. R.T. Alexander, A. Jefferson Offutt: Criteria for Testing Polymorphic Relationship. In: Proceedings of International Symposium on Software Reliability Engineering, California, USA (October 2000), 8-11

    Google Scholar 

  3. Martena, V., Orso, A., Pezze, M.: Interclass Testing of Object Oriented Software. In: Proceedings of the Conference on Engineering of Complex Computer Systems, MD, USA, December 2002, pp. 135–144 (2002)

    Google Scholar 

  4. Harrold, M.J., McGregor, J.D., Fitzpatrick, K.: Incremmental Testing of Object-Oriented Class Inheritance Structures. In: Proceedings of the International Conference on Software Engineering, Melborne, Australia, May 1992, pp. 68–80 (1992)

    Google Scholar 

  5. Stocks, P., Carrington, D.: A Framework for Specification-Based Testing. IEEE Transaction on Software Engineering 22(11), 777–793 (1996)

    Article  Google Scholar 

  6. Murray, L., Carrington, D.A., MacColl, I., Strooper, P.A.: Extending Testing Templates with Inheritance. In: Autralian Software Engineering Conference, Australia, October 1997, pp. 80–87 (1997)

    Google Scholar 

  7. Liu, L., Miao, H., Zhan, X.: A Framework for Specification-Based Class Testing. In: Proceedings of the Conference on Engineering of Complex Computer Systems, MD, USA, December 2002, pp. 153–162 (2002)

    Google Scholar 

  8. Liu, L.: Object-Oriented Formal Specification Based Test Generation. Ph.D. thesis, Shanghai University (2004)

    Google Scholar 

  9. Harrold, M., Rothermel, G.: Performing Data Flow Testing on Classes. In: Symposium on Foundations of Software Engineering, New Orleans, April 1994, pp. 200–207 (1994)

    Google Scholar 

  10. Gallagher, L., Offutt, J.: Integration Testing of Object-Oriented Components Using Finite State Machines (submitted for publication, 2002)

    Google Scholar 

  11. Ostrand, T., Balcer, M.: The Category-Partition Method for Specifying and Generating Functional Tests. Communications of the ACM 31(6), 676–686 (1988)

    Article  Google Scholar 

  12. Smith, G.: An Object-Oriented Approach to Formal Specifications. Ph.D. Thesis, University of Queensland (1992)

    Google Scholar 

  13. Smith, G.: The Object-Z Specification Language. Kluwer Academic Publishers, Dordrecht (2000)

    MATH  Google Scholar 

  14. Offutt, J., Alexander, R., Wu, Y., Xiao, W., Hutchinson, C.: A Fault Model for Subtype Inheritance and Polymorphism. In: Symposium on Software Reliability Engineering, Hong Kong, PRC, November 2001, pp. 84–93 (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Liu, L., Miao, H. (2004). A Specification-Based Approach to Testing Polymorphic Attributes. In: Davies, J., Schulte, W., Barnett, M. (eds) Formal Methods and Software Engineering. ICFEM 2004. Lecture Notes in Computer Science, vol 3308. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30482-1_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30482-1_28

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23841-6

  • Online ISBN: 978-3-540-30482-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics