Support for custom mutators
See original GitHub issueIs your feature request related to a problem? Please describe.
Follow up of https://github.com/stryker-mutator/stryker-net/issues/1561
There may be scenarios where the implemented mutators do not fit the application needs, nor the maintenance burden in the library justifies adding those mutators to core library. For that it would be nice to have some sort of plugin system: new mutators can be created by the community and used as opt-in.
The provided example is mutations for System.Linq.Expressions.Expression
calls, which while might be a niche for most applications, they can be a must have in other scenarios.
Describe the solution you’d like
Ideas on top of the table:
- Lookup assemblies with types implementing IMutator interface.
- tbd
Describe alternatives you’ve considered
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Custom Mutators | AFLplusplus
Custom mutators can be passed to afl-fuzz to perform custom mutations on test cases beyond those available in AFL. For example, to enable...
Read more >testing: custom mutator support for fuzzing · Issue #48815 ...
A possible solution is to provide support for custom mutators, so that users can implement custom mutators for various fuzz targets and reuse ......
Read more >How do custom mutations work? : r/starcraft2coop
Map loads, you select mutators and click start, the game starts. Upvote 4
Read more >Mutators/List of custom mutations | StarCraft Wiki - Fandom
Players can implement up to ten different mutators to a single mission. To implement these mutations, players will need a commander of at...
Read more >Extensions and Mutators | Blockly
A mutator is a special kind of extension that adds custom serialization, and sometimes UI, to a block. Extensions. Extensions are functions that ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I suggest a config option with custom mutator names (to add to default mutators) and searching in the project output folders (bin/debug) for dll’s matching a predefined format. This is how vstest for example also works (all vstest adapters must end in .testadapter.dll). As long as the dll is referenced in one of the projects such as the test project the dll will be copied to the output folder and will be available for us to load.
This would mean users can take advantage of nuget to distribute their custom mutators.
Having add-in mutations could help corner cases, but could also be interesting (libraries could distribute their specific mutators). Bur, in order to avoid having to deal with the dependencies, I would suggest either:
Currently, the dependencies are
IStrykerOptions
andMutation
. I thinkMutation
could be replaced by a tuple of some sort. The problem is withIStrykerOptions
, which is often updated. Any way, dealing with options for custom mutators requires a specific design.Another solution could be to have a dedicated/simplified signature for custom mutators. This may be a good idea for a beta phase.