An Empirical Study of Automatically-Generated Tests from the Perspective of Test Smells
Resumo
Developing test code can be as or more expensive than developing production code. Commonly, developers use automated unit test generators to speed up software testing. The purpose of such tools is to shorten production time without decreasing code quality. Nonetheless, unit tests usually do not have a quality check layer above testing code, which might be hard to guarantee the quality of the generated tests. A strategy to verify the tests quality is to analyze the presence of test smells in test code. Test smells are characteristics in the test code that possibly indicate weaknesses in test design and implementation. Their presence could be used as a quality indicator. In this paper, we present an empirical study to analyze the quality of unit test code generated by automated test tools. We compare the tests generated by two tools (Randoop and Evo- Suite) with the existing unit test suite of twenty-one open-source Java projects. We analyze the unit test code to detect the presence of nineteen types of test smells. The results indicated significant differences in the unit test quality when comparing data from the automated unit test generators and existing unit test suites.
Palavras-chave:
Unit Testing, Test Smells, Automated Software Testing
Publicado
21/10/2020
Como Citar
VIRGÍNIO, Tássio; MARTINS, Luana Almeida; SOARES, Larissa Rocha; SANTANA, Railana; COSTA, Heitor; MACHADO, Ivan.
An Empirical Study of Automatically-Generated Tests from the Perspective of Test Smells. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 34. , 2020, Natal.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2020
.