Abstract
Because of the growing importance of object-oriented programming, a number of testing approaches have been proposed. Franld et al. propose the application of the functional approach, using algebraic specifications for the generation of test cases and the validation of methods. Given a specification, Frankl et al. propose that equivalent terms should give observably equivalent objects, and offer general heuristics on the selection of equivalent terms for testing. Their guidelines, however, are only supported by limited empirical results, do not have a theoretical basis, and provide no guarantee of effectiveness.
In this paper, we define the concept of a fundamental pair as a pair of equivalent terms which are formed by replacing all the variables on both sides of an axiom by normal forms. We prove that an implementation is consistent with respect to all equivalent terms if and only if it is consistent with respect to all fundamental pairs. In other words, the testing coverage of fundamental pairs is identical to that of all equivalent terms, and hence we need only concentrate on the testing of fundamental pairs. Our strategy is mathematically based, simple, and much more efficient. Furthermore, it underscores the usefulness of axiom-based specifications.
This research is supported in part by a Research and Conference Grant of the University of Hong Kong.
Chapter PDF
References
SMITH, M.D. and ROBSON, D.J.: 'A framework for testing object-oriented programs', Journal of Object-Oriented Programming,1992, 5 (3): pp.45-53.
KUNG, C.H., GAO, J., HSIA, P., LIN, J. and TOYOSHIMA, Y.: 'Design recovery for software testing of object-oriented programs', Proc. IEEE Workshop on Reverse Engineering, IEEE Computer Society, Los Alamitos, California, 1993.
CHEATHAM, T.J. and MELLINGER, L.: 'Testing object-oriented software systems', Proc. 18th ACM Computer Science Conference (CSC '90),ACM Press, New York, 1990, pp. 161-165.
DOONG, R.-K. and FRANKL, P.G.: 'Case studies on testing object-oriented programs', Proc. 4th ACM Annual Symposium on Software Testing, Analysis, and Verification (7AV 4), ACM Software Engineering Notes, 1991, pp. 165 - 177.
FIEDLER, S.P.: 'Object-oriented unit testing, Hewlett-Packard Journal,1989, 40 (4): pp.69-74.
FIRESMTTH, D.G.: 'Testing object-oriented software', in Technology of Object-Oriented Languages and Systems: Proceedings of 11th International Conference (TOOLS 11), Prentice Hall, Englewood Cliffs, New Jersey, 1993, pp. 407 - 426.
FRANKL, P.G. and DOONG, R.-K.: 'Tools for testing object-oriented programs', Proc. 8th Pacific Northwest Conference on Software Quality,1990, pp. 309-324.
FRANKL, P.G.: 'A framework for testing object-oriented programs', Computer Science Technical Report PUCS-105-91, Department of Electrical Engineering and Computer Science, Polytechnic University, Brooklin, New York, 1991.
HARROLD, M.J., MCGREGOR, J.D. and FITZPATRICK, K.J.: 'Incremental testing of object-oriented class structures', Proc. 14th IEEE International Conference on Software Engineering, IEEE Computer Society, Los Alamitos, California, 1992, pp. 68 - 80.
HOFFMAN, D.M. and STROOPER, P.A.: 'Graph-based class testing, Proc. 7th Australian Software Engineering Conference (ASWEC '93),Australian Computer Society, 1993.
PERRY, D.E. and KAISER, G.E.: 'Adequate testing and object-oriented programming, Journal of Object-Oriented Programming,1990, 3 (5): pp.13-19.
SMITH, M.D. and ROBSON, D.J.: 'Object-oriented programming: the problems of validation, Proc. 6th International Conference on Software Maintenance, IEEE Computer Society, Los Alamitos, California, 1990, pp. 272 - 282.
TURNER, C.D. and ROBSON, D.J.: 'State-based testing and inheritance', Technical Report TR-1/93, Computer Science Division, School of Engineering and Computer Science, University of Durham, Durham, UK, 1993.
TURNER, C.D. and ROBSON, D.J.: 'Guidance for the testing of object-oriented programs', Technical Report TR-2/93, Computer Science Division, School of Engineering and Computer Science, University of Durham, Durham, UK, 1993.
BOUGE, L., CHOGUET, N., FRIBOURG, L. and GAUDEL, M.-C.: 'Test sets generation from algebraic specifications using logic programming', Journal of Systems and Software, 1986, 6: pp. 343 - 360.
BERNOT, G., GAUDEL, M.-C. and MARRE, B.: 'Software testing based on formal specifications: a theory and a tool', Software Engineering Journal, 1991, 6 (6): pp. 387 - 405.
EHRIG, H. and MAHR, B.: 'Fundamentals of Algebraic Specifications 1: Equations and Initial Semantics', EATCS Monographs on Theoretical Computer Science,1985, Vol. 6, Springer-Verlag, Berlin.
GOGUEN, J.A., THATCHER, J.W. and WAGNER, E.G.: 'An initial algebra approach to specification, correctness and implementation of abstract data types', in Current Trends in Programming Methodology, Vol. IV: Data Structuring, R.T. Yeh (ed.), Prentice-Hall, Englewood Cliffs, New Jersey, 1978, pp. 80 - 149.
GOGUEN, J.A., WINKLER, T., MESEGUER, J., FUTATSUGI, K. and JOUANNAUD, J.-P.: 'Introducing OBJ3', in Applications of Algebraic Specification using OBJ, J.A. Goguen, D. Coleman, and R.M. Gallimore (eds.), Cambridge University Press, Cambridge, 1993.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1995 Springer Science+Business Media Dordrecht
About this chapter
Cite this chapter
Tse, T.H., Chan, F.T., Chen, H.Y. (1995). An Axiom-Based Test Case Selection Strategy for Object-Oriented Programs. In: Lee, M., Barta, BZ., Juliff, P. (eds) Software Quality and Productivity. IFIP Advances in Information and Communication Technology. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-34848-3_16
Download citation
DOI: https://doi.org/10.1007/978-0-387-34848-3_16
Publisher Name: Springer, Boston, MA
Print ISBN: 978-1-4757-6544-1
Online ISBN: 978-0-387-34848-3
eBook Packages: Springer Book Archive