Skip to main content

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

  • Conference paper
Structured Object-Oriented Formal Language and Method (SOFL 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7787))

  • 536 Accesses

Abstract

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.

This work is supported by NII Collaborative Research Program. Shaoying Liu is also supported by the NSFC Grant (No. 60910004), and 973 Program of China Grant (No. 2010CB328102).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Liu, S., Nakajima, S.: A Decompositional Approach to Automatic Test Case Generation Based on Formal Specification. In: Fourth IEEE International Conference on Secure Software Integration and Reliability Improvement, pp. 147–155 (2010)

    Google Scholar 

  2. Li, C., Liu, S., Nakajima, S.: An Experiment for Assessment of a “Functional Scenario-based” Test Case Generation Method. In: Proceedings of International Conference on Software Engineering and Technology, pp. 64–71 (2012)

    Google Scholar 

  3. Liu, S.: Integrating Specification-Based Review and Testing for Detecting Errors in Programs. In: Butler, M., Hinchey, M.G., Larrondo-Petrie, M.M. (eds.) ICFEM 2007. LNCS, vol. 4789, pp. 136–150. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  4. Dick, J., Faivre, A.: Automating the Generation and Sequencing of Test Cases from Model-based Specifications. In: Larsen, P.G., Wing, J.M. (eds.) FME 1993. LNCS, vol. 670, pp. 268–284. Springer, Heidelberg (1993)

    Chapter  Google Scholar 

  5. Liu, S.: Formal Engineering for Industrial Software Development Using the SOFL Method. Springer (2004) ISBN 3-540-20602-7

    Google Scholar 

  6. Gaudel, M.-C., Le Gall, P.: Testing Data Types Implementations from Algebraic Specifications. In: Hierons, R.M., Bowen, J.P., Harman, M. (eds.) Formal Methods and Testing. LNCS, vol. 4949, pp. 209–239. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  7. Broy, M., Jonsson, B., Katoen, J.-P., Leucker, M., Pretschner, A. (eds.): Model-Based Testing of Reactive Systems. LNCS, vol. 3472. Springer, Heidelberg (2005)

    MATH  Google Scholar 

  8. Cheon, Y., Avila, C.: Automating Java Program Testing Using OCL and AspectJ. In: 7th International Conference on Information Technology, pp. 1020–1025 (2010)

    Google Scholar 

  9. Michlmayr, A., Fenkam, P., Dustdar, S.: Specification-Based Unit Testing of Publich/Subscribe Applications. In: Proceedings of the 26th IEEE International Conference on Distributed Computing Systems Workshops, p. 34 (2006)

    Google Scholar 

  10. Bandyopadhyay, A., Ghosh, S.: Test Input Generation using UML Sequence and State Machines Models. In: International Conference on Software Testing Verification and Validation, pp. 121–130 (2009)

    Google Scholar 

  11. Fraser, G., Gargantini, A.: Experiments on the Test Case Length in Specification Based Test Case Generation. In: ICSE Workshop on Automation of Software Test, pp. 18–26 (2009)

    Google Scholar 

  12. Liu, S., Nakajima, S.: A “Vibration” Method for Automatically Generating Test Cases Based on Formal Specifications. In: 18th Asia-Pacific Software Engineering Conference, pp. 5–8 (2011)

    Google Scholar 

  13. http://www.nta.go.jp/tetsuzuki/shinkoku/shotoku/tebiki2010/pdf/43.pdf

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Li, C., Li, M., Liu, S., Nakajima, S. (2013). Applying “Functional Scenario-Based” Test Case Generation Method in Unit Testing and Integration Testing. In: Liu, S. (eds) Structured Object-Oriented Formal Language and Method. SOFL 2012. Lecture Notes in Computer Science, vol 7787. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39277-1_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-39277-1_1

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-39276-4

  • Online ISBN: 978-3-642-39277-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics