Skip to main content

Automated Generation of Unit Tests for Refactoring

  • Conference paper
Extreme Programming and Agile Processes in Software Engineering (XP 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3092))

Abstract

The key issue for effective refactoring is to ensure that observable behavior of the code will not change. Use of regression tests is the suggested method for verifying this property, but they appear to be not well suited for applying refactorings. The tests verify the domain-specific code relations, and often neglect properties important for the given refactoring or check the ones that actually change. In the paper we present a concept of generic refactoring tests, which are oriented toward the refactorings rather than the code. They can be generated automatically, are able to adapt to changes introduced by refactorings and learn the specifics of the tested code.

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. Beck, K.: Extreme Programming Explained. Embrace Change. Addison-Wesley, Reading (2000)

    Google Scholar 

  2. Beck, K., Gamma, E.: Test infected: Programmers love writing tests. Java Report 3(7), 51–56 (1998)

    Google Scholar 

  3. Fowler, M.: Refactoring, Improving the Design of Existing Code. Addison-Wesley, Reading (1999)

    Google Scholar 

  4. Gamma, E., et al.: Design Patterns, Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)

    Google Scholar 

  5. Walter, B.: Extending Testability for Automated Refactoring. In: Marchesi, M., Succi, G. (eds.) XP 2003. LNCS, vol. 2675, pp. 429–430. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Walter, B., Pietrzak, B. (2004). Automated Generation of Unit Tests for Refactoring. In: Eckstein, J., Baumeister, H. (eds) Extreme Programming and Agile Processes in Software Engineering. XP 2004. Lecture Notes in Computer Science, vol 3092. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24853-8_25

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24853-8_25

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22137-1

  • Online ISBN: 978-3-540-24853-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics