Test Specification Patterns for Automatic Generation of Test Sequences

  • Ugo Gentile
  • Stefano Marrone
  • Gianluca Mele
  • Roberto Nardone
  • Adriano Peron
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8718)


Model Based Testing (MBT) enables automatic generation of test cases using models to specify the system behavior and requirements. Key features of MBT approaches are the automation level and the complexity of non-automated steps. Usually, test case generation is supported by some automatic technique whereas modeling is manually performed. UML statecharts or other extended finite state machine formalisms are widely used to build behavior models. To ease their development, as well as the extraction of test cases from them, is an important aspect to be addressed in order to perform testing activities with lower skill, cost and effort. This paper aims at providing a contribution to both the issues. Test Specification Patterns (TSPs) are proposed and expressed by means of UML annotated statecharts as a mean to aid the construction of models and build specifications on the base of well known recurring problems and their solutions (patterns). In order to improve usability and increase the automation level, a transformational approach is defined which derives Promela code from specifications built by TSPs composition and applies model checking to obtain test sequences by using the SPIN model checker. The usage of TSPs and the test case generation process is illustrated on a test scenario from the Radio Block Centre, the vital core of the modern railway control systems.


Test Specification Patterns Test Case Generation Model Checking Model Transformations ERTMS/ETCS 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Common test patterns and reuse of test designs,
  2. 2.
    Bernardi, S., Merseguer, J., Petriu, D.C.: A dependability profile within MARTE. Journal of Software and Systems Modeling (2011)Google Scholar
  3. 3.
    Bernardi, S., et al.: Enabling the usage of UML in the verification of railway systems: The DAM-rail approach. Reliability Engineering & System Safety 120, 112–126 (2013)CrossRefMathSciNetGoogle Scholar
  4. 4.
    Bosik, B.S., Ümit Uyar, M.: Finite state machine based formal methods in protocol conformance testing: from theory to implementation. Computer Networks and ISDN Systems 22(1), 7–33 (1991)CrossRefGoogle Scholar
  5. 5.
    Cheng, B.H.C., Atlee, J.M.: Research directions in requirements engineering. In: Future of Software Engineering, pp. 285–303. IEEE CS (2007)Google Scholar
  6. 6.
    Dwyer, M.B., Avrunin, G.-S., Corbett, J.C.: Patterns in property specifications for finite-state verification. In: Proc. of the ICSE 1999, pp. 411–420. ACM (1999)Google Scholar
  7. 7.
    Flammini, F., Marrone, S., Mazzocca, N., Nardone, R., Vittorini, V.: Model-driven V&V processes for computer based control systems: A unifying perspective. In: Margaria, T., Steffen, B. (eds.) ISoLA 2012, Part II. LNCS, vol. 7610, pp. 190–204. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  8. 8.
    Fraser, G., Wotawa, F., Ammann, P.E.: Testing with model checkers: A survey. Softw. Test. Verif. Reliab. 19(3), 215–261 (2009)CrossRefGoogle Scholar
  9. 9.
    Gargantini, A., Heitmeyer, C.: Using model checking to generate tests from requirements specifications. SIGSOFT Softw. Eng. Notes 24(6), 146–162 (1999)CrossRefGoogle Scholar
  10. 10.
    Gargantini, A., Riccobene, E.: Asm-based testing: Coverage criteria and automatic test sequence generation. Journal of Universal Computer Science 7(11), 1050–1067 (2001)Google Scholar
  11. 11.
    Grunske, L.: Specification patterns for probabilistic quality properties. In: Proc. of ICSE 2008, pp. 31–40. ACM, New York (2008)Google Scholar
  12. 12.
    Holzmann, G.: Spin Model Checker, the: Primer and Reference Manual, 1st edn. Addison-Wesley Professional (2003)Google Scholar
  13. 13.
    Javed, A.Z., Strooper, P.A., Watson, G.N.: Automated generation of test cases using model-driven architecture. In: Second International Workshop on Automation of Software Test (2007)Google Scholar
  14. 14.
    Kitamura, T., Do, N.T.B., Ohsaki, H., Fang, L., Yatabe, S.: Test-case design by feature trees. In: Margaria, T., Steffen, B. (eds.) ISoLA 2012, Part I. LNCS, vol. 7609, pp. 458–473. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  15. 15.
    Konrad, S., Cheng, B.H.C.: Facilitating the construction of specification pattern-based properties. In: Proc. of Requirements Engineering, pp. 329–338 (August 2005)Google Scholar
  16. 16.
    Konrad, S., Cheng, B.H.C.: Real-time specification patterns. In: Proc. of ICSE 2005, pp. 372–381 (May 2005)Google Scholar
  17. 17.
    Marrone, S., Flammini, F., Mazzocca, N., Nardone, R., Vittorini, V.: Towards model-driven v&v assessment of railway control systems. International Journal on Software Tools for Technology Transfer (2014)Google Scholar
  18. 18.
    Mondragon, O., Gates, A.Q., Roach, S.: Prospec: Support for elicitation and formal specification of software properties. Electr. Notes Theor. Comput. Sci. 89(2), 67–88 (2003)CrossRefGoogle Scholar
  19. 19.
    Mondragon, O., Gates, A.Q., Roach, S., Mendoza, H., Sokolsky, O.: Generating properties for runtime monitoring from software specification patterns. Int. Journal of Software Engineering and Knowledge Engineering 17(1), 107–126 (2007)CrossRefGoogle Scholar
  20. 20.
    Mussa, M., Ouchani, S., Al Sammane, W., Hamou-Lhadj, A.: A survey of model-driven testing techniques. In: Proceedings of QSIC 2009, pp. 167–172 (August 2009)Google Scholar
  21. 21.
    Mustafiz, S., Sun, X., Kienzle, J., Vangheluwe, H.: Model-driven assessment of system dependability. Software & Systems Modeling 7(4), 487–502 (2008)CrossRefGoogle Scholar
  22. 22.
    UML testing profile, Version 1.1, OMG document (2012)Google Scholar
  23. 23.
    Pflügl, H., El-Salloum, C., Kundner, I.: Crystal, critical system engineering acceleration, a truly European dimension. ARTEMIS Magazine 14, 12–15 (2013)Google Scholar
  24. 24.
    Smith, R.L., Avrunin, G.S., Clarke, L.A., Osterweil, L.J.: PROPEL: an approach supporting property elucidation. In: Proc. of ICSE 2002, pp. 11–21 (May 2002)Google Scholar
  25. 25.
    Soundarajan, N., Hallstrom, J.O., Shu, G., Delibas, A.: Patterns: from system design to software testing. Innovations in Systems and Software Engineering 4(1), 71–85 (2008)CrossRefGoogle Scholar
  26. 26.
    Terrier, F., Gérard, S.: MDE benefits for distributed, real time and embedded systems. In: Kleinjohann, B., Kleinjohann, L., Machado, R., Pereira, C., Thiagarajan, R.S. (eds.) From Model-Driven Design to Resource Management for Distributed Embedded Systems. IFIP, vol. 225, pp. 15–24. Springer, Boston (2006)CrossRefGoogle Scholar
  27. 27.
    Tretmans, J.: A formal approach to conformance testing. In: Proc. of the IFIP TC6/WG6.1 Workshop on Protocol Test Systems VI, pp. 257–276. North-Holland Publishing Co., Amsterdam (1994)Google Scholar
  28. 28.
    Tsai, W.-T., Yu, L., Zhu, F., Paul, R.: Rapid embedded system testing using verification patterns. IEEE Software 22(4), 68–75 (2005)CrossRefGoogle Scholar
  29. 29.
    Van der Aalst, W.M.P., Ter Hofstede, A.H.M., Kiepuszewski, B., Barros, A.P.: Workflow patterns. Distributed and Parallel Databases 14(1), 5–51 (2003)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Ugo Gentile
    • 1
  • Stefano Marrone
    • 2
  • Gianluca Mele
    • 1
  • Roberto Nardone
    • 1
  • Adriano Peron
    • 1
  1. 1.DIETIUniversità di Napoli “Federico II”Italy
  2. 2.Dip. di Matematica e FisicaSeconda Università di NapoliItaly

Personalised recommendations