domohuhn / mutation-test

Automated mutation testing for any programming language
BSD 3-Clause "New" or "Revised" License
20 stars 3 forks source link

Are config file working correct? #26

Closed VladislavSournine closed 1 month ago

VladislavSournine commented 1 month ago

Run mutation-test -s Got config file. Change in to my file run again dart run mutation_test ./config.xml Got error: Error while processing: Error: There must be only one <threshold> element in the inputs!

But config contains defaults:

`

    <rating over="95" name="A"/>
    <rating over="80" name="B"/>
    <rating over="60" name="C"/>
    <rating over="40" name="D"/>
    <rating over="20" name="E"/>
    <rating over="0" name="F"/>
</threshold>`

Where is my mistake?

domohuhn commented 1 month ago

The problem is that the builtin-ruleset already has the thresholds defined. The rules you generate via the -s option are always injected into your program call. I will have to include a check for user defined values before including the builtin thresholds.

As workaround for now you can either remove the thresold section from you config your add the flag --no-builtin

domohuhn commented 1 month ago

The problem should be fixed in v1.7.0