Dry run all the test files together before initiating mutations
Currently Necessist dry runs each test file and then starts mutating it line by line to find surviving mutations. The dry run of the next file required an additional build after reverting the last mutation of the earlier file. We can try to improve performance by dry running all the files together at the start, which will allow us to skip the build of the original code again and again with a dry run of every test file.
However, there is a challenge with this approach. The Necessist is built with two goals:
- Provide useful information when something fails.
- Be able to keep going when something fails.
Therefore to be able to find which test file had a failing test case will require parsing logic for test output for all supported frameworks. We are keeping this issue for future if we can find a better approach to handle this case.
Hi @smoelius , could you please assign this issue to me?
@markv44 To be honest, I'm a little on the fence as to whether this is a change worth making.
I agree with the following statement's implication that the current strategy may cause unnecessary builds:
The dry run of the next file required an additional build after reverting the last mutation of the earlier file.
But at best, making this change we would save one build per test file.
On the other hand, we would need a way to identify failing test files so that they should not be mutated. Moreover, as @tarunbhm observes, we would likely need a version of that code specific to each framework.
So the tradeoff appears to me to be: a modest performance gain with a significant engineering cost.
Do you see the situation differently?
Do you see the situation differently?
Agreed. Your assessment makes sense.