Mewt is a mutation testing tool. Mutation testing works by making small
changes (mutations) to your source code — like replacing + with - or
swapping true for false — and then running your test suite against each
change. If your tests still pass after a mutation, that's a gap: the mutant
"survived," meaning your tests didn't catch the change.
This tells you something code coverage alone can't: not just whether your tests execute a line, but whether they'd actually fail if that line were wrong.
Supported languages:
sui, iota, aptos; use move, move/sui, move/iota, or move/aptos)For details on how campaigns work under the hood, see
How it works. For the language/dialect resolver contract,
see Language resolution contract.
To add support for a new language, see Adding a language.
For mutation test suite structure and shared test helper conventions, see
tests/README.md.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/trailofbits/mewt/releases/latest/download/mewt-installer.sh | sh
Prebuilt installers are currently provided for macOS (aarch64) and Linux (x86_64). Windows is currently unsupported.
To build from source instead, see Building from source.
mewt run path/to/contract.rs
mewt run path/to/project
mewt print mutations --language rust
mewt print mutations --language move/iota
mewt print mutants --target path/to/contract.rs
mewt results --target path/to/contract.rs
mewt run path/to/contract.rs --comprehensive
Mewt reads configuration from the nearest mewt.toml found by walking up from the current working directory. CLI flags override config file values.
You can also point to an explicit config file with --config path/to/mewt.toml.
See Configuration for the full reference and src/example.toml for a commented example.
For .move files, mewt resolves dialect in this order:
--language move/iotalanguages.move.dialect in mewt.toml[languages.move].dialect in mewt.tomlsuiExamples:
# Explicit dialect from CLI
mewt print mutations --language move/sui
Compatibility note:
move, move/sui, move/iota, and move/aptos.This repo includes example files you can try:
tests/cpp/example.cpptests/daml/example.damltests/go/example.gotests/javascript/example.js (plus example.ts, example.jsx, example.tsx)tests/rust/example.rstests/solidity/example.soltests/move/example.moveC
98.7%
Mewt is a mutation testing tool. Mutation testing works by making small
changes (mutations) to your source code — like replacing + with - or
swapping true for false — and then running your test suite against each
change. If your tests still pass after a mutation, that's a gap: the mutant
"survived," meaning your tests didn't catch the change.
This tells you something code coverage alone can't: not just whether your tests execute a line, but whether they'd actually fail if that line were wrong.
Supported languages:
sui, iota, aptos; use move, move/sui, move/iota, or move/aptos)For details on how campaigns work under the hood, see
How it works. For the language/dialect resolver contract,
see Language resolution contract.
To add support for a new language, see Adding a language.
For mutation test suite structure and shared test helper conventions, see
tests/README.md.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/trailofbits/mewt/releases/latest/download/mewt-installer.sh | sh
Prebuilt installers are currently provided for macOS (aarch64) and Linux (x86_64). Windows is currently unsupported.
To build from source instead, see Building from source.
mewt run path/to/contract.rs
mewt run path/to/project
mewt print mutations --language rust
mewt print mutations --language move/iota
mewt print mutants --target path/to/contract.rs
mewt results --target path/to/contract.rs
mewt run path/to/contract.rs --comprehensive
Mewt reads configuration from the nearest mewt.toml found by walking up from the current working directory. CLI flags override config file values.
You can also point to an explicit config file with --config path/to/mewt.toml.
See Configuration for the full reference and src/example.toml for a commented example.
For .move files, mewt resolves dialect in this order:
--language move/iotalanguages.move.dialect in mewt.toml[languages.move].dialect in mewt.tomlsuiExamples:
# Explicit dialect from CLI
mewt print mutations --language move/sui
Compatibility note:
move, move/sui, move/iota, and move/aptos.This repo includes example files you can try:
tests/cpp/example.cpptests/daml/example.damltests/go/example.gotests/javascript/example.js (plus example.ts, example.jsx, example.tsx)tests/rust/example.rstests/solidity/example.soltests/move/example.moveC
98.7%