Assessing the migration of testing frameworks in the Python ecosystem
Carregando...
Data
Autor(es)
Título da Revista
ISSN da Revista
Título de Volume
Editor
Universidade Federal de Minas Gerais
Descrição
Tipo
Dissertação de mestrado
Título alternativo
Avaliação da migração de frameworks de testes no ecossistema Python
Primeiro orientador
Membros da banca
Marco Túlio de Oliveira Valente
Nicolas Anquetil
Nicolas Anquetil
Resumo
Nowadays, Python developers can rely on two major testing frameworks: unittest and pytest. Due to the benefits of pytest (e.g. fixture reuse), several relevant projects in the Python ecosystem have migrated from unittest to pytest. Despite being performed by the Python community, we are not yet aware of how systems are migrated from unittest to pytest nor the major reasons behind the migration. This study provides the first empirical study to assess testing framework migration. We analyze how and why developers migrate from unittest to pytest. We mine 100 popular Python systems and assess their migration status. We find that 34% of the systems rely on both testing frameworks and that Python projects are moving to pytest. While some systems have fully migrated, others are still migrating after a long period, suggesting that the migration is not always straightforward. Overall, the migrated test code is smaller than the original one. Furthermore, developers migrate to pytest due to several reasons, such as the easier syntax, interoperability, easier maintenance, and fixture flexibility/reuse, however, the implicit mechanics of pytest and the fact that it is a separated package are concerns.
Abstract
Atualmente, desenvolvedores Python podem utilizar dois frameworks de teste: unittest e pytest. Devido aos benef´ıcios do pytest (tais como reuso de fixtures), muitos projetos relevantes no ecossistema Python migraram do unittest para o pytest. Apesar de ser realizada pela comunidade Python, ainda n˜ao temos informações suficientes sobre a migração de unittest para pytest, nem sobre as raz˜oes da migração. Neste estudo, analizamos como e por qual motivo desenvolvedores migram de unittest para pytest. Para isso, mineramos os 100 sistemas Python mais populares e analisamos seus status de migrações. Os resultados mostram que 34% dos sistemas dependem de ambos frameworks de teste e que projetos Python est˜ao, de fato, realizando a migração para pytest. Enquanto alguns sistemas mi graram completamente, outros ainda estão migrando após um longo período, sugerindo que a migração não é sempre direta. Em geral, o código de teste migrado é menor que o original. Além disso, desenvolvedores migram para pytest por diversas razões, como sintaxe simplificada, interoperabilidade, manutenção facilitada e flexibilidade/reuso de
fixtures, entretanto, a mecânica implícita do pytest e o fato de ser um pacote não nativo são preocupações relevantes.
Assunto
Computação – Teses, Software – Testes – Teses, Mineração de dados (Computação) – Teses, Engenharia de Software – Teses, Python (Linguagem de programação de computador) – Teses
Palavras-chave
Software testing, Software maintenance, Mining software repositories, Empirical software engineering, Python, Pytest, Unittest