Reading results
Every mutation ends in one status. The statuses decide your mutation score and tell you where your tests are weak.
Open the results
After a run, open the viewer. It reads the reports directory and shows every mutation with its diff.
gooze report viewKeys and flags: gooze report view. File layout: Report format.
Statuses
killed: the tests of the package that owns the mutated file failed for the mutation (go test -count=1on that package). Usually good: your tests caught the change.survived: the package tests still passed. Usually a weak or missing assertion.not_covered: the mutated line is uncovered in the profile passed with--coverage-profile, so Gooze skipped its tests. It counts as a survivor (it lowers the score) but is tallied separately.timeout: the tests exceeded--mutation-timeout(default 120 seconds). A timeout is not a kill.error: the mutant did not compile; excluded from the score.
A missing test file does not skip anything: Gooze runs the sibling <name>_test.go if it exists, otherwise any *_test.go in the same package. If the package has no test file at all, the mutation is reported as survived.
Mutation score
score = killed / (all mutations - error)- Only
killedcounts in your favour.survived,not_covered, andtimeoutall lower the score. errormutants (did not compile) are left out entirely. With no scorable mutations the score is 100%.gooze run,gooze report merge, and a non-interactivegooze report viewprint it asMutation score: NN.NN%. To fail CI below a minimum, see the score gate._index.yamlstores the raw counts but not the score; itsfailed_mutationslumpserrorandtimeouttogether, so use the printed score rather than recomputing it.
What to do when you see a survivor
A survivor is a hint. It usually means: your tests do not check this behavior.
- Open the diff in
gooze report view. - Ask: what behavior changed? Each mutation operator explains what a survivor of its kind usually means.
- Add a test that would fail if this behavior changes.
- Run Gooze again and see if it is killed now.
If the code genuinely should not be tested (generated code, debug helpers), skip it instead: see Ignoring code.