Closed 0xMimir closed 1 year ago
You can do it by using the config files to specify multiple tarpaulins run to do and merge together
Thanks for reply, I found the solution, for anyone having the same issue create tarpaulin.toml
and for example above .toml
would contain:
[subtract_test]
args = ["--ignored", "test_project_seeding"]
[divide_test]
args = ["--ignored", "test_data_seeding"]
[test]
Cargo tarpaulin will automatically merge results of every run.
In most project you have many tests, but order of those tests, where and when they are run is different, so in most cases we have unit tests, and rest of tests have
#[ignore]
and we use test script to run them with correct params, and in correct order, this is example test scriptTests
test_project_seeding
andtest_data_seeding
have#[ignored]
so they are not ran by default,test_project_seeding
is used to test if project correctly setups everything needed to run project,test_data_seeding
is used to test adding data to DB and seed data that is used forcargo test
, ifcargo test
is replaced withcargo tarpaulin
I get 3 different outputs, with unrelated coverage results. when generating report withgrcov
I get full code coverage from all three runs these are commands I use:Is there a way to generate full code coverage like with grcov using tarpaulin, If there is not I would suggest that as a feature