Skip to main content

Towards a Framework for Constraint-Based Test Case Generation

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6037))

Abstract

In this paper, we propose an approach for automated test case generation based on techniques from constraint programming (CP). We advocate the use of standard CP search strategies in order to express preferences on the generated test cases and to obtain the desired degree of coverage. We develop our framework in the concrete context of an imperative language and show that the technique is sufficiently powerful to deal with arbitrary pointer-based data-structures allocated on the heap.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Albert, E., Gómez-Zamalloa, M., Puebla, G.: Test data generation of bytecode by clp partial evaluation, pp. 4–23 (2009)

    Google Scholar 

  2. Ambert, F., Bouquet, F., Chemin, S., Guenaud, S., Legeard, B., Peureux, F., Utting, M., Vacelet, N.: BZ-testing-tools: A tool-set for test generation from Z and B using constraint logic programming. In: Proceedings of FATES 2002, pp. 105–120, August 2002, Technical Report, INRIA (2002)

    Google Scholar 

  3. Bird, D.L., Munoz, C.U.: Automatic generation of random self-checking test cases. IBM Syst. J. 22(3), 229–245 (1983)

    Article  Google Scholar 

  4. Chilenski, J.J., Miller, S.P.: Applicability of modified condition/decision coverage to software testing. Software Engineering Journal 9(5), 193–200 (1994)

    Article  Google Scholar 

  5. Clarke, L.A.: A system to generate test data and symbolically execute programs. IEEE Trans. Softw. Eng. 2(3), 215–222 (1976)

    Article  Google Scholar 

  6. DeMillo, R.A.: Test adequacy and program mutation. In: 11th International Conference on Software Engineering, May 1989, pp. 355–356 (1989)

    Google Scholar 

  7. DeMillo, R.A., Offutt, A.J.: Constraint-based automatic test data generation. IEEE Transactions on Software Engineering 17(9), 900–910 (1991)

    Article  Google Scholar 

  8. Duran, J.W., Ntafos, S.C.: An evaluation of random testing. IEEE Trans. Software Eng. 10(4), 438–444 (1984)

    Article  Google Scholar 

  9. Ferguson, R., Korel, B.: The chaining approach for software test data generation. ACM Trans. Softw. Eng. Methodol. 5(1), 63–86 (1996)

    Article  Google Scholar 

  10. Frühwirth, T.: Theory and practice of Constraint Handling Rules. J. Logic Programming, Special Issue on Constraint Logic Programming 37(1-3), 95–138 (1998)

    MATH  Google Scholar 

  11. Gotlieb, A., Botella, B., Rueher, M.: Automatic test data generation using constraint solving techniques. SIGSOFT Softw. Eng. Notes 23(2), 53–62 (1998)

    Article  Google Scholar 

  12. Gotlieb, A., Botella, B., Rueher, M.: A clp framework for computing structural test data. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 399–413. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  13. Gotlieb, A., Denmat, T., Botella, B.: Goal-oriented test data generation for programs with pointer variables. Computer Software and Applications Conference, Annual International 1, 449–454 (2005)

    Article  Google Scholar 

  14. Gupta, N., Mathur, A.P., Soffa, M.L.: Automated test data generation using an iterative relaxation method. SIGSOFT Softw. Eng. Notes 23(6), 231–244 (1998)

    Article  Google Scholar 

  15. King, J.C.: Symbolic execution and program testing. ACM Commun. 19(7), 385–394 (1976)

    Article  MATH  Google Scholar 

  16. Legeard, B., Peureux, F., Utting, M.: Automated boundary testing from Z and B. In: Eriksson, L.-H., Lindsay, P.A. (eds.) FME 2002. LNCS, vol. 2391, pp. 21–40. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  17. Meudec, C.: Atgen: automatic test data generation using constraint logic programming and symbolic executionatgen. Software Testing Verification and Reliability 11(2), 81–96 (2001)

    Article  Google Scholar 

  18. Müller, R.A., Lembeck, C., Kuchen, H.: A symbolic java virtual machine for test case generation. In: IASTED Conf. on Software Engineering, pp. 365–371 (2004)

    Google Scholar 

  19. Offutt, A.J., Jin, Z., Pan, J.: The dynamic domain reduction procedure for test data generation: Design and algorithms. Software - Practice and Experience 29, 167–193 (1994)

    Article  Google Scholar 

  20. Offutt, A.J., Liu, S.: Generating test data from sofl specifications. The Journal of Systems and Software 49, 49–62 (1999)

    Article  Google Scholar 

  21. Visser, W., Păsăreanu, C.S., Khurshid, S.: Test input generation with Java pathfinder. SIGSOFT Softw. Eng. Notes 29(4), 97–107 (2004)

    Article  Google Scholar 

  22. Zhu, H., Hall, P., May, J.: Software unit test coverage and adequacy. ACM Computing Surveys 29(4) (1997)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Degrave, F., Schrijvers, T., Vanhoof, W. (2010). Towards a Framework for Constraint-Based Test Case Generation. In: De Schreye, D. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2009. Lecture Notes in Computer Science, vol 6037. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12592-8_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-12592-8_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-12591-1

  • Online ISBN: 978-3-642-12592-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics