go-gremlins / gremlins

A mutation testing tool for Go.
https://gremlins.dev
Apache License 2.0
187 stars 17 forks source link

[docs] Why are some gremlins disabled by default? And is that a complete set? #233

Closed bitwombat closed 5 months ago

bitwombat commented 5 months ago

Firstly, thanks for this cool tool @k3rn31 ! And contributors. I've been running it on my projects and just demoed it to my team.

I have two questions, which I will be happy to add to the docs when I understand the answers:

1) Why are some of the MutationTypes enabled while others are disabled? What is the reasoning, and what are the downsides to enabling each of the ones disabled by default?

2) Does that set of mutation types cover all possible code errors? I think not, for example, I don't see a way literals are mutated.

k3rn31 commented 5 months ago

Hello, and thank you!

Executing mutations can be costly as each one triggers the entire test suite. The default mutations are typically the most beneficial for a majority of projects. However, certain codebases may derive specific advantages from particular mutations. The decision to enable or disable mutations is contingent upon the unique requirements of each project, hence there isn't a one-size-fits-all answer.

Mutations alter specific sections of the code, and we plan to introduce more in the future. I would recommend starting with the default set or even fewer, and progressively enable more mutations as you continue to develop your project using Test-Driven Development (TDD) as per your needs.