Parameterized unit tests

Parameterized unit tests extend the current industry practice of using closed unit tests defined as parameterless methods. Parameterized unit tests separate two concerns: 1) They specify the external behavior of the involved methods for all test arguments. 2) Test cases can be re-obtained as traditional closed unit tests by instantiating the parameterized unit tests. Symbolic execution and constraint solving can be used to automatically choose a minimal set of inputs that exercise a parameterized unit test with respect to possible code paths of the implementation. In addition, parameterized unit tests can be used as symbolic summaries which allows symbolic execution to scale for arbitrary abstraction levels. We have developed a prototype tool which computes test cases from parameterized unit tests. We report on its first use testing parts of the .NET base class library.

[1]  Ron Jeffries,et al.  Extreme Programming Installed , 2000 .

[2]  Achim D. Brucker,et al.  Symbolic Test Case Generation for Primitive Recursive Functions , 2004, FATES.

[3]  James W. Newkirk,et al.  Test driven development in Microsoft.Net , 2004 .

[4]  Pankaj Jalote,et al.  Testing the Completeness of Specifications , 1989, IEEE Trans. Software Eng..

[5]  Neil Genzlinger A. and Q , 2006 .

[6]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[7]  Hans-Jörg Kreowski,et al.  Algebraic system specification and development , 1991, Lecture Notes in Computer Science.

[8]  Greg Nelson,et al.  Extended static checking for Java , 2002, PLDI '02.

[9]  Jacques Loeckx,et al.  The Foundations of Program Verification, 2nd ed , 1987 .

[10]  Andrew M. Pitts,et al.  MJ: An imperative core calculus for Java and Java with effects , 2003 .

[11]  K. Rustan M. Leino,et al.  The Spec# Programming System: An Overview , 2004, CASSIS.

[12]  William R. Bush,et al.  A static analyzer for finding dynamic programming errors , 2000, Softw. Pract. Exp..

[13]  Nikolai Tillmann,et al.  XRT- Exploring Runtime for .NET Architecture and Applications , 2006, Electron. Notes Theor. Comput. Sci..

[14]  Sarfraz Khurshid,et al.  Korat: automated testing based on Java predicates , 2002, ISSTA '02.

[15]  Mike Barnett,et al.  99 . 44 % pure : Useful Abstractions in Specifications , 2004 .

[16]  Jacques Loeckx,et al.  The Foundations of Program Verification , 1987 .

[17]  Koushik Sen,et al.  DART: directed automated random testing , 2005, PLDI '05.

[18]  Jeremy Dick,et al.  Automating the Generation and Sequencing of Test Cases from Model-Based Specifications , 1993, FME.

[19]  Amer Diwan,et al.  Discovering Algebraic Specifications from Java Classes , 2003, ECOOP.

[20]  Phyllis G. Frankl,et al.  The ASTOOT approach to testing object-oriented programs , 1994, TSEM.

[21]  Richard I. Shreeve The foundations of program verification (2nd edition) , by J. Loeckx and K. Sieber. Pp 230. £22·50. 1987. ISBN 0-471-91282-4 (Wiley) , 1988 .

[22]  Yannis Smaragdakis,et al.  JCrasher: an automatic robustness tester for Java , 2004, Softw. Pract. Exp..

[23]  David Detlefs,et al.  Simplify: a theorem prover for program checking , 2005, JACM.

[24]  Jean-Luc David,et al.  Visual Studio 2005 Team System , 2006 .

[25]  C. Csallner,et al.  Check 'n' crash: combining static checking and testing , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[26]  Marie-Claude Gaudel,et al.  Software testing based on formal specifications: a theory and a tool , 1991, Softw. Eng. J..

[27]  Sarfraz Khurshid,et al.  Test input generation with java PathFinder , 2004, ISSTA '04.

[28]  David Notkin,et al.  Symstra: A Framework for Generating Object-Oriented Unit Tests Using Symbolic Execution , 2005, TACAS.

[29]  Fabrice Bouquet,et al.  BZ-TT: A tool-set for test generations from Z and B using constraint logic programming , 2002 .

[30]  Richard Hundhausen Working with Microsoft Visual Studio 2005 Team System , 2005 .

[31]  Sarfraz Khurshid,et al.  TestEra: a novel framework for automated testing of Java programs , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).