cosmic-ray icon indicating copy to clipboard operation
cosmic-ray copied to clipboard

Limit the output of `cr-report --show-diff` to surviving mutants (Feature Request)

Open WillGibson opened this issue 1 year ago • 2 comments

It would be useful to be able to limit the output of cr-report --show-diff to surviving mutants.

E.g. cr-report --show-diff --surviving-only.

I would be interested in submitting a pull request for this if the Cosmic Ray maintainers want to agree on the acceptance criteria first.

WillGibson avatar Nov 15 '24 08:11 WillGibson

That sounds good to me. If you can put together a PR I'll be happy to work with you to get it merged in.

abingham avatar Nov 15 '24 09:11 abingham

We are also trying mutmut3, so it will like depend on available time factor based on which one we select.

Currently, mutmut is winning on speed and reporting, Cosmic Ray is winning on being supper easy to get working.

I may submit a pull request for fun anyway if I can find time.

WillGibson avatar Nov 23 '24 07:11 WillGibson

I know this is quite an old issue, but #569 should fix this. Give it a try and let me know if there are any problems.

You mentioned that mutmut is winning on speed. In what way is it faster? The vast majority of CR's runtime is spent just running the test suite of the client code, so I don't know how to speed that up. Is it just that CR uses more operators? Or is it that we use them too bluntly?

abingham avatar Nov 08 '25 14:11 abingham

Thanks for the extra option @abingham.

I'm afraid I haven't been involved with the codebase we were trying to mutation test for about six months now so I am unable to test this change in the context I raised the issue, or remember the ins and outs of the speed thing.

I will give both tools another play with in my python sandpit next time I have time for non work playing.

WillGibson avatar Nov 12 '25 07:11 WillGibson