Skip to main content

Boosting Search Based Testing by Using Constraint Based Testing

  • Conference paper
Search Based Software Engineering (SSBSE 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7515))

Included in the following conference series:

Abstract

Search-Based Testing (SBT) uses an evolutionary algorithm to generate test cases. Traditionally, a random selection is used to generate an initial population and also, less often, during the evolution process. Such selection is likely to achieve lower coverage than a guided selection. We define two novel concepts: (1) a constrained population generator (CPG) that generates a diversified initial population that satisfies some test target constraints; and (2) a constrained evolution operator (CEO) that evolves test candidates according to some constraints of the test target. Either the CPG or CEO may substantially increase the chance of reaching adequate coverage with less effort. In this paper, we propose an approach that models a relaxed version of the unit under test as a constraint satisfaction problem. Based on this model and the test target, a CPG generates an initial population. Then, an evolutionary algorithm uses a CEO and this population to generate test input leading to the test target being covered. Our approach combines constraint-based testing (CBT) and SBT and overcomes the limitations associated with each of them. Using eToc, an open-source SBT tool, we implement a prototype of this approach. We present the empirical results of applying both CPG or CEO on three open-source programs and show that CPG or CEO improve SBT performance in terms of branch coverage by 11% while reducing computation time.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Baars, A., Harman, M., Hassoun, Y., Lakhotia, K., McMinn, P., Tonella, P., Vos, T.: Symbolic search-based testing. In: 26th IEEE/ACM International Conference on ASE, pp. 53 –62 (November 2011)

    Google Scholar 

  2. Clarke, L.: A system to generate test data and symbolically execute programs. IEEE Transactions on Software Engineering, SE 2(3), 215–222 (1976)

    Article  Google Scholar 

  3. Collavizza, H., Rueher, M., Hentenryck, P.V.: Cpbpv: a constraint-programming framework for bounded program verification. Constraints 15, 238–264 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  4. Godefroid, P., Klarlund, N., Sen, K.: Dart: directed automated random testing. SIGPLAN Not. 40, 213–223 (2005)

    Article  Google Scholar 

  5. Gotlieb, A.: Euclide: A constraint-based testing framework for critical c programs. In: ICST, pp. 151–160 (2009)

    Google Scholar 

  6. Ince, D.C.: The automatic generation of test data. The Computer Journal 30(1), 63–69 (1987)

    Article  MathSciNet  Google Scholar 

  7. Inkumsah, K., Xie, T.: Evacon: A framework for integrating evolutionary and concolic testing for object-oriented programs. In: Proc. 22nd IEEE/ACM ASE, pp. 425–428 (November 2007)

    Google Scholar 

  8. Khichane, M., Albert, P., Solnon, C.: Strong Combination of Ant Colony Optimization with Constraint Programming Optimization. In: Lodi, A., Milano, M., Toth, P. (eds.) CPAIOR 2010. LNCS, vol. 6140, pp. 232–245. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  9. Lakhotia, K., Tillmann, N., Harman, M., de Halleux, J.: FloPSy - Search-Based Floating Point Constraint Solving for Symbolic Execution. In: Petrenko, A., Simão, A., Maldonado, J.C. (eds.) ICTSS 2010. LNCS, vol. 6435, pp. 142–157. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  10. Malburg, J., Fraser, G.: Combining search-based and constraint-based testing. In: Proceedings of the 2011 International Symposium on Software Testing and Analysis, ISSTA 2011. ACM, New York (2011)

    Google Scholar 

  11. McMinn, P.: Search-based software test data generation: a survey. Software Testing Verification & Reliability 14, 105–156 (2004)

    Article  Google Scholar 

  12. Miller, W., Spooner, D.: Automatic generation of floating-point test data. IEEE Transactions on Software Engineering, SE 2(3), 223–226 (1976)

    Article  MathSciNet  Google Scholar 

  13. Myers, G.J.: The art of software testing. John Wiley and Sons (1979)

    Google Scholar 

  14. Păsăreanu, C.S., Rungta, N.: Symbolic pathfinder: symbolic execution of java bytecode. In: Proceedings of the IEEE/ACM International Conference on Automated Software Engineering, ASE 2010, pp. 179–180. ACM, New York (2010)

    Chapter  Google Scholar 

  15. Sakti, A., Guéhéneuc, Y.G., Pesant, G.: Cp-sst: approche basée sur la programmation par contraintes pour le test structurel du logiciel. In: Septitièmes Journées Francophones de Programmation par Contraintes (JFPC), pp. 289–298 (June 2011)

    Google Scholar 

  16. Sen, K., Agha, G.: CUTE and jCUTE: Concolic Unit Testing and Explicit Path Model-Checking Tools. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 419–423. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  17. Sen, K., Marinov, D., Agha, G.: Cute: a concolic unit testing engine for c. SIGSOFT Softw. Eng. Notes 30, 263–272 (2005)

    Article  Google Scholar 

  18. Staats, M., Pǎsǎreanu, C.: Parallel symbolic execution for structural test generation. In: Proceedings of the 19th international Symposium on Software Testing and Analysis, ISSTA 2010, pp. 183–194. ACM, New York (2010)

    Chapter  Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. Tonella, P.: Evolutionary testing of classes. SIGSOFT Softw. Eng. Notes 29(4), 119–128 (2004)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sakti, A., Guéhéneuc, YG., Pesant, G. (2012). Boosting Search Based Testing by Using Constraint Based Testing. In: Fraser, G., Teixeira de Souza, J. (eds) Search Based Software Engineering. SSBSE 2012. Lecture Notes in Computer Science, vol 7515. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33119-0_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-33119-0_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-33118-3

  • Online ISBN: 978-3-642-33119-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics