Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document code coverage utility #52

Closed
kwalrath opened this issue Jul 21, 2016 · 14 comments
Closed

Document code coverage utility #52

kwalrath opened this issue Jul 21, 2016 · 14 comments
Labels
act.wait-for-customer Needs response from customer d.enhancement Improves docs with specific ask from.dartlang.org Reported via move from www.dartlang.org t.cli-tools Relates to the dart command line tools

Comments

@kwalrath
Copy link
Contributor

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-archive/www.dartlang.org#1026

@kwalrath
Copy link
Contributor Author

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
Copy link
Contributor Author

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 kwalrath added d.enhancement Improves docs with specific ask t.cli-tools Relates to the dart command line tools from.dartlang.org Reported via move from www.dartlang.org labels Jul 21, 2016
@kwalrath
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

From @srawlins on September 12, 2014 22:19

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

@kwalrath
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link

Sfshaza commented Sep 6, 2016

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

@Sfshaza Sfshaza removed their assignment Jul 15, 2017
@kwalrath
Copy link
Contributor Author

kwalrath commented Jan 5, 2019

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

@kwalrath kwalrath added the act.wait-for-customer Needs response from customer label Jan 5, 2019
@atsansone
Copy link
Contributor

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
Copy link
Member

parlough commented Nov 8, 2022

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 #4355 to track that work.

@cbracken
Copy link
Member

cbracken commented Nov 18, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
act.wait-for-customer Needs response from customer d.enhancement Improves docs with specific ask from.dartlang.org Reported via move from www.dartlang.org t.cli-tools Relates to the dart command line tools
Projects
None yet
Development

No branches or pull requests

5 participants