Resource-Driven CLP-Based Test Case Generation

  • Elvira Albert
  • Miguel Gómez-Zamalloa
  • José Miguel Rojas
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7225)


Test Data Generation (TDG) aims at automatically obtaining test inputs which can then be used by a software testing tool to validate the functional behaviour of the program. In this paper, we propose resource-aware TDG, whose purpose is to generate test cases (from which the test inputs are obtained) with associated resource consumptions. The framework is parametric w.r.t. the notion of resource (it can measure memory, steps, etc.) and allows using software testing to detect bugs related to non-functional aspects of the program. As a further step, we introduce resource-driven TDG whose purpose is to guide the TDG process by taking resource consumption into account. Interestingly, given a resource policy, TDG is guided to generate test cases that adhere to the policy and avoid the generation of test cases which violate it.


Resource Consumption Cost Model Coverage Criterion Symbolic Execution Test Case Generation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: Cost Analysis of Java Bytecode. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 157–172. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  2. 2.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: Removing useless variables in cost analysis of java bytecode. In: SAC 2008. ACM (2008)Google Scholar
  3. 3.
    Albert, E., Genaim, S., Gómez-Zamalloa, M.: Heap Space Analysis for Java Bytecode. In: Proc. of ISMM 2007. ACM Press (2007)Google Scholar
  4. 4.
    Albert, E., Gómez-Zamalloa, M., Puebla, G.: PET: A Partial Evaluation-based Test Case Generation Tool for Java Bytecode. In: Proc. of. PEPM 2010. ACM Press (2010)Google Scholar
  5. 5.
    Albert, E., Gómez-Zamalloa, M., Rojas, J.M., Puebla, G.: Compositional CLP-Based Test Data Generation for Imperative Languages. In: Alpuente, M. (ed.) LOPSTR 2010. LNCS, vol. 6564, pp. 99–116. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  6. 6.
    Antunes, J., Neves, N.F., Veríssimo, P.: Detection and prediction of resource-exhaustion vulnerabilities. In: Proc. of ISSRE 2008. IEEE Computer Society (2008)Google Scholar
  7. 7.
    Clarke, L.A.: A System to Generate Test Data and Symbolically Execute Programs. IEEE Transactions on Software Engineering 2(3), 215–222 (1976)CrossRefGoogle Scholar
  8. 8.
    Engel, C., Hähnle, R.: Generating Unit Tests from Formal Proofs. In: Gurevich, Y., Meyer, B. (eds.) TAP 2007. LNCS, vol. 4454, pp. 169–188. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  9. 9.
    Fischer, S., Kuchen, H.: Systematic generation of glass-box test cases for functional logic programs. In: Proc. of PPDP 2007. ACM (2007)Google Scholar
  10. 10.
    Gómez-Zamalloa, M., Albert, E., Puebla, G.: Decompilation of Java Bytecode to Prolog by Partial Evaluation. JIST 51, 1409–1427 (2009)Google Scholar
  11. 11.
    Gómez-Zamalloa, M., Albert, E., Puebla, G.: Test Case Generation for Object-Oriented Imperative Languages in CLP. In: TPLP, ICLP 2010 Special Issue (2010)Google Scholar
  12. 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)CrossRefGoogle Scholar
  13. 13.
    Holzer, A., Januzaj, V., Kugele, S.: Towards resource consumption-aware programming. In: Proc. of ICSEA 2009. IEEE Computer Society (2009)Google Scholar
  14. 14.
    King, J.C.: Symbolic Execution and Program Testing. Communications of the ACM 19(7), 385–394 (1976)zbMATHCrossRefGoogle Scholar
  15. 15.
    Leuschel, M., Sørensen, M.H.: Redundant Argument Filtering of Logic Programs. In: Gallagher, J.P. (ed.) LOPSTR 1996. LNCS, vol. 1207, pp. 83–103. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  16. 16.
    Leuschel, M., Vidal, G.: Forward Slicing by Conjunctive Partial Deduction and Argument Filtering. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 61–76. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  17. 17.
    Meudec, C.: Atgen: Automatic test data generation using constraint logic programming and symbolic execution. Softw. Test., Verif. Reliab. 11(2), 81–96 (2001)CrossRefGoogle Scholar
  18. 18.
    Müller, R.A., Lembeck, C., Kuchen, H.: A symbolic java virtual machine for test case generation. In: IASTED Conf. on Software Engineering (2004)Google Scholar
  19. 19.
    Rungta, N., Mercer, E.G., Visser, W.: Efficient Testing of Concurrent Programs with Abstraction-Guided Symbolic Execution. In: Păsăreanu, C.S. (ed.) SPIN 2009. LNCS, vol. 5578, pp. 174–191. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  20. 20.
    Degrave, F., Schrijvers, T., Vanhoof, W.: Towards a Framework for Constraint-Based Test Case Generation. In: De Schreye, D. (ed.) LOPSTR 2009. LNCS, vol. 6037, pp. 128–142. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  21. 21.
    Zhang, J., Cheung, S.C.: Automated test case generation for the stress testing of multimedia systems. Softw., Pract. Exper. 32(15), 1411–1435 (2002)zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Elvira Albert
    • 1
  • Miguel Gómez-Zamalloa
    • 1
  • José Miguel Rojas
    • 2
  1. 1.DSICComplutense University of MadridMadridSpain
  2. 2.Technical University of MadridMadridSpain

Personalised recommendations