Skip to main content

An Application of Model Seeding to Search-Based Unit Test Generation forĀ Gson

  • Conference paper
  • First Online:
Search-Based Software Engineering (SSBSE 2020)

Abstract

Model seeding is a strategy for injecting additional information in a search-based test generation process in the form of models, representing usages of the classes of the software under test. These models are used during the search-process to generate logical sequences of calls whenever an instance of a specific class is required. Model seeding was originally proposed for search-based crash reproduction. We adapted it to unit test generation using EvoSuite and applied it to Gson, a Java library to convert Java objects from and to JSON. Although our study shows mixed results, it identifies potential future research directions.

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 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.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

Notes

  1. 1.

    https://github.com/google/gson.

  2. 2.

    https://github.com/STAMP-project/evosuite-ramp.

  3. 3.

    https://www.codemr.co.uk.

References

  1. Coles, H., Laurent, T., Henard, C., Papadakis, M., Ventresque, A.: PIT: a practical mutation testing tool for Java. In: ISSTA 2016, pp. 449ā€“452. ACM (2016). https://doi.org/10.1145/2931037.2948707

  2. Daka, E., Campos, J., Fraser, G., Dorn, J., Weimer, W.: Modeling readability to improve unit tests. pp. 107ā€“118 (2015). https://doi.org/10.1145/2786805.2786838

  3. Derakhshanfar, P., Devroey, X., Perrouin, G., Zaidman, A., Deursen, A.: Search-based crash reproduction using behavioural model seeding. Softw. Test. Verif. Reliab. 30(3), e1733 (2020). https://doi.org/10.1002/stvr.1733

    ArticleĀ  Google ScholarĀ 

  4. Derakhshanfar, P., Olsthoorn, M., Devroey, X.: Replication package of An Application of Model Seeding to Search-based Unit Test Generation for Gson (2020). https://doi.org/10.5281/zenodo.3963956

  5. Fraser, G., Arcuri, A.: EvoSuite: automatic test suite generation for object-oriented software. In: ESEC/FSE 2011, p. 416. ACM (2011). https://doi.org/10.1145/2025113.2025179

  6. Panichella, A., Kifetew, F.M., Tonella, P.: Automated test case generation as a many-objective optimisation problem with dynamic selection of the targets. IEEE Trans. Softw. Eng. 44(2), 122ā€“158 (2018). https://doi.org/10.1109/TSE.2017.2663435

    ArticleĀ  Google ScholarĀ 

  7. Rojas, J.M., Fraser, G., Arcuri, A.: Seeding strategies in search-based unit test generation. Softw. Test. Verif. Reliab. 26(5), 366ā€“401 (2016). https://doi.org/10.1002/stvr.1601d

    ArticleĀ  Google ScholarĀ 

Download references

Acknowledgement

This research was partially funded by the EU Horizon 2020 ICT-10-2016-RIA ā€œSTAMPā€ project (No. 731529).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mitchell Olsthoorn .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

Ā© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Olsthoorn, M., Derakhshanfar, P., Devroey, X. (2020). An Application of Model Seeding to Search-Based Unit Test Generation forĀ Gson. In: Aleti, A., Panichella, A. (eds) Search-Based Software Engineering. SSBSE 2020. Lecture Notes in Computer Science(), vol 12420. Springer, Cham. https://doi.org/10.1007/978-3-030-59762-7_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-59762-7_17

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-59761-0

  • Online ISBN: 978-3-030-59762-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics