Mutation testing is software testing technique that introduces bugs (mutations) on the source code and verify if the automated tests are able to catch these bugs. I created mutation-core
(a mutation testing tool) to perform mutation testing on Bitcoin Core codebase. It does not spend time by creating invalid mutants and can deal with some nuances of Bitcoin Core.
However, mutation testing is expensive since we have to compile and run the tests for every single mutant. That is, running mutation testing for every PR may be extremely costly. Instead, we could perform mutation testing once a week based on master branch and make it available for developers to check and decide to write better and/or more tests. That said, I have been doing it and publishing the reports at https://bitcoincore.space.
At this moment, I perform mutation testing for the following critical/more important code: src/wallet/coinselection.cpp
, src/script/interpreter.cpp
, src/consensus/tx_verify.cpp
, `src/consensus/