Skip to main content

Using Search-Based Test Generation to Discover Real Faults in Guava

  • Conference paper
  • First Online:

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

Abstract

Testing costs can be reduced through automated unit test generation. An important benchmark for such tools is their ability to detect real faults. Fault databases, such as Defects4J, assist in this task. The Guava project—a collection of Java libraries from Google—offers an opportunity to expand such databases with additional complex faults. We have identified 11 faults in the Guava project, added them to Defects4J, and assessed the ability of the EvoSuite framework to detect these faults. Ultimately, EvoSuite was able to detect three faults. Analysis of the remaining faults offers lessons in how to improve generation tools. We offer these faults to the community to assist future benchmarking efforts.

This work is supported by National Science Foundation grant CCF-1657299.

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 EPUB and 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

Notes

  1. 1.

    https://github.com/google/guava.

  2. 2.

    Two faults were omitted from the case study as they require the use of JDK 7 (see Sect. 2).

  3. 3.

    Available from http://defects4j.org.

  4. 4.

    This process is documented in more detail in [7] and [4].

  5. 5.

    https://github.com/google/guava/commit/1b1163b7e2c121d4a5b25b8966714201551976c4.

  6. 6.

    https://github.com/google/guava/commit/c6e21a35f3113a7a952a9615a0e92dcf1dd4bfb3.

  7. 7.

    https://github.com/google/guava/commit/44a2592b04490ad26d2bc874f9dbd4c1146cc5de.

  8. 8.

    https://github.com/google/guava/commit/55524c66de8db4c2e44727b69421c7d0e4f30be0.

  9. 9.

    https://github.com/google/guava/commit/1a1b97ee1f065d0bc52c91eeeb6407bfaa6cbea1.

  10. 10.

    https://github.com/google/guava/commit/0a686a644ca5cefb9e7bf4a38b34bf4ede9e75aa.

  11. 11.

    https://github.com/google/guava/commit/52b5ee640da780e0fd2502ec995436fcdc93e03e.

  12. 12.

    https://github.com/google/guava/commit/2ef955163b3d43e7849c1929ef4e5d714b93da96.

References

  1. Feldt, R., Poulding, S.: Finding test data with specific properties via metaheuristic search. In: 2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE), pp. 350–359, November 2013

    Google Scholar 

  2. Fraser, G., Arcuri, A.: Automated test generation for java generics. In: Winkler, D., Biffl, S., Bergsmann, J. (eds.) SWQD 2014. LNBIP, vol. 166, pp. 185–198. Springer, Cham (2014). doi:10.1007/978-3-319-03602-1_12

    Chapter  Google Scholar 

  3. Fraser, G., Staats, M., McMinn, P., Arcuri, A., Padberg, F.: Does automated white-box test generation really help software testers? In: Proceedings of the 2013 International Symposium on Software Testing and Analysis, ISSTA, pp. 291–301. ACM, New York (2013). http://doi.acm.org/10.1145/2483760.2483774

  4. Gay, G.: The fitness function for the job: search-based generation of test suites that detect real faults. In: Proceedings of the International Conference on Software Testing, ICST 2017. IEEE (2017)

    Google Scholar 

  5. Gay, G.: Generating effective test suites by combining coverage criteria. In: Menzies, T., Petke, J. (eds.) SSBSE 2017. LNCS, vol. 10452, pp. 65–82. Springer, Cham (2017)

    Google Scholar 

  6. Just, R., Jalali, D., Ernst, M.D.: defects4J: a database of existing faults to enable controlled testing studies for Java programs. In: Proceedings of the 2014 International Symposium on Software Testing and Analysis, ISSTA 2014, pp. 437–440. ACM, New York (2014). http://doi.acm.org/10.1145/2610384.2628055

  7. Shamshiri, S., Just, R., Rojas, J.M., Fraser, G., McMinn, P., Arcuri, A.: Do automatically generated unit tests find real faults? an empirical study of effectiveness and challenges. In: Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), ASE 2015. ACM, New York (2015)

    Google Scholar 

  8. Weiss, T.: We analyzed 30,000 GitHub projects - here are the top. 100 libraries in Java, JS and Ruby (2013). http://blog.takipi.com/we-analyzed-30000-github-projects-here-are-the-top-100-libraries-in-java-js-and-ruby/

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gregory Gay .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Almulla, H., Salahirad, A., Gay, G. (2017). Using Search-Based Test Generation to Discover Real Faults in Guava. In: Menzies, T., Petke, J. (eds) Search Based Software Engineering. SSBSE 2017. Lecture Notes in Computer Science(), vol 10452. Springer, Cham. https://doi.org/10.1007/978-3-319-66299-2_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-66299-2_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-66298-5

  • Online ISBN: 978-3-319-66299-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics