Papers
Topics
Authors
Recent
Search
2000 character limit reached

Software Testing and Code Refactoring: A Survey with Practitioners

Published 3 Oct 2023 in cs.SE | (2310.01719v1)

Abstract: 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.

Citations (6)

Summary

  • The paper shows that 75% of testers use code refactoring in automated testing, which enhances maintainability and readability.
  • It employs a cross-sectional survey of 80 professionals and descriptive statistics to analyze trends in refactoring practices.
  • Findings reveal benefits such as improved maintenance (75%) and readability (60%), alongside challenges like time constraints (79%).

Software Testing and Code Refactoring: A Survey with Practitioners

Introduction

The paper "Software Testing and Code Refactoring: A Survey with Practitioners" (2310.01719) explores the intersection of software testing and code refactoring through an empirical investigation involving 80 software testing professionals. In contemporary software development, automated testing has become a staple, necessitating adept skills in coding and the art of refactoring from testing professionals. The study seeks to illuminate how testers engage with refactoring in automated environments, examining the benefits and the constraints they face. A rigorous survey methodology was employed to collect data, utilizing convenience, purposive, and snowball sampling techniques.

Methodology

Adhering to established survey guidelines within software engineering, the study employed a cross-sectional survey to capture a wide array of experiences from software testing professionals. The survey design was informed by a comprehensive literature review, which shaped the questionnaire to probe the practitioners' familiarity and engagement with automation and refactoring. Participants' profiles were characterized by variables such as gender, geographic location, education, experience, and professional certifications. The survey was anonymized, ensuring ethical considerations were strictly adhered to. Data analysis focused on applying descriptive statistics to evaluate trends and patterns in the responses received.

Findings

Demographic Insights

The sample consisted of highly experienced individuals, with 48% possessing over five years of experience in software testing. Educationally, 35% held a post-baccalaureate certificate, reflecting a high level of training among respondents. Geographically, the majority were situated in Brazil, attributing to the sampling methods employed and the increasing remote work trends. Despite apparent geographical concentration, the sample encompassed professionals involved in international projects, enriching the diversity of experiences captured.

Refactoring Practices

Refactoring in test automation emerged as a prevalent practice, with 75% of participants engaging in such activities. Types of refactoring commonly performed included restructuring methods, removing redundant code, renaming variables, and adding test assertions. These practices reflect foundational principles of clean code and maintainability, emphasizing the critical nature of refactoring in sustaining efficient and effective automated testing frameworks.

Benefits and Challenges

Participants acknowledged significant benefits of refactoring, such as improved code maintenance (75%), enhanced readability (60%), and increased reusability (56%). Notably, refactoring was seen to boost test automation performance (35%) and testing team efficiency (26%). However, prevalent challenges mirrored those faced by developers, with 79% identifying time constraints and 61% lamenting managerial apathy towards refactoring activities. These challenges underscore a systemic issue within project management and resourcing that impedes widespread adoption and optimization of refactoring in testing contexts.

Implications and Future Directions

The insights from this study have crucial implications for both academia and industry. The findings highlight the necessity of integrating refactoring more conscientiously into project planning and management, advocating for greater managerial recognition of its value. Theoretically, the research bridges a gap between academic discourse and industry practice, providing empirical evidence that can inform future studies and educational curricula. Practically, enhancing tool support for refactoring in test automation and fostering a culture of continuous improvement in testing practices stand as pragmatic steps forward.

The study sets a groundwork for future exploration, suggesting avenues such as expanding the survey to broader geographies, conducting qualitative focus groups for deeper insights, and evaluating the impact of remote and hybrid work on testing processes. These lines of inquiry hold potential to further refine our understanding of how best to support software testing professionals in their vital role within the software development lifecycle.

Conclusion

This study elucidates the current state of code refactoring among software testing professionals, presenting a detailed account of its implementation, benefits, and obstacles. It calls attention to the need for strategic project management adjustments and highlights potential areas for academic and industrial enhancement. By underscoring the interplay between testing and refactoring, it contributes meaningfully to the discourse on software quality improvement and the evolution of testing practices in the modern technological landscape.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.