Skip to content

About Mutations

Mutations are the core of Gremlins' activity. Each mutation belongs to a group that defines its flavour. These groups are called mutation types. Gremlins supports various mutation types, each comprising one or more mutations.

When Gremlins scans the source code under test, it looks for mutations and for each found mutation creates a mutant. A mutant is the "gremlin" that actually changes the source code.

Each mutant type can be enabled or disabled, and only a subset of mutations is enabled by default.

MutationType Default
ARITHMETIC BASE YES
CONDITIONALS BOUNDARY YES
CONDITIONALS NEGATION YES
INCREMENT DECREMENT YES
INVERT NEGATIVES YES
INVERT LOGICAL FALSE
INVERT LOOP CTRL FALSE
INVERT ASSIGNMENTS FALSE
INVERT BITWISE FALSE
INVERT BWASSIGN FALSE
REMOVE_SELF_ASSIGNMENTS FALSE