Ability to export code coverage results for use by analysis tools
Reported by
bed...@technicalpursuit.com,
May 1 2017
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30 Steps to reproduce the problem: This is an enhancement What is the expected behavior? This is an enhancement What went wrong? This is an enhancement Did this work before? N/A Chrome version: Version 60.0.3086.0 (Official Build) canary (64-bit) Channel: n/a OS Version: OS X 10.12.4 Flash Version: The ability to export code coverage profiles in some sort of format (possibly JSON) for use by external tooling (e.g. command line tools) would be most welcome for those of us who have Web application authoring frameworks. We have existing command line tools that currently just do minification but that could be run against this coverage data to produce an application package 'stripped' of unused code.
,
May 2 2017
There is no bug here. This is an enhancement to existing functionality. Therefore, there are no manual reproducible steps. Insofar as what "expected behavior" might be, I would expect to be able to save the code coverage profile to my development machine's filesystem for use by my CLI tools. Thanks. Cheers, - Bill
,
May 2 2017
Thank you for providing more feedback. Adding requester "sureshkumari@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 2 2017
,
May 3 2017
Considering this as feature request and marking it as Untriaged to get more inputs from dev team. Thanks.
,
May 19 2017
,
Oct 25 2017
There's a Stack Overflow question with 12 upvotes requesting this feature: https://stackoverflow.com/questions/45106841
,
Dec 6 2017
Would be pretty useful feature.
,
Jan 24 2018
Agreed, i want this. Now i have to go write my own parser because this doesn't exist ANYwhere. Some tools grab all css inline + external and plop into one window... not useful. Even the old firefox dust-me tool does not actually have this feature in spite of some reports otherwise. I verified it
,
Apr 2 2018
Would also like to see this feature. Currently at my place of work, we are including far more JavaScript files per page than we would like. For example, some files we include are only using about 10% of the contents of a JS file. It's enough to warrant including the entire file, but since 90% is being is not used, it would be really useful to export only the JS actually use and including that on the page instead to reduce the amount of unnecessary JavaScript from being included. Plenty of tools exist out there for doing this with CSS, but there are none for JS. I would find tremendous benefit out of this feature.
,
Aug 11
Any news on this?
,
Sep 21
Issue 887041 has been merged into this issue.
,
Sep 21
,
Oct 24
Any update on the implementation of described feature?
,
Dec 3
,
Dec 5
,
Dec 5
I would like to see this feature so that the built in Chrome coverage can be used to collect coverage for compiled Dart code when running tests. So between sourcemaps and chrome coverage it will give me coverage of my original source language. This could apply to Dart, typescript, or any other compile to JS language.
,
Dec 11
,
Dec 11
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/384dfbd0667873ec84d922bfc7b657045a66a524 commit 384dfbd0667873ec84d922bfc7b657045a66a524 Author: Pavel Feldman <pfeldman@chromium.org> Date: Tue Dec 11 22:26:02 2018 DevTools: allow exporting code coverage data. Bug: 717195 Change-Id: I0360d0dea935d2da11179dd7380f36bf52b85ced Reviewed-on: https://chromium-review.googlesource.com/c/1370862 Commit-Queue: Pavel Feldman <pfeldman@chromium.org> Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Cr-Commit-Position: refs/heads/master@{#615693} [modify] https://crrev.com/384dfbd0667873ec84d922bfc7b657045a66a524/third_party/blink/renderer/devtools/front_end/coverage/CoverageModel.js [modify] https://crrev.com/384dfbd0667873ec84d922bfc7b657045a66a524/third_party/blink/renderer/devtools/front_end/coverage/CoverageView.js [modify] https://crrev.com/384dfbd0667873ec84d922bfc7b657045a66a524/third_party/blink/renderer/devtools/front_end/coverage_test_runner/CoverageTestRunner.js [add] https://crrev.com/384dfbd0667873ec84d922bfc7b657045a66a524/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-export-expected.txt [add] https://crrev.com/384dfbd0667873ec84d922bfc7b657045a66a524/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-export.js [modify] https://crrev.com/384dfbd0667873ec84d922bfc7b657045a66a524/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-expected.txt [modify] https://crrev.com/384dfbd0667873ec84d922bfc7b657045a66a524/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-filter-expected.txt [modify] https://crrev.com/384dfbd0667873ec84d922bfc7b657045a66a524/third_party/blink/web_tests/http/tests/devtools/coverage/resources/basic-coverage.html
,
Dec 13
,
Dec 13
Excellent thanks! I saw it show up in Canary.
,
Dec 14
I don't understand why is this closed... please explain how does this allow us to export only the used (green) css on the coverage tab. I'm on Version 73.0.3639.0 (Official Build) canary (64-bit) and I see no option to export used CSS anywhere. How do I extract the used css only? http://prntscr.com/luq610
,
Dec 15
This doesn't seem to export with the sourcemaps applied. Is that intentional? If not, is there another issue for getting sourcemapped coverage?
,
Dec 15
I dug around and found a relevant issue and comment on it. https://crbug.com/818806 |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by sureshkumari@chromium.org
, May 2 2017Labels: Needs-Feedback