Use este identificador para citar ou linkar para este item: http://repositorio.ufc.br/handle/riufc/81331
Tipo: Dissertação
Título: Investigando a influência dos test smells na ocorrência de flaky tests
Autor(es): Lima, Iraneide do Nascimento
Orientador: Bezerra, Carla Ilane Moreira
Palavras-chave em português: test smells;flaky test;qualidade do software
CNPq: CNPQ: CIÊNCIAS EXATAS E DA TERRA: CIÊNCIA DA COMPUTAÇÃO
Data do documento: 2024
Citação: LIMA, Iraneide do Nascimento. Investigando a influência dos test smells na ocorrência de flaky tests. 2024. 87 f. Dissertação (Mestrado em Computação)-Campus de Quixadá, Programa de Pós-Graduação em Computação, Universidade Federal do Ceará, Quixadá, 2024.
Resumo: Frequentemente a qualidade do código de teste é ignorada pelos projetos. A má qualidade do código de teste, pode ser identificada pela presença de más estruturas de código de teste, denominadas test smells. A presença de test smells pode ter efeitos negativos na manutenção do código de teste, tornando o código difícil de entender e custoso de ser mantido, podendo comprometer a confiabilidade dos testes. Estudos já indicaram que a refatoração de test smells podem evitar a ocorrência de flaky tests. Um teste é considerado flaky quando passa em uma execução e falha em outra, mesmo sem qualquer modificação no código de teste ou no código de produção. A presença de flaky tests nos códigos de teste gera insegurança, pois podem encobrir problemas reais, uma vez que não é possível garantir que o resultado fornecido por um flaky test seja verdadeiro. No entanto, a literatura ainda é escassa de estudos que investiguem a relação dos test smells e flaky tests. Dessa forma, este trabalho realiza uma investigação mais profunda de como a presença de test smells pode ter influência na ocorrência dos flaky tests. Para isso, foi utilizado um dataset com 82 projetos que contivesse código de teste Java e pelo menos um flaky test. A partir desse dataset, foi realizada a detecção dos test smells nos projetos selecionados no dataset. Após realizada a detecção, foi realizada uma análise manual a nível de método para identificar se no método com presença de flaky test também tinha ocorrência de test smell. Como principais resultados do estudo foi identificado que: (i) os test smells Lazy Test, Sleepy Test, Assertion Roulette e Exception Catching Throwing estão mais relacionados a ocorrência de flaky tests, foi identificado que Lazy Test é mais propenso a gerar flaky tests do tipo Order Dependency; (ii) o test smell Sleepy Test está ligado ao flaky test Async Wait e (iii) a coocorrência mais comum de test smell em método com flaky test é de Magic Number Test e Assertion Roulette com um total de 7 ocorrências . Outra contribuição deste trabalho, é a proposta de um catálogo com os principais test smells que estão mais relacionados a ocorrência de flaky tests. Ainda nessa catálogo são apresentadas as principais coocorrências de test smells que ocorrem em métodos com flaky test.
Abstract: Software projects often ignore test code quality. The presence of poor test code structures, called test smells, can identify poor test code quality. The presence of test smells can negatively affect test code maintenance, making the code difficult to understand and costly to maintain, potentially compromising test reliability. Studies have indicated that refactoring test smells can prevent the occurrence of flaky tests. A test is considered flaky when it passes in one execution and fails in another, even without modifying the test code or the production code. The presence of flaky tests in test codes generates insecurity, as they can mask real problems since it is not possible to guarantee that the result provided by a flaky test is true. However, the literature on studies investigating the relationship between test smells and flaky tests is still scarce. Thus, this work carries out a deeper investigation of how the presence of test smells can influence the occurrence of flaky tests. For this purpose, a dataset with 82 projects containing Java test code and at least one flaky test was used. Test smells were detected from this dataset in the projects selected in the dataset. After detection, a manual analysis was performed at the method level to identify whether the method with the presence of flaky tests also had a test smell. The main results of the study were that: (i) the test smells Lazy Test, Sleepy Test, Assertion Roulette and Exception Catching Throwing are more related to the occurrence of flaky tests, and it was identified that Lazy Test is more likely to generate flaky tests of the Order Dependency type; (ii) the test smell Sleepy Test is linked to the flaky test Async Wait and (iii) the most common co-occurrence of test smells in a method with flaky tests is Magic Number Test and Assertion Roulette with a total of 7 occurrences. Another contribution of this work is proposing a catalog with the main test smells most related to flaky tests. This catalog also presents the main co-occurrences of test smells that occur in methods with flaky tests.
URI: http://repositorio.ufc.br/handle/riufc/81331
Currículo Lattes do Orientador: http://lattes.cnpq.br/4277471687235814
Tipo de Acesso: Acesso Aberto
Aparece nas coleções:PCOMP - QUIXADÁ - Dissertações defendidas na UFC

Arquivos associados a este item:
Arquivo Descrição TamanhoFormato 
pdfA2025_dis_inlima.pdf7,36 MBAdobe PDFVisualizar/Abrir


Os itens no repositório estão protegidos por copyright, com todos os direitos reservados, salvo quando é indicado o contrário.