CPN simulation-based test case generation from controlled natural-language requirements

Abstract We propose a test generation strategy from natural language (NL) requirements via translation into Coloured Petri Nets (CPN), an extension of Petri Nets that supports model structuring and provides a mature theory and powerful tool support. This approach 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 automating a systematic translation of DFRSs into CPN models, an extension to deal with time aspects, besides an empirical analysis of the CPN-based test generation strategy. The analyses considered examples both from the literature (a vending machine and a nuclear power plant control system), and from the aerospace and the automotive domain (a priority command control system and a turn indicator control system, respectively). We analysed performance and the ability to detect defects generated via mutation. The results provide evidence that the contribution proposed here is more efficient, besides being able to detect at least as many defects as our previous efforts.

[1]  Augusto Sampaio,et al.  Test case generation from natural language requirements based on SCR specifications , 2013, SAC '13.

[2]  Tomohiro Kudoh,et al.  Test suite generation methods for concurrent systems based on coloured Petri nets , 1995, Proceedings 1995 Asia Pacific Software Engineering Conference.

[3]  Augusto Sampaio,et al.  Modelling timed reactive systems from natural-language requirements , 2016, Formal Aspects of Computing.

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

[5]  Augusto Sampaio,et al.  Test generation from state based use case models , 2012, Formal Aspects of Computing.

[6]  Zhenyu Liu,et al.  A CPN-based Software Testing Approach , 2011, J. Softw..

[7]  Augusto Sampaio,et al.  NAT2TEST SCR , 2014 .

[8]  A. Jefferson Offutt,et al.  MuJava: an automated class mutation system , 2005, Softw. Test. Verification Reliab..

[9]  Gustavo Carvalho,et al.  Model-Based Testing from Controlled Natural Language Requirements , 2013, FTSCS.

[10]  Peter Struss,et al.  Obtaining Models for Test Generation from Natural-language-like Functional Specifications , 2007 .

[11]  Stanley M. Sutton,et al.  Text2Test: Automated Inspection of Natural Language Use Cases , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[12]  Lionel C. Briand,et al.  Automated Transition from Use Cases to UML State Machines to Support State-Based Testing , 2011, ECMFA.

[13]  Stéphane S. Somé Supporting use case based requirements engineering , 2006, Inf. Softw. Technol..

[14]  Jan Peleska,et al.  A Real-World Benchmark Model for Testing Concurrent Real-Time Systems in the Automotive Domain , 2011, ICTSS.

[15]  K. Larsen,et al.  Online Testing of Real-time Systems Using Uppaal , 2004, FATES.

[16]  Charles J. Fillmore,et al.  THE CASE FOR CASE. , 1967 .

[17]  Flávia de Almeida Barros,et al.  The ucsCNL: A Controlled Natural Language for Use Case Specifications , 2011, SEKE.

[18]  Jun Li,et al.  Colored Petri nets model based conformance test generation , 2011, 2011 IEEE Symposium on Computers and Communications (ISCC).

[19]  Simon Tjell Model-based Testing of a Reactive System with Coloured Petri Nets , 2006, GI Jahrestagung.

[20]  Augusto Sampaio,et al.  A Formal Model for Natural-Language Timed Requirements of Reactive Systems , 2014, ICFEM.

[21]  Kurt Jensen,et al.  Coloured Petri Nets: Basic Concepts, Analysis Methods and Practical Use. Vol. 2, Analysis Methods , 1992 .

[22]  Glenford J. Myers,et al.  Art of Software Testing , 1979 .

[23]  Augusto Sampaio,et al.  Test Case Generation from Natural Language Requirements Using CPN Simulation , 2015, SBMF.

[24]  Lars Michael Kristensen,et al.  Coloured Petri Nets - Modelling and Validation of Concurrent Systems , 2009 .

[25]  H. M. Sneed Testing against Natural Language Requirements , 2007 .

[26]  Augusto Sampaio,et al.  NAT2TEST Tool: From Natural Language Requirements to Test Cases Based on CSP , 2015, SEFM.

[27]  Chiou Peng Lam,et al.  Towards Automated Test Sequence Generation , 2008 .

[28]  Eelco Visser,et al.  The spoofax language workbench: rules for declarative specification of languages and IDEs , 2010, OOPSLA.

[29]  Supratik Mukhopadhyay,et al.  RETNA: from requirements to testing in a natural way , 2004, Proceedings. 12th IEEE International Requirements Engineering Conference, 2004..

[30]  Nandamudi Lankalapalli Vijaykumar,et al.  Generating model-based test cases from natural language requirements for space application software , 2011, Software Quality Journal.

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

[32]  Constance L. Heitmeyer,et al.  Program Synthesis from Formal Requirements Specifications Using APTS , 2003, High. Order Symb. Comput..

[33]  Yves Le Traon,et al.  Producing a Global Requirement Model from Multiple Requirement Specifications , 2007, 11th IEEE International Enterprise Distributed Object Computing Conference (EDOC 2007).

[34]  Augusto Sampaio,et al.  A CSP Timed Input-Output Relation and a Strategy for Mechanised Conformance Verification , 2013, ICFEM.

[35]  Robin Milner,et al.  Definition of standard ML , 1990 .