Code coverage based on concrete tests only #309
Labels
effort: low
Easy or tiny task that takes less than a day.
priority: 2
We will do our best to deal with this.
type: ci
Changes to our CI configuration files and scripts.
work: clear
Sense-categorize-respond. The relationship between cause and effect is clear.
Currently, code coverage includes both fuzz and concrete tests. The fuzz tests require that functions are not reverting. That's why we use
assume
andbound
in them. Thus, they only test for non reverting situations.On the other hand, concrete tests is to test for each and every line and all possible branches, which is what coverage should be telling us. Currently, even if some of the branches are missed in concrete but called in fuzz, the coverage will not be able to detect that.
An example is missing
notNull
modifier inisTransferrable
(cantina finding).Thus, I propose to run coverage only using concrete tests.
RFC @sablier-labs/solidity.
Here is a comparison. As you can see the coverage for
SablierFlow.sol
went down when calculating it based on concrete tests, demonstrating that there are missing concrete tests for some lines / branches.--mp "tests/{integration}/**/*.sol"
--mp "tests/integration/concrete/**/*.sol"
PS: similar suggestion for lockup.
The text was updated successfully, but these errors were encountered: