Skip to main content

Improved Testing through Refactoring: Experience from the ProTest Project

  • Conference paper
Testing – Practice and Research Techniques (TAIC PART 2010)

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

  • 749 Accesses

Abstract

We report on how the Wrangler refactoring tool has been used to improve and transform test code for Erlang systems. This has been achieved through the removal of code clones, the identification of properties for property-based testing and the definition of testing-aware refactorings and test-framework-specific refactorings. While some of the observations are Erlang-specific, others apply to test code in general.

We argue that refactoring is particularly valuable within testing. The Wrangler tool for Erlang provides support for clone detection and removal, and this has been used effectively both for clarifying test code and in extracting higher-level properties from test suites. We also report on refactorings within particular test frameworks, and on the constraints on refactorings that test frameworks impose.

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. ProTest project, http://www.protest-project.eu/

  2. Cesarini, F., Thompson, S.: Erlang Programming. O’Reilly Media, Inc., Sebastopol (2009)

    MATH  Google Scholar 

  3. Carlsson, R., Rémond, M.: EUnit, http://svn.process-one.net/contribs/trunk/eunit/doc/overview-summary.html

  4. Common Test, http://www.erlang.org/doc/apps/common_test/index.html

  5. Arts, T., et al.: Testing Telecoms Software with Quviq QuickCheck. In: Proceedings of the Fifth ACM SIGPLAN Erlang Workshop. ACM Press, New York (2006)

    Google Scholar 

  6. Li, H., Thompson, S., Orosz, G., Töth, M.: Refactoring with Wrangler, updated. In: ACM SIGPLAN Erlang Workshop 2008, Victoria, British Columbia, Canada (2008)

    Google Scholar 

  7. Plotkin, G.D.: A note on inductive generalisation. Machine Intelligence 5 (1970)

    Google Scholar 

  8. Li, H., Thompson, S.: Similar Code Detection and Elimination for Erlang Programs. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 104–118. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  9. Li, H., et al.: Improving your test code with Wrangler. Technical Report 4-09, School of Computing, University of Kent (2009)

    Google Scholar 

  10. Li, H., Thompson, S.: Testing-framework-aware Refactoring. In: Third ACM Workshop on Refactoring Tools, ACM Digital Library (2009) (to appear)

    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

Li, H., Thompson, S. (2010). Improved Testing through Refactoring: Experience from the ProTest Project. In: Bottaci, L., Fraser, G. (eds) Testing – Practice and Research Techniques. TAIC PART 2010. Lecture Notes in Computer Science, vol 6303. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-15585-7_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-15585-7_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-15584-0

  • Online ISBN: 978-3-642-15585-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics