A Specification-Based Test Case Generation Method for UML/OCL

  • Achim D. Brucker
  • Matthias P. Krieger
  • Delphine Longuet
  • Burkhart Wolff
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6627)


Automated test data generation is an important method for the verification and validation of UML/OCL specifications. In this paper, we present an extension of DNF-based test case generation methods to class models and recursive query operations on them. A key feature of our approach is an implicit representation of object graphs avoiding a representation based on object-id’s; thus, our approach avoids the generation of isomorphic object graphs by using a concise and still human-readable symbolic representation.


OCL UML test case generation specification-based testing 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    van Aertryck, L., Jensen, T.: UML-CASTING: Test synthesis from UML models using constraint resolution. In: Jézéquel, J.M. (ed.) AFADL 2003 (2003)Google Scholar
  2. 2.
    Aichernig, B.K., Pari Salas, P.A.: Test case generation by ocl mutation and constraint solving. In: QSIC 2005, pp. 64–71. IEEE Computer Society, Los Alamitos (2005)Google Scholar
  3. 3.
    Anand, S., Păsăreanu, C.S., Visser, W.: JPF–SE: A Symbolic Execution Extension to Java PathFinder. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 134–138. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  4. 4.
    Benattou, M., Bruel, J.M., Hameurlain, N.: Generating test data from ocl specication. In: WITUML (2002)Google Scholar
  5. 5.
    Boyapati, C., Khurshid, S., Marinov, D.: Korat: automated testing based on Java predicates. In: ISSTA, pp. 123–133 (2002)Google Scholar
  6. 6.
    Brucker, A.D., Doser, J., Wolff, B.: An mda framework supporting ocl. Electronic Communications of the easst 5 (2006)Google Scholar
  7. 7.
    Brucker, A.D., Krieger, M.P., Wolff, B.: Extending ocl with null-references. In: Ghosh, S. (ed.) MODELS 2009. LNCS, vol. 6002, pp. 261–275. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  8. 8.
    Brucker, A.D., Wolff, B.: hol-ocl: A Formal Proof Environment for uml/ocl. In: Fiadeiro, J.L., Inverardi, P. (eds.) FASE 2008. LNCS, vol. 4961, pp. 97–100. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  9. 9.
    Brucker, A.D., Wolff, B.: An extensible encoding of object-oriented data models in HOL. Journal of Automated Reasoning 41, 219–249 (2008)CrossRefzbMATHGoogle Scholar
  10. 10.
    Brucker, A.D., Wolff, B.: hol-TestGen: an interactive test-case generation framework. In: Chechik, M., Wirsing, M. (eds.) FASE 2009. LNCS, vol. 5503, pp. 417–420. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  11. 11.
    Brucker, A.D., Wolff, B.: Semantics, calculi, and analysis for object-oriented specifications. Acta Informatica 46(4), 255–284 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Church, A.: A formulation of the simple theory of types. Journal of Symbolic Logic 5(2), 56–68 (1940)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Dick, J., Faivre, A.: Automating the generation and sequencing of test cases from model-based specifications. In: Larsen, P.G., Woodcock, J.C.P. (eds.) FME 1993. LNCS, vol. 670, pp. 268–284. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  14. 14.
    Gogolla, M., Hamann, L., Kuhlmann, M.: Proving and visualizing ocl invariant independence by automatically generated test cases. In: Fraser, G., Gargantini, A. (eds.) TAP 2010. LNCS, vol. 6143, pp. 38–54. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  15. 15.
    Gogolla, M., Richters, M.: Expressing uml class diagrams properties with ocl. In: Clark, A., Warmer, J. (eds.) Object Modeling with the ocl. LNCS, vol. 2263, pp. 85–114. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  16. 16.
    Li, B.L., shu Li, Z., Qing, L., Chen, Y.H.: Test case automate generation from uml sequence diagram and ocl expression. In: Computational Intelligence and Security, pp. 1048–1052. IEEE Computer Society, Los Alamitos (2007)Google Scholar
  17. 17.
    de Moura, L., Bjørner, N.S.: Z3: An efficient smt solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  18. 18.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/hol—A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  19. 19.
    Noikajana, S., Suwannasart, T.: An improved test case generation method for Web service testing from wsdl-s and ocl with pair-wise testing technique, pp. 115–123. IEEE Computer Society, Los Alamitos (2009)Google Scholar
  20. 20.
    Object Management Group: uml 2.2 ocl specification (2010), Available as omg document formal/2010-02-01Google Scholar
  21. 21.
    Tillmann, N., de Halleux, J.: Pex–white box test generation for.NET. In: Beckert, B., Hähnle, R. (eds.) TAP 2008. LNCS, vol. 4966, pp. 134–153. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  22. 22.
    Torlak, E., Jackson, D.: Kodkod: A relational model finder. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 632–647. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  23. 23.
    Visser, W., Havelund, K., Brat, G.P., Park, S., Lerda, F.: Model checking programs. Autom. Softw. Eng. 10(2), 203–232 (2003)CrossRefGoogle Scholar
  24. 24.
    Weissleder, S., Schlingloff, B.H.: Quality of automatically generated test cases based on ocl expressions. In: ICST, pp. 517–520. IEEE Computer Society, Los Alamitos (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Achim D. Brucker
    • 1
  • Matthias P. Krieger
    • 2
    • 3
  • Delphine Longuet
    • 2
    • 3
  • Burkhart Wolff
    • 2
    • 3
  1. 1.SAP ResearchKarlsruheGermany
  2. 2.Univ. Paris-Sud, LRI UMR8623OrsayFrance
  3. 3.CNRSOrsayFrance

Personalised recommendations