Skip to main content

DyGen: Automatic Generation of High-Coverage Tests via Mining Gigabytes of Dynamic Traces

  • Conference paper
Tests and Proofs (TAP 2010)

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

Included in the following conference series:

Abstract

Unit tests of object-oriented code exercise particular sequences of method calls. A key problem when automatically generating unit tests that achieve high structural code coverage is the selection of relevant method-call sequences, since the number of potentially relevant sequences explodes with the number of methods. To address this issue, we propose a novel approach, called DyGen, that generates tests via mining dynamic traces recorded during program executions. Typical program executions tend to exercise only happy paths that do not include error-handling code, and thus recorded traces often do not achieve high structural coverage. To increase coverage, DyGen transforms traces into parameterized unit tests (PUTs) and uses dynamic symbolic execution to generate new unit tests for the PUTs that can achieve high structural code coverage. In this paper, we show an application of DyGen by automatically generating regression tests on a given version of software.

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. Inkumsah, K., Xie, T.: Improving structural testing of object-oriented programs via integrating evolutionary testing and symbolic execution. In: 23rd IEEE/ACM International Conference on Automated Software Engineering, Washington, DC, USA, pp. 297–306. IEEE Computer Society Press, Los Alamitos (2008)

    Chapter  Google Scholar 

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

    Article  Google Scholar 

  3. Csallner, C., Smaragdakis, Y.: JCrasher: An automatic robustness tester for Java. Softw. Pract. Exper. 34(11), 1025–1050 (2004)

    Article  Google Scholar 

  4. Parasoft: Jtest manuals version 5.1. Online manual (2006), http://www.parasoft.com

  5. Pacheco, C., Lahiri, S.K., Ernst, M.D., Ball, T.: Feedback-directed random test generation. In: 29th International Conference on Software Engineering, Minneapolis, MN, USA, pp. 75–84. IEEE Computer Society, Los Alamitos (2007)

    Chapter  Google Scholar 

  6. Tillmann, N., Schulte, W.: Parameterized unit tests. SIGSOFT Softw. Eng. Notes 30(5), 253–262 (2005)

    Article  Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

  9. King, J.C.: Symbolic execution and program testing. Communications of the ACM 19(7), 385–394 (1976)

    Article  MATH  Google Scholar 

  10. Sen, K., Marinov, D., Agha, G.: Cute: A concolic unit testing engine for C. SIGSOFT Softw. Eng. Notes 30(5), 263–272 (2005)

    Article  Google Scholar 

  11. 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 

  12. Rosenblum, D.S., Weyuker, E.J.: Predicting the cost-effectiveness of regression testing strategies. SIGSOFT Softw. Eng. Notes 21(6), 118–126 (1996)

    Article  Google Scholar 

  13. Z3: An efficient SMT solver (2010), http://research.microsoft.com/en-us/um/redmond/projects/z3/

  14. Saff, D., Artzi, S., Perkins, J.H., Ernst, M.D.: Automatic test factoring for Java. In: 20th International Conference on Automated Software Engineering, pp. 114–123. ACM, New York (2005)

    Google Scholar 

  15. Godefroid, P., Levin, M.Y., Molnar, D.: Automated whitebox fuzz testing. In: 16th Annual Network & Distributed System Security Symposium, Internet Society (2008)

    Google Scholar 

  16. Elbaum, S., Chin, H.N., Dwyer, M.B., Dokulil, J.: Carving differential unit test cases from system test cases. In: 14th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 253–264. ACM, New York (2006)

    Chapter  Google Scholar 

  17. Orso, A., Kennedy, B.: Selective capture and replay of program executions. SIGSOFT Softw. Eng. Notes 30(4), 1–7 (2005)

    Article  Google Scholar 

  18. Xie, T.: Augmenting automatically generated unit-test suites with regression oracle checking. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 380–403. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  19. DeMillo, R.A., Offutt, A.J.: Constraint-based automatic test data generation. IEEE Trans. Softw. Eng. 17(9), 900–910 (1991)

    Article  Google Scholar 

  20. Taneja, K., Xie, T.: DiffGen: Automated regression unit-test generation. In: 23rd IEEE/ACM International Conference on Automated Software Engineering, Washington, DC, USA, pp. 407–410. IEEE Computer Society Press, Los Alamitos (2008)

    Chapter  Google Scholar 

  21. Evans, R.B., Savoia, A.: Differential testing: A new approach to change detection. In: 6th Joint Meeting on European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 549–552. ACM, New York (2007)

    Chapter  Google Scholar 

  22. Pacheco, C., Ernst, M.D.: Eclat: Automatic generation and classification of test inputs. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 504–527. Springer, Heidelberg (2005)

    Google Scholar 

  23. Xie, T., Marinov, D., Notkin, D.: Rostra: A framework for detecting redundant object-oriented unit tests. In: 19th IEEE International Conference on Automated Software Engineering, Washington, DC, USA, pp. 196–205. IEEE Computer Society, Los Alamitos (2004)

    Google Scholar 

  24. Engler, D., Chen, D.Y., Hallem, S., Chou, A., Chelf, B.: Bugs as deviant behavior: A general approach to inferring errors in systems code. In: 18th ACM Symposium on Operating Systems Principles, pp. 57–72. ACM, New York (2001)

    Google Scholar 

  25. Wasylkowski, A., Zeller, A., Lindig, C.: Detecting object usage anomalies. In: 6th joint meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 35–44. ACM, New York (2007)

    Chapter  Google Scholar 

  26. Thummalapenta, S., Xie, T., Tillmann, N., de Halleux, J., Schulte, W.: MSeqGen: Object-oriented unit-test generation via mining source code. In: 7th joint meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 193–202. ACM, New York (2009)

    Chapter  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

Thummalapenta, S., de Halleux, J., Tillmann, N., Wadsworth, S. (2010). DyGen: Automatic Generation of High-Coverage Tests via Mining Gigabytes of Dynamic Traces. In: Fraser, G., Gargantini, A. (eds) Tests and Proofs. TAP 2010. Lecture Notes in Computer Science, vol 6143. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13977-2_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-13977-2_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-13976-5

  • Online ISBN: 978-3-642-13977-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics