Ensino da Prática de Refatoração de Test Smells

  • Humberto Damasceno UFC
  • Carla Bezerra UFC

Resumo


Test smells representam um conjunto de testes mal projetados, que podem prejudicar a manutenção do código de teste. Embora etapas fundamentais para entender os test smells tenham sido tomadas, ainda há uma evidente falta de estudos no ensino da prática de refatoração de test smells. Este artigo apresenta o relato de experiência no ensino da refatoração de test smells com 30 estudantes das turmas de Qualidade e Manutenção de software do curso de Engenharia de Software. Nós investigamos: (i) as principais habilidades adquiridas pelos alunos durante a refatoração dos test smells e (ii) a dificuldade de refatoração desses test smells pelos alunos. Nossas descobertas apontam os benefícios do ensino da refatoração de test smells e uma metodologia para ensino desses conceitos na prática.

Referências

Alizadeh, V., Kessentini, M., Mkaouer, M. W., Ó Cinnéide, M., Ouni, A., and Cai, Y. (2020). An interactive and dynamic search-based approach to software refactoring recommendations. IEEE Transactions on Software Engineering, 46(9):932–961.

Aljedaani, W., Mkaouer, M. W., Peruma, A., and Ludi, S. (2023). Do the test smells assertion roulette and eager test impact students’ troubleshooting and debugging capabilities? arXiv preprint arXiv:2303.04234.

Aniche, M., Hermans, F., and van Deursen, A. (2019a). Pragmatic software testing education. In Proceedings of the 50th ACM Technical Symposium on Computer Science Education, SIGCSE ’19, page 414–420, New York, NY, USA. Association for Computing Machinery.

Aniche, M., Hermans, F., and Van Deursen, A. (2019b). Pragmatic software testing education. In Proceedings of the 50th ACM Technical Symposium on Computer Science Education, pages 414–420.

Bai, G. R., Smith, J., and Stolee, K. T. (2021). How students unit test: Perceptions, practices, and pitfalls. In Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education V. 1, pages 248–254.

Bavota, G., Qusef, A., Oliveto, R., De Lucia, A., and Binkley, D. (2012). 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), pages 56–65.

Beller, M., Gousios, G., Panichella, A., Proksch, S., Amann, S., and Zaidman, A. (2019). Developer testing in the ide: Patterns, beliefs, and behavior. IEEE Transactions on Software Engineering, 45(3):261–284.

Beller, M., Gousios, G., Panichella, A., and Zaidman, A. (2015). When, how, and why developers (do not) test in their ides. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2015, page 179–190, New York, NY, USA. Association for Computing Machinery.

Berner, S., Weber, R., and Keller, R. (2005). Observations and lessons learned from automated testing. In Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005., pages 571–579.

Buffardi, K. and Aguirre-Ayala, J. (2021). Unit test smells and accuracy of software engineering student test suites. In Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education V. 1, pages 234–240.

Campos, D., Rocha, L., and Machado, I. (2021). Developers perception on the severity of test smells: an empirical study. XXIV Ibero-American Conference on Software Engineering.

Candea, G., Bucur, S., and Zamfir, C. (2010). Automated software testing as a service. In Proceedings of the 1st ACM Symposium on Cloud Computing, SoCC ’10, page 155–160, New York, NY, USA. Association for Computing Machinery.

Fowler, M. (1999). Refactoring: improving the design of existing code. ilustrated edition.

França, C., da Silva, F. Q. B., and Sharp, H. (2020). Motivation and satisfaction of software engineers. IEEE Transactions on Software Engineering, 46(2):118–140.

Garousi, V. and Küçük, B. (2018). Smells in software test code: A survey of knowledge in industry and academia. Journal of Systems and Software, 138:52–81.

Garousi, V., Rainer, A., Lauvås Jr, P., and Arcuri, A. (2020). Software-testing education: A systematic literature mapping. Journal of Systems and Software, 165:110570.

Kim, D. J. (2020). An empirical study on the evolution of test smell. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering: Companion Proceedings, ICSE ’20, page 149–151, New York, NY, USA. Association for Computing Machinery.

Matturro, G., Raschetti, F., and Fontán, C. (2019). A systematic mapping study on soft skills in software engineering. J. Univers. Comput. Sci., 25(1):16–41.

Myers, G. J., Sandler, C., and Badgett, T. (2011). The art of software testing. John Wiley & Sons.

Orso, A. and Rothermel, G. (2014). Software testing: A research travelogue (2000–2014). In Future of Software Engineering Proceedings, FOSE 2014, page 117–132, New York, NY, USA. Association for Computing Machinery.

Paixão, M., Uchôa, A., Bibiano, A. C., Oliveira, D., Garcia, A., Krinke, J., and Arvonio, E. (2020). Behind the Intents: An In-Depth Empirical Study on Software Refactoring in Modern Code Review, page 125–136. Association for Computing Machinery, New York, NY, USA.

Palomba, F., Zaidman, A., and De Lucia, A. (2018). Automatic test smell detection using information retrieval techniques. In 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME), pages 311–322.

Pecorelli, F., Palomba, F., and De Lucia, A. (2021). The relation of test-related factors to software quality: A case study on apache systems. Empirical Software Engineering, 26(2):1–42.

Peruma, A., Almalki, K., Newman, C. D., Mkaouer, M. W., Ouni, A., and Palomba, F. (2019). On the distribution of test smells in open source android applications: An exploratory study. In Proceedings of the 29th Annual International Conference on Computer Science and Software Engineering, CASCON ’19, page 193–202, USA. IBM Corp.

Sjøberg, D. I., Yamashita, A., Anda, B. C., Mockus, A., and Dybå, T. (2013). Quantifying the effect of code smells on maintenance effort. IEEE Transactions on Software Engineering, 39(8):1144–1156.

Spadini, D., Palomba, F., Zaidman, A., Bruntink, M., and Bacchelli, A. (2018). On the relation of test smells to software code quality. In 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME), pages 1–12.

Van Deursen, A., Moonen, L., Van Den Bergh, A., and Kok, G. (2001). Refactoring test code. In Proceedings of the 2nd international conference on extreme programming and flexible processes in software engineering (XP2001), pages 92–95. Citeseer.

Virgínio, T., Martins, L., Rocha, L., Santana, R., Cruz, A., Costa, H., and Machado, I. (2020). Jnose: Java test smell detector. In Proceedings of the 34th Brazilian Symposium on Software Engineering, SBES ’20, page 564–569, New York, NY, USA. Association for Computing Machinery.

Virgínio, T., Martins, L., Santana, R., Cruz, A., Rocha, L., Costa, H., and Machado, I. (2021). On the test smells detection: an empirical study on the jnose test accuracy. Journal of Software Engineering Research and Development, 9:8–1.

Yusifoğlu, V. G., Amannejad, Y., and Can, A. B. (2015). Software test-code engineering: A systematic mapping. Information and Software Technology, 58:123–147.
Publicado
06/08/2023
Como Citar

Selecione um Formato
DAMASCENO, Humberto; BEZERRA, Carla. Ensino da Prática de Refatoração de Test Smells. In: WORKSHOP SOBRE EDUCAÇÃO EM COMPUTAÇÃO (WEI), 31. , 2023, João Pessoa/PB. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2023 . p. 293-304. ISSN 2595-6175. DOI: https://doi.org/10.5753/wei.2023.230848.