Test smells represent a set of poorly designed tests, which can harm a test code’s maintenance and quality criteria. Although fundamental steps to understand test smells have been investigated, there is still an evident lack of studies that evaluate the impact of test smell refactoring from the perspective of internal quality attributes, such as: size, cohesion, coupling and complexity. In addition, the literature still lacks research that addresses the difficulties developers encounter during test smells refactoring. The paper aims to investigate the impact of test smells refactoring from developers’ perspective and internal quality attributes. We investigated the perceptions and difficulties encountered by 20 developers while removing 5 types of test smells in 4 open-source projects over 2 months. Through this experiment, we analyzed: (i) the impact that test smells refactoring has on internal quality attributes; (ii) developers’ perception of test smells, as real problems within a system; and, (iii) main difficulties encountered by developers during test smells refactoring. Our findings indicate that: (i) the Eager Test and Duplicate Assert test smells are the most harmful to the internal quality of the system; (ii) the refactoring test smells the source code easier to understand; (iii) some developers do not consider test smells as real problems within a software project; (iv) the developers did not consider the Assertion Roulette and Magic Number Test smells to be real problems; and, (v) understanding the source code is one of the main difficulties encountered by developers. Our findings can help developers design a prioritization scheme for test smells refactoring and make them aware of the real benefits of refactoring test smells.
1bertt / sbes_2022 Goto Github PK
View Code? Open in Web Editor NEWThis project aims to analyze the impact that test smells refactoring has on quality metrics.