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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Arthorne, J., Laffra, C.: Official Eclipse 3.0 FAQ (Eclipse Series). Addison-Wesley Professional, Boston (2004)
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
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
Beck, K.: Test-Driven Development: By Example. Addison-Wesley Professional, Boston (2003)
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
Fowler, M., Beck, K.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (1999)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional, Boston (1994)
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
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)
Guerra, E.M., Fernandes, C.T.: Refactoring test code safely. In: International Conference on Software Engineering Advances, p. 44, August 2007
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)
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
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
Mens, T., Tourwe, T.: A survey of software refactoring. IEEE Trans. Softw. Eng. 30(2), 126–139 (2004)
Meszaros, G.: XUnit Test Patterns: Refactoring Test Code. Pearson Education, London (2007)
Mosley, D.J., Posey, B.A.: Just Enough Software Test Automation. Prentice Hall Professional, Upper Saddle River (2002)
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)
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)
Pipka, J.U.: Refactoring in a “test first”-world. In: Proceedings of Third International Conference eXtreme Programming and Flexible Processes in Software Engineering (2002)
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)
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)
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)
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)
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
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
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)