Skip to content

Quick start

To execute a mutation test run, from the root of a Go module execute:

$ gremlins unleash #(1)
  1. If unleash is too long to type for you, you can use run or r which will do the same.

Gremlins only tests mutations of parts of the code already covered by test cases. If a mutant is not covered, why bother testing? You already know it will not be caught. In any case, Gremlins will report which mutations aren't covered.

Gremlins will report each mutation as:

  • RUNNABLE: In dry-run mode, a mutation that can be tested.
  • NOT COVERED: A mutation not covered by tests; it will not be tested.
  • KILLED: The mutation has been caught by the test suite.
  • LIVED: The mutation hasn't been caught by the test suite.
  • TIMED OUT: The tests timed out while testing the mutation: the mutation actually made the tests fail, but not explicitly.
  • NOT VIABLE: The mutation makes the build fail.