Skip to main content
Log in

Scenario-based testing from UML/OCL behavioral models

Application to POSIX compliance

  • VSTTE 2009-2010
  • Published:
International Journal on Software Tools for Technology Transfer Aims and scope Submit manuscript

Abstract

We present in this article a way to produce test suites applied to the POSIX mini-challenge based on a behavioral model of a file system manager written in UML/OCL. We illustrate the limitations of a fully automated test generation approach, which justifies the use of test scenarios as a complement to a functional testing approach. Scenarios are expressed through regular expressions describing sequences of operations, possibly punctuated by intermediate states that have to be reached by the execution of the model. Scenarios are unfolded into extended sequences of operations that are played on the model using symbolic animation techniques. We experimented our approach by testing the conformance of two different file systems w.r.t. the POSIX standard: a recent Linux distribution and a customized Java implementation of POSIX used to evaluate the relevance of our approach and its complementarity with a structural test generation approach.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Auguston, M., Michael, J.B., Shing, M.-T.: Environment behavior models for scenario generation and testing automation. In: A-MOST ’05: Proceedings of the 1st International Workshop on Advances in Model-Based Testing, pp. 1–6. ACM, New York (2005)

  2. Beizer B.: Black-Box Testing: Techniques for Functional Testing of Software and Systems. Wiley, New York (1995)

    Google Scholar 

  3. Binder R.V.: Testing Object-Oriented Systems: Models, Patterns, and Tools. Addison-Wesley Longman Publishing Co. Inc., Boston (1999)

    Google Scholar 

  4. Bouquet, F., Dadeau, F., Legeard, B.: Automated boundary test generation from JML specifications. In: Nipkow, T., Misra, J. (eds.) FM’06, 14th International Conference on Formal Methods, Hamilton Canada. LNCS, vol. 4085, pp. 428–443. Springer, Berlin (2006)

  5. Bouquet, F., Grandpierre, C., Legeard, B., Peureux, F., Vacelet, N., Utting, M.: A subset of precise UML for model-based testing. In: A-MOST’07, 3rd International Workshop on Advances in Model Based Testing, pp. 95–104. ACM Press, London (2007)

  6. Bouquet F., Legeard B., Peureux F.: CLPS-B: A constraint solver to animate a B specification. Int. J. Softw. Tool Technol. Transf. 6(2), 143–157 (2004)

    Google Scholar 

  7. Brucker, A.D., Krieger, M.P., Longuet, D., Wolff, B.: A specification-based test case generation method for UML/OCL. In: Workshop on OCL and Textual Modelling. Selected best papers from all satellite events of the MoDELS 2010 conference (2010)

  8. Clarke, D., Jéron, T., Rusu, V., Zinovieva, E.: Stg: a tool for generating symbolic test programs and oracles from operational specifications. In: ESEC/FSE-9: Proceedings of the 8th European Software Engineering Conference Held Jointly with 9th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 301–302. ACM, New York (2001)

  9. Dadeau, F., de Kermadec, A., Tissot, R.: Combining scenario- and model-based testing to ensure posix compliance. In: ABZ’2008, International Conference on ASM, B and Z, London, UK. LNCS, vol. 5238, pp. 153–166. Springer, Berlin (2008)

  10. de Vries R.G., Tretmans J.: On-the-fly conformance testing using spin. Int. J. Softw. Tool Technol. Transf. 2, 382–393 (2000)

    Article  MATH  Google Scholar 

  11. Dick, J., Faivre, A.: Automating the generation and sequencing of test cases from model-based specifications. In: Woodcock, J., Gorm Larsen, P. (eds.) FME ’93: 1st International Symposium of Formal Methods Europe, Odense, Denmark. LNCS, vol. 670, pp. 268–284. Springer, Berlin (1993)

  12. Jaffuel, E., Legeard, B.: LEIRIOS test generator: automated test generation from B models. In: B’2007, the 7th International B Conference, Besançon, France. LNCS, vol. 4355, pp. 277–281. Springer, Berlin (2007)

  13. Jeannet, T., Jéron, T., Rusu, V., Zinovieva, E.: Symbolic test selection based on approximate analysis. In: TACAS’05. LNCS, vol. 3440, pp. 349–364. Springer, Berlin (2005)

  14. Joshi R., Holzmann G.: A mini challenge: build a verifiable filesystem. Formal Aspect Comput. 19(4), 269–272 (2007)

    Article  MATH  Google Scholar 

  15. Julliand, J., Masson, P.-A., Tissot, R.: Generating tests from B specifications and test purposes. In: ABZ’2008, International Conference on ASM, B and Z, London, UK. LNCS, vol. 5238, pp. 139–152. Springer, Berlin (2008)

  16. Ledru, Y., du Bousquet, L., Maury, O., Bontron, P.: Filtering TOBIAS Combinatorial Test Suites. In: Wermelinger, M., Margaria, T. (eds.) Fundamental Approaches to Software Engineering, 7th International Conference, Barcelona, Spain. LNCS, vol. 2984, pp. 281–294. Springer, Berlin (2004)

  17. Marre B., Blanc B.: Test selection strategies for lustre descriptions in gatel. Electron. Notes Theor. Comput. Sci. 111, 93–111 (2005)

    Article  Google Scholar 

  18. Marre, B.: Toward automatic test data set selection using algebraic specifications and logic programming. In: ICLP, pp. 202–219 (1991)

  19. Masson P.-A., Potet M.-L., Julliand J., Tissot R., Debois G., Legeard B., Chetali B., Bouquet F., Jaffuel E., Van Aertrick L., Andronick J., Haddad A.: An access control model based testing approach for smart card applications: Results of the POSÉ project. J. Inf. Assur. Secur. 5(1), 335–351 (2010)

    Google Scholar 

  20. Maury, O., Ledru, Y., du Bousquet, L.: Intégration de TOBIAS et UCASTING pour la génération de tests. In: 16th International Conference Software and Systems and Their Applications, Paris (2003)

  21. Offutt, A.J., Xiong, Y., Liu, S.: Criteria for generating specification-based tests. In: ICECCS ’99: Proceedings of the 5th International Conference on Engineering of Complex Computer Systems, p. 119. IEEE Computer Society, Washington, DC (1999)

  22. Ryser, J., Glinz, M.: A practical approach to validating and testing software systems using scenarios (1999)

  23. Stocks, P.A., Carrington, D.A.: Test templates: a specification-based testing framework. In: Proceedings of the 15th International Conference on Software Engineering, ICSE ’93, pp. 405–414. IEEE Computer Society Press, Los Alamitos (1993)

  24. Tillmann N., Schulte W.: Parameterized unit tests. SIGSOFT Softw. Eng. Notes 30(5), 253–262 (2005)

    Article  Google Scholar 

  25. Tsai, W.T., Saimi, A., Yu, L., Paul, R.: Scenario-based object-oriented testing framework. QSIC 00, 410 (2003)

    Google Scholar 

  26. van Aertryck, L., Benveniste, M., Le Méttayer, D.: CASTING: a formally based software test generation method. In: The 1st International Conference on Formal Engineering Methods, IEEE, ICFEM’97, Hiroshima, Japan (1997)

  27. van Aertryck, L., Jensen, T.: Uml-casting: test synthesis from uml models using constraint resolution. In: Jézéquel, J-M. (ed.) Proc. Approches Formelles dans l’Assistance au Développement de Logiciels (AFADL’2003). INRIA (2003)

  28. Warmer J., Kleppe A.: The Object Constraint Language Second Edition: Getting Your Models Ready for MDA. Addison-Wesley, Boston (2003)

    Google Scholar 

  29. Weissleder, S., Schlingloff, B.-H.: Quality of automatically generated test cases based on ocl expressions. In: Proceedings of the 2008 International Conference on Software Testing, Verification, and Validation, pp. 517–520. IEEE Computer Society, Washington, DC (2008)

  30. Wittevrongel, J., Maurer, F.: Scentor: Scenario-based testing of e-business applications. In: WETICE ’01: Proceedings of the 10th IEEE International Workshops on Enabling Technologies, pp. 41–48, IEEE Computer Society, Washington, DC (2001)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Frédéric Dadeau.

Additional information

This article has been originally published in the ABZ’2008 conference [9] and presented as an invited talk to the VSTTE’2009 workshop. This version presents an extension and an improvement of the previous work, done on B machines, now adapted to the UML/OCL formalism.

This work was funded by the French ANR TASCCC project (ANR-09-SEGI-014).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Castillos, K.C., Dadeau, F. & Julliand, J. Scenario-based testing from UML/OCL behavioral models. Int J Softw Tools Technol Transfer 13, 431–448 (2011). https://doi.org/10.1007/s10009-011-0189-7

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-011-0189-7

Keywords