Please use this identifier to cite or link to this item: http://dspace.sti.ufcg.edu.br:8080/jspui/handle/riufcg/37717
Title: Uma investigação sobre Test Smells em códigos de testes JavaScript.
Other Titles: An investigation into Test Smells in JavaScript testing codes.
???metadata.dc.creator???: JORGE, Dalton Nicodemos.
???metadata.dc.contributor.advisor1???: MACHADO, Patricia Duarte de Lima.
???metadata.dc.contributor.advisor2???: ANDRADE, Wilkerson de Lucena.
???metadata.dc.contributor.referee1???: LIRA , Melina Mongiovi Brito.
???metadata.dc.contributor.referee2???: SOUTO, Sabrina de Figueirêdo.
???metadata.dc.contributor.referee3???: MACHADO, Ivan do Carmo.
???metadata.dc.contributor.referee4???: TEIXEIRA, Leopoldo Motta.
Keywords: Engenharia de software;Teste de software – desenvolvimento de sistemas;Linguagem javascript;Estudos de test smells – linguagem javascript;Software engineering;Software testing – systems development;JavaScript language;Test smells studies – javascript language
Issue Date: 15-Sep-2023
Publisher: Universidade Federal de Campina Grande
Citation: JORGE, Dalton Nicodemos. Uma investigação sobre Test Smells em códigos de testes JavaScript. 2023. 143 f. Tese (Doutorado em Ciência da Computação) – Programa de Pós-Graduação em Ciência da Computação, Centro de Engenharia Elétrica e Informática, Universidade Federal de Campina Grande, Paraíba, Brasil, 2024.
???metadata.dc.description.resumo???: Teste de software é uma atividade imprescindível no desenvolvimento de sistemas, pois minimiza a possibilidade de manifestar problemas e maximiza as chances do código de produção estar conforme suas especificações. No entanto, assim como uma má escolha de design (bad smell) afeta o código de produção, os testes também estão suscetíveis ao mesmo tipo de problema. Sendo assim, um teste com indicação de possíveis defeitos no design (test smell) pode ocasionar adversidades que vão desde a legibilidade do código, dificultando a manutenção, até mesmo a estar suscetível a fornecer falsos positivos ou simplesmente parar de funcionar. De fato, test smells são anti-padrões adotados na implementação do código de teste. Esses smells podem ter variações ou desencadear o surgimento de novos tipos, dependendo da linguagem ou tecnologia utilizada para a escrita dos testes. Em paralelo, a linguagem JavaScript tem se desenvolvido ao longo de décadas desde sua criação e uma notável evolução desde 2015 com a especificação ECMAScript 6 (ES6). JavaScript é uma linguagem de alto nível, que inclui as seguintes particula ridades: ser multi-paradigma, interpretada, utilizar tipagem dinâmica, possuir uma orientação a objeto baseada em protótipos e até mesmo funções de primeira classe. Diante disso, focamos nosso estudo de smells em JavaScript, pelo fato dela ser uma linguagem em constante evolução e largamente utilizada para desenvolver software em diversas plataformas, tais como: servidores, desktop, linha de comando, sistemas móveis e internet das coisas. Em síntese, o objetivo deste trabalho é investigar a ocorrência e a severidade de test smells clássicos e específicos na linguagem JavaScript, e verificar se estes anti-padrões podem estar correlacionados e com as métricas de qualidade do código de teste. Para alcançar este objetivo, inicialmente selecionamos 15 smells clássicos da literatura e um inerente à linguagem, para avaliar a ocorrência no código de teste. Com o intuito de facilitar a detecção de smells e validar o nosso estudo, desenvolvemos uma ferramenta de detecção automática desses 16 smells através da técnica de análise estática de código e executamos um estudo exploratório com 65 projetos, sendo 61 de código-livre e 4 de 2 código-fechado. Como resultados, concluímos que as incidências de alguns destes test smells estão moderadamente correlacionadas entre si e com as métricas de qualidade em sentido positivo. Adicionalmente, realizamos um estudo complementar envolvendo desenvolvedores e testadores com o intuito de investigar o impacto da experiência no reconhecimento desses smells em JavaScript. Este estudo visou entender não apenas a prevalência de test smells específicos na percepção desses profissionais, mas também as estratégias e ferramentas utilizadas por eles para mitigar tais anti-padrões. Este aspecto do estudo nos permitiu avaliar a conscientização e as práticas adotadas no contexto real de desen volvimento e teste de software, enriquecendo a compreensão dos desafios enfrentados e das possíveis soluções aplicáveis. Com este trabalho esperamos ter contribuído para a formalização inicial dos estudos de test smells na linguagem JavaScript, tendo em vista que embora venha sendo cada vez mais utilizada nos mais diversos contextos de desenvolvimento, ainda é muito pouco investigada quanto as suas especificidades e desdobramentos no âmbito de test smells.
Abstract: Software testing is an essential activity in system development, as it minimizes the possibility of manifesting problems and maximizes the chances that the production code meets its specifications. However, just as a poor design choice (bad smell) affects the production code, tests are also susceptible to the same type of problem. Thus, a test indicating possible design defects (test smell) can lead to challenges ranging from code readability, making maintenance difficult, to being prone to giving false positives or simply ceasing to function. Indeed, test smells are anti-patterns adopted in the test code implementation. These smells can vary or trigger the emergence of new types, depending on the language or technology used for test writing. In parallel, the JavaScript language has developed over decades since its incep tion and a notable evolution since 2015 with the ECMAScript 6 (ES6) specification. JavaScript is a high-level language, which includes the following peculiarities: being multi-paradigm, interpreted, using dynamic typing, having prototype-based object ori entation, and even first-class functions. Given this, we focused our study on smells in JavaScript, because it is a constantly evolving language and widely used to develop software on various platforms, such as: servers, desktop, command line, mobile systems, and the internet of things. In summary, the aim of this study is to investigate the occurrence and severity of classic and specific test smells in the JavaScript language, and to check if these anti patterns might be correlated with each other and with the quality metrics of the test code. To achieve this goal, we initially selected 15 classic smells from the literature and one inherent to the language, to assess their occurrence in the test code. To facilitate the detection of smells and validate our study, we developed an automated detection tool for these 16 smells using the static code analysis technique and conducted an exploratory study with 65 projects, 61 open-source and 4 proprietary. As results, we concluded that the incidence of some of these test smells is moderately correlated with each other and with quality metrics in a positive sense. Additionally, we conducted a complementary study involving developers and testers with the aim of investigating the impact of experience on the recognition of these smells 1 2 in JavaScript. This study aimed to understand not only the prevalence of specific test smells in the perception of these professionals, but also the strategies and tools they used to mitigate such anti-patterns. This aspect of the study allowed us to assess the awareness and practices adopted in the real context of software development and testing, enriching the understanding of the challenges faced and the possible applicable solutions. With this study, we hope to have contributed to the initial formalization of test smell studies in the JavaScript language, considering that although it has been increas ingly used in various development contexts, it had not yet been academically explored regarding its specifics and ramifications in the realm of test smells.
Keywords: Engenharia de software
Teste de software – desenvolvimento de sistemas
Linguagem javascript
Estudos de test smells – linguagem javascript
Software engineering
Software testing – systems development
JavaScript language
Test smells studies – javascript language
???metadata.dc.subject.cnpq???: Ciência da Computação.
URI: http://dspace.sti.ufcg.edu.br:8080/jspui/handle/riufcg/37717
Appears in Collections:Doutorado em Ciência da Computação.

Files in This Item:
File Description SizeFormat 
DALTON NICODEMOS JORGE - TESE (PPGCC) 2023.pdf2.83 MBAdobe PDFView/Open


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.