TestMigrationsInPy: 一个从unittest到pytest的测试迁移数据集
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest
AI总结:
本文提出TestMigrationsInPy数据集,包含923个真实测试迁移案例,用于支持Python测试框架迁移的自动化研究。
摘要:
unittest和pytest是Python中最受欢迎的测试框架。总体而言,pytest提供了一些优势,包括更简单的断言、固定装置的重用和互操作性。由于这些好处,多个项目在Python生态系统中已从unittest迁移到pytest。为了促进迁移,pytest也可以运行unittest测试,因此迁移可以随着时间的推移逐步进行。然而,迁移过程可能耗时较长,结论可能需要很长时间。在这种背景下,项目将受益于自动化解决方案来支持迁移过程。在本文中,我们提出了TestMigrationsInPy,这是一个从unittest到pytest的测试迁移数据集。TestMigrationsInPy包含923个由开发者实际执行的迁移。未来提出新的解决方案来迁移Python框架的研究可以依赖TestMigrationsInPy作为真实数据。此外,由于TestMigrationsInPy包含迁移类型的信息(例如断言或固定装置的变化),我们的数据集使新的解决方案能够被有效验证,例如从简单的断言迁移到更复杂的固定装置迁移。TestMigrationsInPy可在:https://github.com/altinoalvesjunior/TestMigrationsInPy上公开获取。
英文摘要:
Unittest and pytest are the most popular testing frameworks in Python. Overall, pytest provides some advantages, including simpler assertion, reuse of fixtures, and interoperability. Due to such benefits, multiple projects in the Python ecosystem have migrated from unittest to pytest. To facilitate the migration, pytest can also run unittest tests, thus, the migration can happen gradually over time. However, the migration can be time-consuming and take a long time to conclude. In this context, projects would benefit from automated solutions to support the migration process. In this paper, we propose TestMigrationsInPy, a dataset of test migrations from unittest to pytest. TestMigrationsInPy contains 923 real-world migrations performed by developers. Future research proposing novel solutions to migrate frameworks in Python can rely on TestMigrationsInPy as a ground truth. Moreover, as TestMigrationsInPy includes information about the migration type (e.g., changes in assertions or fixtures), our dataset enables novel solutions to be verified effectively, for instance, from simpler assertion migrations to more complex fixture migrations. TestMigrationsInPy is publicly available at: https://github.com/altinoalvesjunior/TestMigrationsInPy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。