xd009642 / tarpaulin

A code coverage tool for Rust projects
https://crates.io/crates/cargo-tarpaulin
Apache License 2.0
2.48k stars 175 forks source link

Per-test coverage #662

Open ffMathy opened 3 years ago

ffMathy commented 3 years ago

I am building a Go provider for Pruner (a CLI that runs only the tests that ran through the lines you changed, saving you time).

For that, I need to be able to see per-test coverage. Not just a full coverage report after all tests have run, but I need a way to know which tests ran through what line.

Is that possible with this library?

xd009642 commented 3 years ago

Not easily possible, you could use the test filtering in cargo to run tarpaulin for every individual test one after the other and then use the coverage report for each test to do it. But that does feel particularly onerous

Zylatis commented 2 years ago

+1 for this being a native feature, if possible. I have written some stuff to do exactly what you describe but it is a bit cantankerous and seems way slower than i would have thought, though that might be me mismanaging build caches.