Beskar is a tool which uses gambit
, a mutant generation tool from Certora
to perform mutation testing on foundry projects.
It allows developers to perform analysis of their tests and improve the test coverage by giving a smooth overview of results of testing on each mutant.
Mutation Testing is a type of white box testing that is performed in order to evaluate the quality of existing software tests. Mutation testing is related to modification a program in small ways. The program files obtained after these modifications are called mutants. It focuses to help the tester develop effective tests or locate weaknesses in the test data used for the program.
- Beskar is written in Rust. You'll need to install Rust and Cargo.
- Gambit uses solc, the Solidity compiler, to generate mutants. You'll need to have a solc binary that is compatible with the project you are mutating.
- lastly, install gambit by cloning the Gambit repository and run
cargo install --path .
Simply run the following command in your terminal
cargo install beskar
Navigate to your foundry project root and run the following command
beskar run .
The execution result will be logged to the terminal when it finishes the execution.
Note: This repository is still under development.