Generating Effective Integration Test Cases from Unit Ones

Unit testing aims to ensure that methods correctly implement the specified and implied pre- and post-conditions, while integration testing ensures that modules correctly follow interaction protocols. While the generation of unit test cases has been explored extensively in the literature, there is still little work on the generation of integration test cases. In this paper we present a new technique to generate integration test cases that leverages existing unit test cases. Our key observation is that both, unit and integration testing, use method calls as the atoms to construct test cases from. Unit tests contain information on how to instantiate classes in meaningful ways, how to construct arguments for method calls, and what the resulting system state should be after calling methods with those arguments. We use this information to construct more complex test cases that focus on class interactions rather than on individual state transformations caused by single method calls. This paper presents the approach and shows that the generated test cases can find interesting faults, compared to test suites generated with state of the art approaches.

[1]  Lionel C. Briand,et al.  An Investigation of Graph-Based Class Integration Test Order Strategies , 2003, IEEE Trans. Software Eng..

[2]  Giovanni Denaro,et al.  Enhancing structural software coverage by incrementally computing branch executability , 2011, Software Quality Journal.

[3]  Tao Xie,et al.  Random unit-test generation with MUT-aware sequence recommendation , 2010, ASE '10.

[4]  Gordon Fraser,et al.  The Seed is Strong: Seeding Strategies in Search-Based Software Testing , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[5]  Phil McMinn,et al.  Search-based software test data generation: a survey: Research Articles , 2004 .

[6]  Matthew B. Dwyer,et al.  Increasing Test Granularity by Aggregating Unit Tests , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[7]  Gail E. Kaiser,et al.  Automatic system testing of programs without test oracles , 2009, ISSTA.

[8]  Alessandro Orso,et al.  Interclass testing of object oriented software , 2002, Eighth IEEE International Conference on Engineering of Complex Computer Systems, 2002. Proceedings..

[9]  Zhendong Su,et al.  Synthesizing method sequences for high-coverage testing , 2011, OOPSLA '11.

[10]  Nikolai Tillmann,et al.  MSeqGen: object-oriented unit-test generation via mining source code , 2009, ESEC/SIGSOFT FSE.

[11]  Mark Harman,et al.  Test data regeneration: generating new test data from existing test data , 2012, Softw. Test. Verification Reliab..

[12]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[13]  Rance Cleaveland,et al.  Using formal specifications to support testing , 2009, CSUR.

[14]  Paolo Tonella,et al.  Evolutionary testing of classes , 2004, ISSTA '04.

[15]  Nikolai Tillmann,et al.  Pex-White Box Test Generation for .NET , 2008, TAP.

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

[17]  Leonardo Mariani,et al.  Compatibility and Regression Testing of COTS-Component-Based Software , 2007, 29th International Conference on Software Engineering (ICSE'07).

[18]  Antonia Bertolino,et al.  Software Testing Research: Achievements, Challenges, Dreams , 2007, Future of Software Engineering (FOSE '07).

[19]  Phil McMinn,et al.  Search‐based software test data generation: a survey , 2004, Softw. Test. Verification Reliab..

[20]  Michael D. Ernst,et al.  Feedback-Directed Random Test Generation , 2007, 29th International Conference on Software Engineering (ICSE'07).

[21]  Gregg Rothermel,et al.  Performing data flow testing on classes , 1994, SIGSOFT '94.

[22]  Mauro Pezzè,et al.  Software testing and analysis - process, principles and techniques , 2007 .

[23]  Andreas Zeller,et al.  Exploiting Common Object Usage in Test Case Generation , 2011, 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation.

[24]  Michael D. Ernst,et al.  Combined static and dynamic automated test generation , 2011, ISSTA '11.