Closed FloatingSunfish closed 3 years ago
This features doesn't work right now. See #517.
@abingham I see. From what I understood from looking at #517, it was only excluding modules that didn't work, not excluding specific mutation operators.
Out of curiosity, how closely related are these two issues? Because if resolving one won't automatically resolve the other, perhaps this needs to be its own issue.
Thanks!
Ah, you're right, sorry for not reading closely enough. I'll look into this.
The problem has to do with a mistake in how the filter operator is implemented. The --config
option should actually be required, so you can fix your immediate issue by doing cr-filters-operators --config <config file> mutation_test_session.sqlite
. I'll update the filter to require a config; it's currently optional because of a legacy way sessions used to work.
which I assume isn't needed because the configuration file already has all the filters
It is required. Cosmic Ray doesn't run any filters on its own, and requires users to run them externally. We used to try to manage all of the filtering internally, and - while it's definitely technically possible - it was more trouble than it was worth.
@abingham >We used to try to manage all of the filtering internally By this, do you mean you tried just using the config file and no longer requiring users to run filter commands manually?
Also, thanks for the workaround while we wait for this issue to get resolved. 🙂
By this, do you mean you tried just using the config file and no longer requiring users to run filter commands manually?
Correct. CR used to run certain kinds of filtering as part of the init phase, and it would read the filtering criteria from the config in the same way that e.g. cr-filter-operators
does. But it added complexity to the implementation without adding sufficient benefits, i.e. it's very simple to run filters, add them to initialization scripts, or whatever.
This should be fixed in 8.3.3.
@abingham
Perhaps it would be a good idea to add a new section in the cr-filter-operators
documentation like:
cr-filter-operators session.sqlite config.toml
Just to make it more uniform with cr-filter-pragma
having an example.
I have excluded the following mutation operators in my Cosmic Ray configuration file:
I also reran
init
before running mutation tests.However, when I ran an HTML report, the mutation operators were still getting run:
NOTE: I tried a second time, this time running
cr-filter-operators mutation_test_session.sqlite
(which I assume isn't needed because the configuration file already has all the filters) after runninginit
and it didn't solve the problem.