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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
ProTest project, http://www.protest-project.eu/
Cesarini, F., Thompson, S.: Erlang Programming. O’Reilly Media, Inc., Sebastopol (2009)
Carlsson, R., Rémond, M.: EUnit, http://svn.process-one.net/contribs/trunk/eunit/doc/overview-summary.html
Common Test, http://www.erlang.org/doc/apps/common_test/index.html
Arts, T., et al.: Testing Telecoms Software with Quviq QuickCheck. In: Proceedings of the Fifth ACM SIGPLAN Erlang Workshop. ACM Press, New York (2006)
Li, H., Thompson, S., Orosz, G., Töth, M.: Refactoring with Wrangler, updated. In: ACM SIGPLAN Erlang Workshop 2008, Victoria, British Columbia, Canada (2008)
Plotkin, G.D.: A note on inductive generalisation. Machine Intelligence 5 (1970)
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)
Li, H., et al.: Improving your test code with Wrangler. Technical Report 4-09, School of Computing, University of Kent (2009)
Li, H., Thompson, S.: Testing-framework-aware Refactoring. In: Third ACM Workshop on Refactoring Tools, ACM Digital Library (2009) (to appear)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)