ABSTRACT
Programs developed with object technologies have unique features that often make traditional testing methods inadequate. Consider, for instance, the dependence between the state of an object and the behavior of that object: The outcome of a method executed by an object often depends on the state of the object when the method is invoked. It is therefore crucial that techniques for testing of classes exercise class methods when the method's receiver is in different states. The state of an object at any given time depends on the sequence of messages received by the object up to that time. Thus, methods for testing object-oriented software should identify sequences of method invocations that are likely to uncover potential defects in the code under test. However, testing methods for traditional software do not provide this kind of information.
In this paper, we use data flow analysis, symbolic execution, and automated deduction to produce sequences of method invocations exercising a class under test. Since the static analysis techniques that we use are applied to different subproblems, the method proposed in this paper can automatically generate information relevant to testing even when symbolic execution and automated deduction cannot be completed successfully.
- 1.S. Barbey, D.Buchs, and C. P~eraire. A theory of speci~cation-based testing for object-oriented software. In Proceedings of EDCC2 (European Dependable Computing Conference), Taormina (Italy), October 1996, Lecture Notes in Computer Science 1150, pages 303{320. Springer-Verlag, 1996. Google ScholarDigital Library
- 2.H. Y. Chen, T. H.Tse, F. T.Chan, and T. Y.Chen. In black and white: an integrated approach to class-level testing of object-oriented programs. ACM Transactions on Software Engineering and Methodology, 7(3):250{295, July 1998. Google ScholarDigital Library
- 3.M. Clerici and L. Mera. Esecuzione simbolica per l'analisi di sistemi critici. Laurea's thesis, Politecnico di Milano, 1999. (in Italian).Google Scholar
- 4.A. Coen-Porisini, F. De Paoli, C. Ghezzi, and D. Mandrioli. Software speci~cation via symbolic execution. IEEE Transaction on Software Engineering, SE-17(9):884{899, September 1991. Google ScholarDigital Library
- 5.R.-K. Doong and P. G.Frankl. The ASTOOT approach to testing object-oriented programs. ACM Transactions on Software Engineering and Methodology, 3(2):101{130, April 1994. Google ScholarDigital Library
- 6.E. D? usterwald, R. Gupta, and M. L. So~a. Rigorous data ow testing through output in uences. In Proceedings of the Second Irvine Software Symposium, pages 131{145, Irvine (California), March 1992.Google Scholar
- 7.Edison Design Group. http://www.edg.com, August 1999.Google Scholar
- 8.M. J. Harrold, J. D. McGregor, and K. J. Fitzpatrick. Incremental Testing of Object-Oriented Class Structures. In Proceedings of the 14th International Conference on Software Engineering, pages 68{80, Melbourne (Australia), May 1992. Google ScholarDigital Library
- 9.M. J. Harrold and G. Rothermel. Performing data ow testing on classes. In 2nd ACM-SIGSOFT Symposium on the foundations of software engineering, pages 154{163, New Orleans, LA (USA), December 1994. Google ScholarDigital Library
- 10.L. Hatton. Safer C : Developing Software for High-integrity and Safety-critical Systems. McGraw-Hill, 1995. Google ScholarDigital Library
- 11.D. Ho~man and P. Strooper. ClassBench: A framework for automated class testing. Software Practice and Experience, 27(5):573{597, May 1997. Google ScholarDigital Library
- 12.P. Jorgensen and C. Erickson. Object-oriented integration testing. Communications of the ACM, 37(9):30{38, September 1994. Google ScholarDigital Library
- 13.S. Kirani. Speci~cation and Veri~cation of Object-Oriented Programs. PhD thesis, University of Minnesota, Minneapolis (Minnesota), December 1994.Google Scholar
- 14.D. Kung, J. Gao, P. Hsia, Y. Toyoshima, C. Chen, Y.-S. Kim, and Y.-K. Song. Developing and oject-oriented software testing and maintenance environment. Communications of the ACM, 38(10):75{86, October 1995. Google ScholarDigital Library
- 15.J. D. McGregor. Constructing functional test cases using incrementally de~ned state machines. In Proceedings of the 11 th International Conference on Testing Computer Software, Washington DC (USA), June 1994.Google Scholar
- 16.G. C. Murphy, P. Townsend, and P. S.Wong. Experiences with cluster and class testing. Communications of the ACM, 37(9):39{47, September 1994. Google ScholarDigital Library
- 17.A. Orso. Integration Testing of Object-Oriented Software. PhD thesis, Politecnico di Milano, Milano, Italy, 1998.Google Scholar
- 18.A. Orso. A framework for testing object-oriented classes. Technical report, Politecnico di Milano, 1999.Google Scholar
- 19.A. Orso, F. Saini, and N. Trevisan. Un algoritmo per il calcolo di coppie de~nizione-uso interprocedurali. Technical report, Politecnico di Milano, 1999. (in Italian).Google Scholar
- 20.S. Owre, J. Rushby, N. Shankar, and F. von Henke. Formal veri~cation for fault-tolerant architectures: Prolegomena to the design of PVS. IEEE Transactions on Software Engineering, 21(2):107{125, February 1995. Google ScholarDigital Library
- 21.W. Pugh. The Omega test: a fast and practical integer programming algorithm for dependence analysis. Communications of the ACM, 8:102{114, August 1992. Google ScholarDigital Library
- 22.G. Rothermel and M. J. Harrold. Selecting regression tests for object-oriented software. In International Conference on Software Maintenance (ICSM94), pages 14{25, Victoria, British Columbia (Canada), September 1994. Google ScholarDigital Library
- 23.J. Rushby, S. Owre, and N. Shankar. Subtypes for speci~cations: Predicate subtyping in PVS. IEEE Transactions on Software Engineering, 24(9):709{720, September 1998. Google ScholarDigital Library
- 24.A. L. Souter, L. L. Pollock, and D. Hisley. Inter-class def-use analysis with partial class representations. In Proceedings of the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering PASTE'99, Toulouse (France), September 1999. Google ScholarDigital Library
- 25.C. D. Turner and D. J. Robson. The state-based testing of object-oriented programs. In International Conference on Software Maintenance, pages 302{310, Montr~eal, Quebec (Canada), September 1993. IEEE Society Press. Google ScholarDigital Library
Index Terms
- Automated Testing of Classes
Recommendations
Automated Testing of Classes
Programs developed with object technologies have unique features that often make traditional testing methods inadequate. Consider, for instance, the dependence between the state of an object and the behavior of that object: The outcome of a method ...
Applying Conventional Testing Techniques for Class Testing
COMPSAC '96: Proceedings of the 20th Conference on Computer Software and ApplicationsAbstract: We discuss how conventional testing criteria such as branch coverage can be applied to the testing of member functions inside a class. To support such testing techniques we employ symbolic execution techniques and finite state machines (FSMs). ...
SunDew: systematic automated security testing (keynote)
SPIN 2017: Proceedings of the 24th ACM SIGSOFT International SPIN Symposium on Model Checking of SoftwareSunDew is a new automated test generation framework developed at Google, focused on finding security bugs in C/C++ code. It combines the strengths of multiple test generation techniques under a single cohesive platform. It leverages the vast amount of ...
Comments