Test Case Generation from Natural Language Requirements Using CPN Simulation

  • Bruno Cesar F. SilvaEmail author
  • Gustavo Carvalho
  • Augusto Sampaio
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9526)


We propose a test generation strategy from natural language (NL) requirements via translation into Colored Petri Nets (CPN), an extension of Petri Nets that supports model structuring and provides a mature theory and powerful tool support. This strategy extends our previous work on the NAT2TEST framework, which involves syntactic and semantic analyses of NL requirements and the generation of Data Flow Reactive Systems (DFRS) as an intermediate representation, from which target formal models can be obtained for the purpose of test case generation. Our contributions include a systematic translation of DFRSs into CPN models, besides a strategy for test generation. We illustrate our overall approach with a running example.


Test generation CPN Model simulation 



We thank Embraer for the partnership related to the NAT2TEST framework and, particularly, Braulio Horta and Ricardo Filho for their valuable contribution. This work was supported by the National Institute of Science and Technology for Software Engineering (INES (, funded by CNPq and FACEPE, grants 573964/2008-4 and APQ-1037-1.03/08.


  1. 1.
    Cai, L., Zhang, J., Liu, Z.: A CPN-based software testing approach. JSW 6(3), 468–474 (2011)CrossRefGoogle Scholar
  2. 2.
    Carvalho, A., Barros, F., Carvalho, A., Cavalcanti, A., Mota, A., Sampaio, A.: NAT2TEST tool: from natural language requirements to test cases based on CSP. In: Calinescu, R., Rumpe, B. (eds.) SEFM 2015. LNCS, vol. 9276, pp. 283–290. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  3. 3.
    Carvalho, G., Barros, F., Lapschies, F., Schulze, U., Peleska, J.: 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)CrossRefGoogle Scholar
  4. 4.
    Carvalho, G., Carvalho, A., Rocha, E., Cavalcanti, A., Sampaio, A.: A formal model for natural-language timed requirements of reactive systems. In: Merz, S., Pang, J. (eds.) ICFEM 2014. LNCS, vol. 8829, pp. 43–58. Springer, Heidelberg (2014)Google Scholar
  5. 5.
    Carvalho, G., Falcão, D., Barros, F., Sampaio, A., Mota, A., Motta, L., Blackburn, M.: NAT2TEST\(_{SCR}\): test case generation from natural language requirements based on SCR specifications. Sci. Comput. Program. 95, 275–297 (2014). Part 3(0)CrossRefGoogle Scholar
  6. 6.
    Carvalho, G., Sampaio, A., Mota, A.: A CSP timed input-output relation and a strategy for mechanised conformance verification. In: Groves, L., Sun, J. (eds.) ICFEM 2013. LNCS, vol. 8144, pp. 148–164. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  7. 7.
    Farooq, U., Lam, C., Li, H.: Towards automated test sequence generation. In: 19th Australian Conference on Software Engineering, ASWEC 2008, pp. 441–450, March 2008Google Scholar
  8. 8.
    Jensen, K.: Coloured Petri Nets - Basic Concepts, Analysis Methods and Practical Use. Springer, Berlin (1996)CrossRefzbMATHGoogle Scholar
  9. 9.
    Jensen, K., Kristensen, L.M.: Coloured Petri Nets: Modelling and Validation of Concurrent Systems. Springer, Berlin (2009)CrossRefGoogle Scholar
  10. 10.
    Jrgensen, J., Tjell, S., Fernandes, J.: Formal requirements modelling with executable use cases and coloured petri nets. Innovations Syst. Softw. Eng. 5(1), 13–25 (2009)CrossRefGoogle Scholar
  11. 11.
    Leonard, E., Heitmeyer, C.: Program synthesis from formal requirements specifications using APTS. Higher-Order Symbolic Comput. 16(1–2), 63–92 (2003)CrossRefzbMATHGoogle Scholar
  12. 12.
    Liu, J., Ye, X., Li, J.: Colored Petri nets model based conformance test generation. In: 2011 IEEE Symposium on Computers and Communications (ISCC), pp. 967–970, June 2011Google Scholar
  13. 13.
    Milner, R., Harper, R., Tofte, M.: The Definition of Standard ML. MIT Press, Cambridge (1990)Google Scholar
  14. 14.
    Myers, G., Sandler, C., Badgett, T.: The Art of Software Testing. John Wiley, New York (2004)Google Scholar
  15. 15.
    Tjell, S.: Model-based testing of a reactive system with coloured petri nets. In: Hochberger, C., Liskowsky, R. (eds.) Informatik, LNI, vol. 94, pp. 274–281, GI (2006)Google Scholar
  16. 16.
    Watanabe, H., Kudoh, T.: Test suite generation methods for concurrent systems based on coloured Petri nets. In: Proceedings of 1995 Asia Pacific Software Engineering Conference, pp. 242–251, December 1995Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Bruno Cesar F. Silva
    • 1
    Email author
  • Gustavo Carvalho
    • 1
  • Augusto Sampaio
    • 1
  1. 1.Centro de InformáticaUniversidade Federal de PernambucoRecifeBrazil

Personalised recommendations