A mutation testing tool for Solidity contracts
npm install eth-mutantseth-mutants
===========
eth-mutants is a mutation testing tool for Solidity contracts.
```
npm install eth-mutants
`preflight
The command will show the number of possible mutations found`
and print some compact diffs for each mutation. Use this to understand
how long it may take to visit all mutations and please report any invalid
ones.
The test command will start applying mutations and running your tests to
check if they pass. It will report the result of each mutation.
``
eth-mutants test
This tools makes some important assumptions about your workspace, which should
hold true for most Truffle-based projects, but I plan on adding options to
override them soon:
* Your contract files are in the contracts/ directorynpm test
* You run your tests with which returns a non-zero error code in
case of failure.
The only mutation implemented at the moment is called boundary-condition<
and replaces adn > for <= and >=` and vice-versa. Contributions for
mutators are especially welcomed.
Federico Bond
MIT