Nowadays, software testing professionals are commonly required to develop coding skills to work on test automation. One essential skill required from those who code is the ability to implement code refactoring, a valued quality aspect of software development; however, software developers usually encounter obstacles in successfully applying this practice. In this scenario, the present study aims to explore how software testing professionals (e.g., software testers, test engineers, test analysts, and software QAs) deal with code refactoring to understand the benefits and limitations of this practice in the context of software testing. We followed the guidelines to conduct surveys in software engineering and applied three sampling techniques, namely convenience sampling, purposive sampling, and snowballing sampling, to collect data from testing professionals. We received answers from 80 individuals reporting their experience refactoring the code of automated tests. We concluded that in the context of software testing, refactoring offers several benefits, such as supporting the maintenance of automated tests and improving the performance of the testing team. However, practitioners might encounter barriers in effectively implementing this practice, in particular, the lack of interest from managers and leaders. Our study raises discussions on the importance of having testing professionals implement refactoring in the code of automated tests, allowing them to improve their coding abilities.
翻译:如今,软件测试专业人员通常需要掌握编码技能以开展测试自动化工作。编码人员必备的关键技能之一是实现代码重构的能力,这是软件开发中备受重视的质量要素;然而,软件开发者通常会在成功应用这一实践时遇到障碍。在此背景下,本研究旨在探究软件测试专业人员(如软件测试员、测试工程师、测试分析师、软件质量保障人员)如何处理代码重构,以理解该实践在软件测试背景下的优势与局限性。我们遵循软件工程调查指南,采用三种抽样技术——便利抽样、目的性抽样和滚雪球抽样——从测试专业人员中收集数据。我们收到80位受访者的反馈,报告了他们在自动化测试代码重构方面的经验。我们的结论是,在软件测试背景下,重构具有多项益处,例如支持自动化测试的维护、提升测试团队的效能。然而,从业者可能在有效实施该实践时遇到障碍,尤其是管理层和领导层缺乏兴趣的问题。本研究引发了关于测试专业人员在自动化测试代码中实施重构重要性的讨论,使他们能够提升自身的编码能力。