Assessing and improving state-based class testing: a series of experiments

This work describes an empirical investigation of the cost effectiveness of well-known state-based testing techniques for classes or clusters of classes that exhibit a state-dependent behavior. This is practically relevant as many object-oriented methodologies recommend modeling such components with statecharts which can then be used as a basis for testing. Our results, based on a series of three experiments, show that in most cases state-based techniques are not likely to be sufficient by themselves to catch most of the faults present in the code. Though useful, they need to be complemented with black-box, functional testing. We focus here on a particular technique, Category Partition, as this is the most commonly used and referenced black-box, functional testing technique. Two different oracle strategies have been applied for checking the success of test cases. One is a very precise oracle checking the concrete state of objects whereas the other one is based on the notion of state invariant (abstract states). Results show that there is a significant difference between them, both in terms of fault detection and cost. This is therefore an important choice to make that should be driven by the characteristics of the component to be tested, such as its criticality, complexity, and test budget.

[1]  J. Esch Prolog to Principles and Methods of Testing Finite State Machines - A Survey , 1996 .

[2]  Lionel C. Briand,et al.  USING ASPECT-ORIENTED PROGRAMMING TO INSTRUMENT OCL CONTRACTS IN JAVA , 2004 .

[3]  Ivar Jacobson,et al.  The Unified Modeling Language User Guide , 1998, J. Database Manag..

[4]  John D. McGregor,et al.  Incremental testing of object-oriented class structures , 1992, ICSE '92.

[5]  Hassan Gomaa,et al.  Designing concurrent, distributed, and real-time applications with UML , 2000, ICSE.

[6]  A. Jefferson Offutt,et al.  Criteria for testing polymorphic relationships , 2000, Proceedings 11th International Symposium on Software Reliability Engineering. ISSRE 2000.

[7]  Daniel Hoffman,et al.  State generation and automated class testing , 2000, Softw. Test. Verification Reliab..

[8]  Giuliano Antoniol,et al.  A case study using the round-trip strategy for state-based class testing , 2002, 13th International Symposium on Software Reliability Engineering, 2002. Proceedings..

[9]  Robert V. Binder,et al.  Testing Object-Oriented Systems: Models, Patterns, and Tools , 1999 .

[10]  Marc J. Balcer,et al.  The category-partition method for specifying and generating fuctional tests , 1988, CACM.

[11]  MeyerBertrand,et al.  Design by Contract , 1997 .

[12]  A. Jefferson Offutt,et al.  Investigations of the software testing coupling effect , 1992, TSEM.

[13]  Elaine J. Weyuker,et al.  The Cost of Data Flow Testing: An Empirical Study , 1990, IEEE Trans. Software Eng..

[14]  Ivar Jacobson,et al.  Unified Modeling Language , 2020, Definitions.

[15]  Dana Angluin,et al.  Two notions of correctness and their relation to testing , 1982, Acta Informatica.

[16]  Claes Wohlin,et al.  Experimentation in software engineering: an introduction , 2000 .

[17]  S. N. Weiss,et al.  All-Uses versus Mutation Testing : An ExperimentalComparison of E ectiveness , 1996 .

[18]  Doo-Hwan Bae,et al.  A test sequence selection method for statecharts , 2000, Softw. Test. Verification Reliab..

[19]  Aditya P. Mathur,et al.  Interface Mutation: An Approach for Integration Testing , 2001, IEEE Trans. Software Eng..

[20]  Lionel C. Briand,et al.  Using simulation to empirically investigate test coverage criteria based on statechart , 2004, Proceedings. 26th International Conference on Software Engineering.

[21]  K. N. King,et al.  A fortran language system for mutation‐based software testing , 1991, Softw. Pract. Exp..

[22]  William M. K. Trochim,et al.  Research methods knowledge base , 2001 .

[23]  John A. Clark,et al.  Investigating the effectiveness of object‐oriented testing strategies using the mutation method , 2001 .

[24]  Elaine J. Weyuker,et al.  On Testing Non-Testable Programs , 1982, Comput. J..

[25]  Shari Lawrence Pfleeger,et al.  Software Metrics : A Rigorous and Practical Approach , 1998 .

[26]  R. Lipton,et al.  Mutation analysis , 1998 .

[27]  Jay L. Devore,et al.  Probability and statistics for engineering and the sciences , 1982 .

[28]  Bertrand Meyer,et al.  Applying 'design by contract' , 1992, Computer.

[29]  Anneke Kleppe,et al.  The object constraint language: precise modeling with UML , 1998 .

[30]  J. A. McDermid,et al.  Investigating the Effectiveness of Object-Oriented Testing Strategies with the Mutation MethodSun-Woo Kim, John A. Clark *, John A. McDermid , 2001 .

[31]  David Lee,et al.  Principles and methods of testing finite state machines-a survey , 1996, Proc. IEEE.

[32]  Natalia Juristo Juzgado,et al.  Basics of Software Engineering Experimentation , 2010, Springer US.

[33]  David Chenho Kung,et al.  On object state testing , 1994, Proceedings Eighteenth Annual International Computer Software and Applications Conference (COMPSAC 94).

[34]  Shaoying Liu,et al.  Criteria for generating specification-based tests , 1999, Proceedings Fifth IEEE International Conference on Engineering of Complex Computer Systems (ICECCS'99) (Cat. No.PR00434).

[35]  Mike Holcombe,et al.  Statechart testing method for aircraft control systems , 2001, Softw. Test. Verification Reliab..

[36]  John A. Clark,et al.  Class Mutation : Mutation Testing for Object-Oriented Programs , 2000 .

[37]  Elaine J. Weyuker,et al.  Automatically Generating Test Data from a Boolean Specification , 1994, IEEE Trans. Software Eng..

[38]  A. Jefferson Offutt,et al.  Generating Tests from UML Specifications , 1999, UML.

[39]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

[40]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[41]  Bernd Bruegge,et al.  Object Oriented Software Engineering, Conquering Complex and Changing Systems , 2002 .

[42]  Boris Beizer,et al.  Software testing techniques (2. ed.) , 1990 .

[43]  Connie M. Borror,et al.  Probability and Statistics for Engineering and the Sciences, 5th Ed. , 2002 .

[44]  Tsun S. Chow,et al.  Testing Software Design Modeled by Finite-State Machines , 1978, IEEE Transactions on Software Engineering.

[45]  Gregg Rothermel,et al.  An empirical study of regression test selection techniques , 2001, ACM Trans. Softw. Eng. Methodol..

[46]  Phyllis G. Frankl,et al.  All-uses vs mutation testing: An experimental comparison of effectiveness , 1997, J. Syst. Softw..

[47]  Phyllis G. Frankl,et al.  An Experimental Comparison of the Effectiveness of Branch Testing and Data Flow Testing , 1993, IEEE Trans. Software Eng..