http-rs / tide

Fast and friendly HTTP server framework for async Rust
https://docs.rs/tide
Apache License 2.0
5.04k stars 322 forks source link

Track test coverage #490

Open yoshuawuyts opened 4 years ago

yoshuawuyts commented 4 years ago

As we're starting to stabilize Tide's design, we'll want to work to improve resilience. A big part of that is to write tests to prevent regressions. To help inform us which parts of Tide are currently undertested it'd be good if we could have a (documented) way gather test coverage.

Perhaps we may want to integrate it as part of CI eventually as well, but for now simply having a way to measure code coverage would be great.

jeamland commented 4 years ago

Tarpaulin seems to work (but requires Linux): https://gist.github.com/jeamland/327032e1025efa620956926c99c90900

I tried using Mozilla's grcov but it requires nightly and breaks on a couple of upstream issues:

jeamland commented 4 years ago

Here's the grcov output when run under Linux using the patched-but-as-yet-unreleased version of basic-cookies:

http://files.jeamland.net/tide-coverage/