Assessing the migration of testing frameworks in the Python ecosystem

Detalhes bibliográficos
Autor(a) principal: Lívia Almeida Barbosa
Data de Publicação: 2022
Tipo de documento: Dissertação
Idioma: eng
Título da fonte: Repositório Institucional da UFMG
Texto Completo: http://hdl.handle.net/1843/47346
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.
id UFMG_a403cf7c8c499b5e8b6f08d594241099
oai_identifier_str oai:repositorio.ufmg.br:1843/47346
network_acronym_str UFMG
network_name_str Repositório Institucional da UFMG
repository_id_str
spelling André Cavalcante Horahttp://lattes.cnpq.br/4957418183504876Marco Túlio de Oliveira ValenteNicolas Anquetilhttp://lattes.cnpq.br/0124059842153749Lívia Almeida Barbosa2022-11-21T02:07:40Z2022-11-21T02:07:40Z2022-07-12http://hdl.handle.net/1843/47346Nowadays, 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.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.CNPq - Conselho Nacional de Desenvolvimento Científico e TecnológicoFAPEMIG - Fundação de Amparo à Pesquisa do Estado de Minas GeraisCAPES - Coordenação de Aperfeiçoamento de Pessoal de Nível SuperiorengUniversidade Federal de Minas GeraisPrograma de Pós-Graduação em Ciência da ComputaçãoUFMGBrasilICX - DEPARTAMENTO DE CIÊNCIA DA COMPUTAÇÃOComputação – TesesSoftware – Testes – TesesMineração de dados (Computação) – TesesEngenharia de Software – TesesPython (Linguagem de programação de computador) – TesesSoftware testingSoftware maintenanceMining software repositoriesEmpirical software engineeringPythonPytestUnittestAssessing the migration of testing frameworks in the Python ecosystemAvaliação da migração de frameworks de testes no ecossistema Pythoninfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisinfo:eu-repo/semantics/openAccessreponame:Repositório Institucional da UFMGinstname:Universidade Federal de Minas Gerais (UFMG)instacron:UFMGORIGINALdissertacao_livia_completa_pdfa.pdfdissertacao_livia_completa_pdfa.pdfapplication/pdf1569701https://repositorio.ufmg.br/bitstream/1843/47346/1/dissertacao_livia_completa_pdfa.pdf84d500baf81c0e1965124446cc3c0951MD51LICENSElicense.txtlicense.txttext/plain; charset=utf-82118https://repositorio.ufmg.br/bitstream/1843/47346/2/license.txtcda590c95a0b51b4d15f60c9642ca272MD521843/473462022-11-20 23:07:40.397oai:repositorio.ufmg.br:1843/47346TElDRU7Dh0EgREUgRElTVFJJQlVJw4fDg08gTsODTy1FWENMVVNJVkEgRE8gUkVQT1NJVMOTUklPIElOU1RJVFVDSU9OQUwgREEgVUZNRwoKQ29tIGEgYXByZXNlbnRhw6fDo28gZGVzdGEgbGljZW7Dp2EsIHZvY8OqIChvIGF1dG9yIChlcykgb3UgbyB0aXR1bGFyIGRvcyBkaXJlaXRvcyBkZSBhdXRvcikgY29uY2VkZSBhbyBSZXBvc2l0w7NyaW8gSW5zdGl0dWNpb25hbCBkYSBVRk1HIChSSS1VRk1HKSBvIGRpcmVpdG8gbsOjbyBleGNsdXNpdm8gZSBpcnJldm9nw6F2ZWwgZGUgcmVwcm9kdXppciBlL291IGRpc3RyaWJ1aXIgYSBzdWEgcHVibGljYcOnw6NvIChpbmNsdWluZG8gbyByZXN1bW8pIHBvciB0b2RvIG8gbXVuZG8gbm8gZm9ybWF0byBpbXByZXNzbyBlIGVsZXRyw7RuaWNvIGUgZW0gcXVhbHF1ZXIgbWVpbywgaW5jbHVpbmRvIG9zIGZvcm1hdG9zIMOhdWRpbyBvdSB2w61kZW8uCgpWb2PDqiBkZWNsYXJhIHF1ZSBjb25oZWNlIGEgcG9sw610aWNhIGRlIGNvcHlyaWdodCBkYSBlZGl0b3JhIGRvIHNldSBkb2N1bWVudG8gZSBxdWUgY29uaGVjZSBlIGFjZWl0YSBhcyBEaXJldHJpemVzIGRvIFJJLVVGTUcuCgpWb2PDqiBjb25jb3JkYSBxdWUgbyBSZXBvc2l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mlvIEluc3RpdHVjaW9uYWwgZGEgVUZNRyBvcyBkaXJlaXRvcyBhcHJlc2VudGFkb3MgbmVzdGEgbGljZW7Dp2EsIGUgcXVlIGVzc2UgbWF0ZXJpYWwgZGUgcHJvcHJpZWRhZGUgZGUgdGVyY2Vpcm9zIGVzdMOhIGNsYXJhbWVudGUgaWRlbnRpZmljYWRvIGUgcmVjb25oZWNpZG8gbm8gdGV4dG8gb3Ugbm8gY29udGXDumRvIGRhIHB1YmxpY2HDp8OjbyBvcmEgZGVwb3NpdGFkYS4KCkNBU08gQSBQVUJMSUNBw4fDg08gT1JBIERFUE9TSVRBREEgVEVOSEEgU0lETyBSRVNVTFRBRE8gREUgVU0gUEFUUk9Dw41OSU8gT1UgQVBPSU8gREUgVU1BIEFHw4pOQ0lBIERFIEZPTUVOVE8gT1UgT1VUUk8gT1JHQU5JU01PLCBWT0PDiiBERUNMQVJBIFFVRSBSRVNQRUlUT1UgVE9ET1MgRSBRVUFJU1FVRVIgRElSRUlUT1MgREUgUkVWSVPDg08gQ09NTyBUQU1Cw4lNIEFTIERFTUFJUyBPQlJJR0HDh8OVRVMgRVhJR0lEQVMgUE9SIENPTlRSQVRPIE9VIEFDT1JETy4KCk8gUmVwb3NpdMOzcmlvIEluc3RpdHVjaW9uYWwgZGEgVUZNRyBzZSBjb21wcm9tZXRlIGEgaWRlbnRpZmljYXIgY2xhcmFtZW50ZSBvIHNldSBub21lKHMpIG91IG8ocykgbm9tZXMocykgZG8ocykgZGV0ZW50b3IoZXMpIGRvcyBkaXJlaXRvcyBhdXRvcmFpcyBkYSBwdWJsaWNhw6fDo28sIGUgbsOjbyBmYXLDoSBxdWFscXVlciBhbHRlcmHDp8OjbywgYWzDqW0gZGFxdWVsYXMgY29uY2VkaWRhcyBwb3IgZXN0YSBsaWNlbsOnYS4KRepositório de PublicaçõesPUBhttps://repositorio.ufmg.br/oaiopendoar:2022-11-21T02:07:40Repositório Institucional da UFMG - Universidade Federal de Minas Gerais (UFMG)false
dc.title.pt_BR.fl_str_mv Assessing the migration of testing frameworks in the Python ecosystem
dc.title.alternative.pt_BR.fl_str_mv Avaliação da migração de frameworks de testes no ecossistema Python
title Assessing the migration of testing frameworks in the Python ecosystem
spellingShingle Assessing the migration of testing frameworks in the Python ecosystem
Lívia Almeida Barbosa
Software testing
Software maintenance
Mining software repositories
Empirical software engineering
Python
Pytest
Unittest
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
title_short Assessing the migration of testing frameworks in the Python ecosystem
title_full Assessing the migration of testing frameworks in the Python ecosystem
title_fullStr Assessing the migration of testing frameworks in the Python ecosystem
title_full_unstemmed Assessing the migration of testing frameworks in the Python ecosystem
title_sort Assessing the migration of testing frameworks in the Python ecosystem
author Lívia Almeida Barbosa
author_facet Lívia Almeida Barbosa
author_role author
dc.contributor.advisor1.fl_str_mv André Cavalcante Hora
dc.contributor.advisor1Lattes.fl_str_mv http://lattes.cnpq.br/4957418183504876
dc.contributor.referee1.fl_str_mv Marco Túlio de Oliveira Valente
dc.contributor.referee2.fl_str_mv Nicolas Anquetil
dc.contributor.authorLattes.fl_str_mv http://lattes.cnpq.br/0124059842153749
dc.contributor.author.fl_str_mv Lívia Almeida Barbosa
contributor_str_mv André Cavalcante Hora
Marco Túlio de Oliveira Valente
Nicolas Anquetil
dc.subject.por.fl_str_mv Software testing
Software maintenance
Mining software repositories
Empirical software engineering
Python
Pytest
Unittest
topic Software testing
Software maintenance
Mining software repositories
Empirical software engineering
Python
Pytest
Unittest
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
dc.subject.other.pt_BR.fl_str_mv 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
description 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.
publishDate 2022
dc.date.accessioned.fl_str_mv 2022-11-21T02:07:40Z
dc.date.available.fl_str_mv 2022-11-21T02:07:40Z
dc.date.issued.fl_str_mv 2022-07-12
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/masterThesis
format masterThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv http://hdl.handle.net/1843/47346
url http://hdl.handle.net/1843/47346
dc.language.iso.fl_str_mv eng
language eng
dc.rights.driver.fl_str_mv info:eu-repo/semantics/openAccess
eu_rights_str_mv openAccess
dc.publisher.none.fl_str_mv Universidade Federal de Minas Gerais
dc.publisher.program.fl_str_mv Programa de Pós-Graduação em Ciência da Computação
dc.publisher.initials.fl_str_mv UFMG
dc.publisher.country.fl_str_mv Brasil
dc.publisher.department.fl_str_mv ICX - DEPARTAMENTO DE CIÊNCIA DA COMPUTAÇÃO
publisher.none.fl_str_mv Universidade Federal de Minas Gerais
dc.source.none.fl_str_mv reponame:Repositório Institucional da UFMG
instname:Universidade Federal de Minas Gerais (UFMG)
instacron:UFMG
instname_str Universidade Federal de Minas Gerais (UFMG)
instacron_str UFMG
institution UFMG
reponame_str Repositório Institucional da UFMG
collection Repositório Institucional da UFMG
bitstream.url.fl_str_mv https://repositorio.ufmg.br/bitstream/1843/47346/1/dissertacao_livia_completa_pdfa.pdf
https://repositorio.ufmg.br/bitstream/1843/47346/2/license.txt
bitstream.checksum.fl_str_mv 84d500baf81c0e1965124446cc3c0951
cda590c95a0b51b4d15f60c9642ca272
bitstream.checksumAlgorithm.fl_str_mv MD5
MD5
repository.name.fl_str_mv Repositório Institucional da UFMG - Universidade Federal de Minas Gerais (UFMG)
repository.mail.fl_str_mv
_version_ 1803589222272073728