作者:手机用户2502883515 | 来源:互联网 | 2023-09-15 14:33
Oneproblemencounteredwithmutationtestingisthatitsslow,becausebydefaultyoudoafullte
One problem encountered with mutation testing is that it's slow, because by default you do a full test run (either a test file, or a suite of test files) for each mutation generated.
突变测试遇到的一个问题是它很慢,因为默认情况下,您会为生成的每个突变执行完整的测试运行(测试文件或一组测试文件)。
One way to make mutation testing faster would be to stop the test run for a given mutant once a single failure has been encountered (but only during mutation testing). Even better would be for the mutation tester to remember what was the first test to kill the last mutant, and give that first to the next mutant. Is there anything in ruby that does either of these things, or is my best bet to start monkey patching?
使突变测试更快的一种方法是在遇到单个故障时停止针对给定突变体的测试运行(但仅在突变测试期间)。甚至更好的是变异测试仪要记住什么是第一个杀死最后一个突变体的测试,并首先将其给予下一个突变体。红宝石中是否有任何东西可以做这些事情,或者我最好开始猴子修补?
(Yes, I know unit tests ought to be fast. And showing all of the failed tests is useful outside of mutation testing, as it helps you not merely identify that something's wrong, but pinpoint where it's going wrong)
(是的,我知道单元测试应该很快。并且显示所有失败的测试在突变测试之外是有用的,因为它不仅可以帮助您识别出错误的东西,还可以确定哪里出错了)
Edit: I'm currently using heckle with test/unit. If it's not possible for test/unit to remember which tests fail between runnings, maybe heckle or something running heckle could remember it.
编辑:我目前正在使用测试/单位的heckle。如果测试/单元无法记住哪些测试在运行之间失败,那么heckle或者运行heckle的东西就能记住它。
3 个解决方案