Skip to main content

Towards an Extensible Architecture for Refactoring Test Code

  • Conference paper
  • First Online:
Computational Science and Its Applications – ICCSA 2019 (ICCSA 2019)

Abstract

As the software evolves, new codes are written, and many other codes are refactored. Refactoring also involves the test code, to ensure that it continues performed, and adequately verifying the behavior of the software. This work proposes the creation of an extensible architecture named EARTC to perform refactoring safely in test code. The coding of a specific refactoring for the test code is hampered by coupling to the unit testing automation framework so that it becomes desirable to eliminate this coupling from the refactoring code. The architecture proposed in this work implements extension points, which allows refactoring to be performed regardless of the test framework to be used, that is, other refactorings can be added to the architecture without the need to change the test code. Additionally, the architecture enables other testing frameworks to be coupled without interfering with their internal structure. To validate the independence among architecture modules, a Design Structure Matrix was done, which shows that the objectives were achieved. Also, to analyze the results of the proposed architecture in an experiment, a tool called Neutrino was implemented. The results obtained with Neutrino are satisfactory and show that the architecture meets the objectives described for the accomplishment of this work.

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

References

  1. Arthorne, J., Laffra, C.: Official Eclipse 3.0 FAQ (Eclipse Series). Addison-Wesley Professional, Boston (2004)

    Google Scholar 

  2. Bavota, G., Carluccio, B.D., Lucia, A.D., Penta, M.D., Oliveto, R., Strollo, O.: When does a refactoring induce bugs? An empirical study. In: 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation, pp. 104–113, September 2012

    Google Scholar 

  3. Bavota, G., Qusef, A., Oliveto, R., Lucia, A.D., Binkley, D.: An empirical analysis of the distribution of unit test smells and their impact on software maintenance. In: 2012 28th IEEE International Conference on Software Maintenance (ICSM), pp. 56–65, September 2012

    Google Scholar 

  4. Beck, K.: Test-Driven Development: By Example. Addison-Wesley Professional, Boston (2003)

    Google Scholar 

  5. Bladel, B.v., Demeyer, S.: Test behaviour detection as a test refactoring safety. In: Proceedings of the 2nd International Workshop on Refactoring, IWoR 2018, pp. 22–25. ACM, New York, NY, USA (2018). https://doi.org/10.1145/3242163.3242168

  6. Fowler, M., Beck, K.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (1999)

    Google Scholar 

  7. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional, Boston (1994)

    Google Scholar 

  8. Gatrell, M., Counsell, S., Swift, S., Hierons, R.M., Liu, X.: Test and production classes of an industrial c# system: a refactoring and fault perspective. In: 2015 41st Euromicro Conference on Software Engineering and Advanced Applications, pp. 35–38, August 2015

    Google Scholar 

  9. Gerlec, Č., Rakić, G., Budimac, Z., Heričko, M.: A programming language independent framework for metrics-based software evolution and analysis. Comput. Sci. Inf. Syst. 9(3), 1155–1186 (2012)

    Article  Google Scholar 

  10. Guerra, E.M., Fernandes, C.T.: Refactoring test code safely. In: International Conference on Software Engineering Advances, p. 44, August 2007

    Google Scholar 

  11. Guerra, E.M.: Um Estudo sobre Refatoração de Código de Teste. Ph.D. thesis, Instituto Tecnológico de Aeronáutica, São José dos Campos (2005)

    Google Scholar 

  12. Janzen, D., Saiedian, H.: Test-driven development concepts, taxonomy, and future direction. Computer 38(9), 43–50 (2005). https://doi.org/10.1109/MC.2005.314

    Article  Google Scholar 

  13. Kaur, G., Singh, B.: Improving the quality of software by refactoring. In: 2017 International Conference on Intelligent Computing and Control Systems (ICICCS), pp. 185–191, June 2017. https://doi.org/10.1109/ICCONS.2017.8250707

  14. Mens, T., Tourwe, T.: A survey of software refactoring. IEEE Trans. Softw. Eng. 30(2), 126–139 (2004)

    Article  Google Scholar 

  15. Meszaros, G.: XUnit Test Patterns: Refactoring Test Code. Pearson Education, London (2007)

    Google Scholar 

  16. Mosley, D.J., Posey, B.A.: Just Enough Software Test Automation. Prentice Hall Professional, Upper Saddle River (2002)

    Google Scholar 

  17. Murphy-Hill, E., Parnin, C., Black, A.P.: How we refactor, and how we know it. IEEE Trans. Softw. Eng. 38(1), 5–18 (2012)

    Article  Google Scholar 

  18. Passier, H., Bijlsma, L., Bockisch, C.: Maintaining unit tests during refactoring. In: Proceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools, pp. 18:1–18:6. ACM (2016)

    Google Scholar 

  19. Pipka, J.U.: Refactoring in a “test first”-world. In: Proceedings of Third International Conference eXtreme Programming and Flexible Processes in Software Engineering (2002)

    Google Scholar 

  20. Rizzi, L., Fontana, F.A., Roveda, R.: Support for architectural smell refactoring. In: Proceedings of the 2nd International Workshop on Refactoring, IWoR 2018, pp. 7–10. ACM, New York, NY, USA (2018)

    Google Scholar 

  21. Sangal, N., Jordan, E., Sinha, V., Jackson, D.: Using dependency models to manage complex software architecture. In: Proceedings of the 20th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, vol. 40, pp. 167–176 (2005)

    Google Scholar 

  22. Silva, I.P.S.C., Alves, E.L.G., Andrade, W.L.: Analyzing automatic test generation tools for refactoring validation. In: Proceedings of the 12th International Workshop on Automation of Software Testing, AST 2017, pp. 38–44. IEEE Press, Piscataway, NJ, USA (2017)

    Google Scholar 

  23. Van Deursen, A., Moonen, L., Van Den Bergh, A., Kok, G.: Refactoring test code. In: Proceedings of the 2nd International Conference on Extreme Programming and Flexible Processes in Software Engineering, pp. 92–95 (2001)

    Google Scholar 

  24. Williams, L., Kessler, R.R., Cunningham, W., Jeffries, R.: Strengthening the case for pair programming. IEEE Softw. 17(4), 19–25 (2000). https://doi.org/10.1109/52.854064

    Article  Google Scholar 

Download references

Acknowledgments

The authors would like to thank CNPq (grant 455080/2014-3) and FAPESP (grant 2014/16236-6) for financial support.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fábio Fagundes Silveira .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Marinke, R. et al. (2019). Towards an Extensible Architecture for Refactoring Test Code. In: Misra, S., et al. Computational Science and Its Applications – ICCSA 2019. ICCSA 2019. Lecture Notes in Computer Science(), vol 11622. Springer, Cham. https://doi.org/10.1007/978-3-030-24305-0_34

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-24305-0_34

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-24304-3

  • Online ISBN: 978-3-030-24305-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics