Skip to main content

Automatic Generation of Test Cases and Test Purposes from Natural Language

  • Conference paper
  • First Online:
Formal Methods: Foundations and Applications (SBMF 2015)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9526))

Included in the following conference series:

Abstract

Use cases are widely used for requirements description in the software engineering practice. As a use case event flow is often written in natural language, it lacks tools for automatic analysis or processing. In this paper, we extend previous work that proposes an automatic strategy for generating test cases from use cases written in a Controlled Natural Language (CNL), which is a subset of English that can be processed and translated into a formal representation. Here we propose a state-based CNL for describing use cases. We translate state-based use case descriptions into CSP processes from which test cases can be automatically generated. In addition, we show how a similar notation can be used to specify test selection via the definition of state-based test purposes, which are also translated into CSP processes. Test generation and selection are mechanised by running refinement checking verifications using the CSP processes for use cases and test purposes. All the steps of the strategy are integrated into a tool that provides a GUI for authoring use cases and test purposes described in the proposed CNL, so the formal CSP notation is totally hidden from the test designer. We illustrate our tool and techniques with a running example.

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 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.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

References

  1. Developers, A.: UIAutomator (2015). https://developer.android.com/tools/testing-support-library/index.html

  2. Bezerra, R.: Extração Automática de Modelos CSP a partir de Casos de Uso. Master’s thesis, Center of Informatics of Federal University of Pernambuco (2011)

    Google Scholar 

  3. Boddu, R., et al.: RETNA: from requirements to testing in a natural way. In: Proceedings of the RE 2004, pp. 262–271. IEEE, Washington (2004)

    Google Scholar 

  4. Brottier, E., Baudry, B., Traon, Y.L., Touzet, D., Nicolas, B.: Producing a global requirement model from multiple requirement specifications. In: Proceedings of the 11st edn. OC, EDOC 2007, p. 390. IEEE, Washington (2007)

    Google Scholar 

  5. Nebut, C., et al.: Automatic test generation: a use case driven approach. IEEE Trans. Softw. Eng. 32(3), 140–155 (2006)

    Article  Google Scholar 

  6. Carvalho, G., et al.: Test case generation from natural language requirements based on SCR specifications. In: Proceedings of the 28th Annual ACM Symposium on Applied Computing, SAC 2013, pp. 1217–1222. ACM, New York (2013)

    Google Scholar 

  7. Carvalho, G., Lapschies, F., Schulze, U., Peleska, J., Barros, Flávia: Model-based testing from controlled natural language requirements. In: Artho, C., Ölveczky, P.C. (eds.) FTSCS 2013. CCIS, vol. 419, pp. 19–35. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  8. Drazan, J., Mencl, V.: Improved processing of textual use cases: deriving behavior specifications. In: van Leeuwen, J., Italiano, G.F., van der Hoek, W., Meinel, C., Sack, H., Plášil, F. (eds.) SOFSEM 2007. LNCS, vol. 4362, pp. 856–868. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  9. Ferreira, F., Neves, L., Silva, M., Borba, P.: TaRGeT: a model based product line testing tool. In: Proceedings of CBSoft 2010 – Tools Panel (2010)

    Google Scholar 

  10. Gibson-Robinson, T., Armstrong, P., Boulgakov, A., Roscoe, A.W.: FDR3 17 a modern refinement checker for CSP. In: Tools and Algorithms for the Construction and Analysis of Systems, pp. 187–201 (2014)

    Google Scholar 

  11. Hoare, C.A.R.: Communicating Sequential Processes. Prentice Hall, Upper Saddle River (1985)

    MATH  Google Scholar 

  12. Jard, C., Jéron, T.: TGV: theory, principles and algorithms: a tool for the automatic synthesis of conformance test cases for non-deterministic reactive systems. Int. J. Softw. Technol. Transf. 7(4), 297–315 (2005)

    Article  Google Scholar 

  13. McAffer, J., et al.: Eclipse Rich Client Platform: Designing, Coding, and Packaging Java(TM) Applications. Addison-Wesley Professional, Lebanon (2005)

    Google Scholar 

  14. Nogueira, S., Sampaio, A., Mota, A.M.: Guided test generation from CSP models. In: Fitzgerald, J.S., Haxthausen, A.E., Yenigun, H. (eds.) ICTAC 2008. LNCS, vol. 5160, pp. 258–273. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  15. Nogueira, S., Sampaio, A., Mota, A.: Test generation from state based use case models. Formal Aspects Comput. 26(3), 441–490 (2014)

    Article  MathSciNet  Google Scholar 

  16. Oracle: Java JSE, July 2015. http://www.oracle.com/

  17. Roscoe, A.W.: The Theory and Practice of Concurrency. Prentice Hall PTR, Upper Saddle River (1998)

    Google Scholar 

  18. Roscoe, A.W.: Understanding Concurrent Systems. Texts in Computer Science. Springer, London (2010)

    Book  MATH  Google Scholar 

  19. Júnior, V.A.D.S., Vijaykumar, N.L.: Generating model-based test cases from natural language requirements for space application software. Software Qual. J. 20(1), 77–143 (2012)

    Article  Google Scholar 

  20. Schwitter, R., Fuchs, N.E.: Attempto - from specifications in controlled natural language towards executable specifications. In: CoRR cmp-lg/9603004 (1996)

    Google Scholar 

  21. Sinha, A., Sutton, M.S., Paradkar, A.: Text2test: automated inspection of natural language use cases. In: Proceedings of the ICST 2010, ICST 2010, pp. 155–164. IEEE Computer Society, Washington (2010)

    Google Scholar 

  22. Somé, S.S.: Supporting use case based requirements engineering. Inf. Soft. Technol. 48(1), 43–58 (2006)

    Article  Google Scholar 

  23. Somé, S.S., Cheng, X.: An approach for supporting system-level test scenarios generation from textual use cases. In: Proceedings of SAC 2008, pp. 724–729. ACM, New York (2008)

    Google Scholar 

  24. Sterling, L., Shapiro, E.: The Art of Prolog. MIT Press, Cambridge (1986)

    MATH  Google Scholar 

  25. Veanes, M., Campbell, C., Schulte, W., Tillmann, N.: Online testing with model programs. In: Proceedings of the 10th European Software Engineering Conference, ESEC/FSE-13, pp. 273–282. ACM, New York (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sidney Nogueira .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Nogueira, S., Araujo, H.L.S., Araujo, R.B.S., Iyoda, J., Sampaio, A. (2016). Automatic Generation of Test Cases and Test Purposes from Natural Language. In: Cornélio, M., Roscoe, B. (eds) Formal Methods: Foundations and Applications. SBMF 2015. Lecture Notes in Computer Science(), vol 9526. Springer, Cham. https://doi.org/10.1007/978-3-319-29473-5_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-29473-5_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-29472-8

  • Online ISBN: 978-3-319-29473-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics