mutagen icon indicating copy to clipboard operation
mutagen copied to clipboard

Using cargo mutagen in CI pipeline

Open dmoka opened this issue 2 years ago • 7 comments

Hey!

I wonder what the options are to use mutagen in CI pipelines. I could not find any support about it such as GitHub actions or so.

The simplest I could do is to run cargo mutagen in a CI pipeline task and based on the result I could stop or continue the pipeline run. What would be the easiest way to achieve this, what do you think?

Of course, I am also up to create/submit a PR and change the code regarding, if there is not yet a solution for it.

Thank you!

dmoka avatar Jun 20 '22 19:06 dmoka

Hi, what are your requirements for cargo mutagen for this task?

samuelpilz avatar Aug 05 '22 10:08 samuelpilz

I meant a similar thing like the 2nd point of this issue

Given this said, my posted issue is duplicated as it is a part of the abovementioned issue, so we can close this if you feel so too.

dmoka avatar Aug 08 '22 06:08 dmoka

Is this something like a mutationThreshold which pit for java has?

samuelpilz avatar Aug 09 '22 07:08 samuelpilz

What I meant is having different exit codes for the cargo mutagen command, so based on that we can see what to do in a CI pipeline run.

This pit for java seems to be related to the target files, but to be honest I never really used this tool within the java ecosystem....

dmoka avatar Aug 10 '22 11:08 dmoka

So cargo mutagen should return an error code (instead of success) if at least one mutation survived? Or should we have a threshold?

llogiq avatar Aug 30 '22 18:08 llogiq

The existence of equivalent mutations makes killing all mutations infeasible. Other mutation testing tools (and also coverage tools) typically use ratio-based thresholds.

samuelpilz avatar Aug 30 '22 18:08 samuelpilz

@llogiq yes, exactly. If the ratio-based threshold is not reached, then we could return an error code, so the CI pipeline can be stopped.

dmoka avatar Sep 05 '22 06:09 dmoka