block-forest / dart-coveralls

Calculate coverage of your dart scripts, format it to LCOV and send it to coveralls
https://pub.dartlang.org/packages/dart_coveralls
MIT License
27 stars 17 forks source link

Q: How to run with content shell? #47

Open jorgjanke opened 9 years ago

jorgjanke commented 9 years ago

When executing calc/report it assumes to run an stand-alone VM ...error message: The built-in library 'dart:html' is not available on the stand-alone VM. 'package:lightning/lightning.dart': error: line 29 pos 1: library handler failed import 'dart:html';

what do I need to do to get it to run with dartium or content shell ?

zoechi commented 9 years ago

AFAIR there is an old open issue in the Dart SDK repo about content-shell not working with code coverage. The protocol used for getting coverage data from the VM is being changed anyway. I guess they won't fix content-shell unless the new protocol is in place.

ltackmann commented 8 years ago

What is the status on this, testing polymer code with the new test library is usually done through the content shell and it would be wonderful to get code coverage of your web code.

eseidelGoogle commented 7 years ago

I suspect that the right resolution here would be to have package:test support coverage collection and then this package only needs to support converting to lcov (via package:coverage) and the upload-specific bits for coveralls.io.

See also https://github.com/dart-lang/test/issues/36.

I'm also not sure what the plan for content_shell tests & coverage is (if any). Presumably in a dart:html / dart2js / dart-dev-compiler (DDC) world the coverage would have to be computed from v8 (javascript) and then translated via sourcemaps back to dart? @kevmoo might know if there is support for that kind of thing already?

kevmoo commented 7 years ago

I'm also not sure what the plan for content_shell tests & coverage is (if any). Presumably in a dart:html / dart2js / dart-dev-compiler (DDC) world the coverage would have to be computed from v8 (javascript) and then translated via sourcemaps back to dart?

That's the theory. My guess is that we'd follow after work inside Chrome/V8 on natively supporting coverage -- details here. We need to chat with them to see if Chrome does the work to work back through sourcemaps or if we would.