dart-lang / site-www

Source for Dart website
https://dart.dev
Other
945 stars 684 forks source link

Document code coverage utility #52

Closed kwalrath closed 1 year ago

kwalrath commented 8 years ago

From @sethladd on September 12, 2014 6:25

cc @cbracken

How do I get it? Run it? See the reports?

Copied from original issue: dart-lang/www.dartlang.org#1026

kwalrath commented 8 years ago

From @sethladd on September 12, 2014 6:27

I found this: https://github.com/dart-lang/coverage

Pretty decent README, but maybe we can help?

Also, we probably want to add it to our gallery of tools.

kwalrath commented 8 years ago

From @srawlins on September 12, 2014 7:34

Agreed! For now, there aren't really reports :/ it outputs lcov format, so then any tool that formats lcov into a report could be used.

But really there should be an end-to-end coverage reporting solution. Unfortunately that is a lot of work, in order to generate pretty HTML hierarchies like Javascript's Istanbul, Ruby's SimpleCov, Coveralls (service), including incremental coverage, Java's JaCoCo, the psychadelically-colored Go Cover, ...

kwalrath commented 8 years ago

From @cbracken on September 12, 2014 16:12

LCOV can be converted to an HTML bundle using the lcov tool. We do have a rudimentary pretty-printer, but the end result is basically a giant text dump.

There are a couple fixes/cleanups I should apply to the coverage README; one example is using --observe:NNNN instead of --enable-vm-service:NNNN --pause_isolates_on_exit.

kwalrath commented 8 years ago

From @srawlins on September 12, 2014 16:31

Also of note: I think of that most languages do not provide their own coverage (lcov-outputing) tools. Go and Ruby are 2 exceptions. So right now the dart-lang/coverage tool puts the language ahead of most others in terms of coverage-tooling.

That being said, dart is behind other languages in that the community has not provided a report-generating solution yet; "I just want to put something in my pubspec, run my tests, and open coverage/index.html" does not have an answer. We can only point to external tools, right now.

kwalrath commented 8 years ago

From @sethladd on September 12, 2014 16:33

Dart needs an extensible task runner where people can add tasks, like, oh, maybe code coverage? :)

kwalrath commented 8 years ago

From @srawlins on September 12, 2014 22:19

When you say "Document" code coverage utility, are you picturing a Tutorial?

kwalrath commented 8 years ago

From @sethladd on September 12, 2014 23:33

Eventually, we want a few tutorials on unit testing. First up, make it known that we have a way to generate code coverage. :)

kwalrath commented 8 years ago

From @Sfshaza on August 12, 2015 16:48

I sent Chris a CL 6 months ago to add this to the tools page but it wasn't stable yet. I just checked with him again and it's still not stable. Stay tuned...

kwalrath commented 8 years ago

From @cbracken on August 12, 2015 17:24

Yep - until the observatory coverage API is marked stable, I'm not convinced we can do the same with the coverage package.

Sfshaza commented 8 years ago

Just talked to @cbracken. The underlying VM service APIs are stable, so he plans on finalizing an API in the next month or two.

kwalrath commented 5 years ago

@cbracken is the API stable? I see from https://pub.dartlang.org/packages/coverage#-versions-tab- that the version isn't 1.0 yet.

atsansone commented 1 year ago

This issue covers concerns not within the current site and an external tool that the Dart team did not develop. Any issues with LCOV should be covered in their documentation. Closing this issue.

parlough commented 1 year ago

We actually have a package which interacts with Dart's VM service to collect coverage information(https://pub.dev/packages/coverage). We should likely still document this. I've opened a new issue at https://github.com/dart-lang/site-www/issues/4355 to track that work.

cbracken commented 1 year ago

Thanks! I suspect that's what this issue was referring to -- I wrote that package a long time ago (initially primarily for internal use within Google). package:coverage is an official Dart package that was written by a member of the Dart team (me, at the time, though I've been on the Flutter team since 2016), but I don't use like using my @google.com email for open source work. It's been maintained by others on the Dart team for the last few years.