A Constraint Logic Programming Approach to Automated Testing

  • Hakim Belhaouari
  • Frédéric Peschanski
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5366)

Abstract

In this paper we present a new constraint solver for the automated generation of test cases from specifications. The specification language is inspired by the contract-oriented programming extended with a finite state machines. Beyond the generation of correct argument values for method calls, we generate full test scenarios thanks to the symbolic animation of the specifications. We propose a flexible CSP architecture that can operate not only on integer or bounded domains but also on arbitrary types. An original notion of type builder is used to establish the link between the type semantics and the CSP framework. We illustrate this with a string builder that can automatically generate string instances depending on combinations of constraints.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Myers, G.J.: Art of Software Testing. John Wiley & Sons, Inc., New York (1979)MATHGoogle Scholar
  2. 2.
    Utting, M., Legeard, B.: Practical Model-Based Testing: A Tools Approach, 1st edn. Morgan Kaufmann, San Francisco (2006)Google Scholar
  3. 3.
    Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall, Englewood Cliffs (1997)MATHGoogle Scholar
  4. 4.
    Kumar, V.: Algorithms for constraint-satisfaction problems: A survey. AI Magazine 13, 32–44 (1992)Google Scholar
  5. 5.
    Boyapati, C., Khurshid, S., Marinov, D.: Korat: Automated testing based on java predicates (2002)Google Scholar
  6. 6.
    Oriat, C.: Jartege: A tool for random generation of unit tests for java classes. In: Reussner, R., Mayer, J., Stafford, J.A., Overhage, S., Becker, S., Schroeder, P.J. (eds.) QoSA 2005 and SOQUA 2005. LNCS, vol. 3712, pp. 242–256. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  7. 7.
    Golden, K., Pang, W.: Constraint reasoning over strings. In: Rossi, F. (ed.) CP 2003. LNCS, vol. 2833, pp. 377–391. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Ambert, F., Bouquet, F., Legeard, B., Peureux, F.: Automated boundary-value test generation from specifications - method and tools. In: ICSTEST 2003, Cologne, Allemagne, pp. 52–68 (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Hakim Belhaouari
    • 1
  • Frédéric Peschanski
    • 1
  1. 1.Laboratoire d’Informatique de Paris 6UPMC Paris UniversitasParisFrance

Personalised recommendations