Applying "Functional Scenario-Based" Test Case Generation Method in Unit Testing and Integration Testing

Specification-based testing enables us to detect errors in the implementation of functions defined in given specifications. Its effectiveness in achieving high path coverage and efficiency in generating test cases are always major concerns of testers. The automatic test case generation approach based on formal specifications proposed by Liu and Nakajima is aimed at ensuring high effectiveness and efficiency, but this approach has not been used under different testing environments. In this paper, we first present the statical analysis of the characteristics of the test case generation approach, and then show the experiments of using this approach in two different real testing environments. The two practical testing cases include a unit testing and an integration testing. We perform the testing not only for assessing Liu's approach in practice, but also trying to get some experience of using this approach in practice. The static analysis and the results of experiments indicate that this test case generation approach may not be effective in some circumstances, especially in integration testing. We discuss the results, analyze the specific causes for the ineffectiveness, namely the low path coverage, and propose some suggestions for improvement.

[1]  Yoonsik Cheon,et al.  Automating Java Program Testing Using OCL and AspectJ , 2010, 2010 Seventh International Conference on Information Technology: New Generations.

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

[3]  Shaoying Liu,et al.  Formal Engineering for Industrial Software Development , 2004, Springer Berlin Heidelberg.

[4]  Pascale Le Gall,et al.  Testing Data Types Implementations from Algebraic Specifications , 2008, Formal Methods and Testing.

[5]  Manfred Broy,et al.  Model-Based Testing of Reactive Systems: Advanced Lectures (Lecture Notes in Computer Science) , 2005 .

[6]  Marius Mikucionis,et al.  Formal Methods and Testing , 2008 .

[7]  Shaoying Liu Formal Engineering for Industrial Software Development: Using the SOFL Method , 2004 .

[8]  Shaoying Liu,et al.  A Decompositional Approach to Automatic Test Case Generation Based on Formal Specifications , 2010, 2010 Fourth International Conference on Secure Software Integration and Reliability Improvement.

[9]  Shaoying Liu Integrating Specification-Based Review and Testing for Detecting Errors in Programs , 2007, ICFEM.

[10]  Shaoying Liu,et al.  An Experiment for Assessment of a “Functional Scenario-based“ Test Case Generation Method , 2012 .

[11]  Angelo Gargantini,et al.  Experiments on the test case length in specification based test case generation , 2009, 2009 ICSE Workshop on Automation of Software Test.

[12]  Ajitha Rajan,et al.  Requirements Coverage as an Adequacy Measure for Conformance Testing , 2008, ICFEM.

[13]  Shaoying Liu,et al.  A "Vibration" Method for Automatically Generating Test Cases Based on Formal Specifications , 2011, 2011 18th Asia-Pacific Software Engineering Conference.

[14]  Manfred Broy,et al.  Model-Based Testing of Reactive Systems, Advanced Lectures [The volume is the outcome of a research seminar that was held in Schloss Dagstuhl in January 2004] , 2005, Model-Based Testing of Reactive Systems.

[15]  Schahram Dustdar,et al.  Specification-Based Unit Testing of Publish/Subscribe Applications , 2006, 26th IEEE International Conference on Distributed Computing Systems Workshops (ICDCSW'06).

[16]  Sudipto Ghosh,et al.  Test Input Generation Using UML Sequence and State Machines Models , 2009, 2009 International Conference on Software Testing Verification and Validation.