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
Only show 100%, not listing the coverage of each file. #38
Comments
Same here, with web-component-tester-istanbul@0.10.0 and web-component-tester@6.0.0-prerelease.4: "istanbul": {
"dir": "coverage",
"reporters": ["text-summary", "lcov"],
"include": [
"**/*.js",
"**/*.html"
]
} |
In the coverage output It appears that the I can't tell if this issue is related to PolymerLabs/polyserve#138; at this point, we need some guidance from the |
Any update here? Looks to me like @ctreatma is correct about the middleware not being used after being added and that we might need more information from the |
Does this merged PR help in any way? Polymer/web-component-tester#445 |
@elf-pavlik I tested with web-component-tester#6.0.0-prerelease.7, which includes that fix. Fixed the |
Root Cause:The root cause is My patchesI created patched versions of I am wondering how to merge the patches into the official versions. Any suggestions on my approach? In addition, I patched Forks with the patches:https://github.com/t2ym/web-component-tester/tree/wct6-plugin npm packages with the patches.
bower package with the patches:
Example project with patched
|
@t2ym I tried your forked repos but the issue still remains. It always shows 100% (0/0). Has anyone else had any success? |
@srk289 Thank you for trying my forks. Can you please try this successful example with the patched Example successful coverage with the patched modules$ node --version
v6.9.2
$ git clone https://github.com/t2ym/i18n-element.git
$ cd i18n-element
$ npm install
$ bower install
$ ./node_modules/.bin/wct
Received undefined
Creating Sauce Connect tunnel
Sauce Connect log: /tmp/wct11736-9226-v1w7q3.h4il6gk3xr/sc.log
Sauce tunnel active: b373cf94-4c35-4cd6-a6a8-0f189506822d
Windows 10 chrome Beginning tests via http://localhost:8081/components/i18n-element/generated-index.html?cli_browser_id=0
OS X 10.12 safari 10 Beginning tests via http://localhost:8081/components/i18n-element/generated-index.html?cli_browser_id=3
OS X 10.11 safari 9 Beginning tests via http://localhost:8081/components/i18n-element/generated-index.html?cli_browser_id=5
Windows 8.1 IE 11 Beginning tests via http://localhost:8081/components/i18n-element/generated-index.html?cli_browser_id=4
Windows 10 microsoftedge 13 Beginning tests via http://localhost:8081/components/i18n-element/generated-index.html?cli_browser_id=2
Windows 10 chrome Tests passed
Windows 10 firefox Beginning tests via http://localhost:8081/components/i18n-element/generated-index.html?cli_browser_id=1
OS X 10.12 safari 10 Tests passed
Windows 8.1 IE 11 Tests passed
OS X 10.11 safari 9 Tests passed
Windows 10 microsoftedge 13 Tests passed
Windows 10 firefox Tests passed
Test run ended with great success
=============================== Coverage summary ===============================
Statements : 100% ( 175/175 )
Branches : 91.49% ( 172/188 )
Functions : 100% ( 25/25 )
Lines : 100% ( 170/170 )
================================================================================ As per @srk289 's request, a simpler example with this change$ git clone https://github.com/t2ym/paper-button.git
$ cd paper-button
$ npm install
$ bower install
$ ./node_modules/.bin/wct |
@t2ym Terrific. Thanks heaps for your help. |
Actively watching this thread with anticipation. Thank-you for taking ownership of this 👍 |
At this point, Polymer 2 has been released. @t2ym - Have polyserve and/or web-component-tester incorporated your bug fixes? I don't see any linked issues or PRs. |
web-component-tester#6.0.0 was released two days ago without having addressed a number of issues. Running it still exhibits this same behavior. |
@marybeshaw No. As described above, my patches surely work but trickily change the core design of the modules, which I am afraid Google would not accept. I am using my patched versions for my projects without troubles and currently it is too much for me to make tested high quality pull requests and persuade Google reviewers, who are very busy and seemingly putting a low priority on code coverage, to accept the design changes. web-component-tester#6.0.0 has been merged into my forks with the patches. |
wct-istanbulFor easier maintenance and deployment, the patched plugin is published as wct-istanbul from wct-istanbul branch of my fork. The plugin requires the patched t2ym/web-component-tester#6.0.0-wct6-plugin.5 or later. Forks with the patches:https://github.com/t2ym/web-component-tester/tree/wct6-plugin-scoped npm packages with the patches.
bower package with the patches:
|
My fork wct-istanbul 0.12.0 now supports the latest IstanbulJS libraries as nyc v11
|
When `wct` moved from `serve-waterfall` to `polyserve`, it broke this plugin's usage of the `prepare:webserver` hook. With newer versions of `wct`, the app used by `wct` to serve component files has a wildcard request handler registered that prevents calling the instrumentation middleware. Version 6.4.0 of `wct` adds a new `define:webserver` hook so that plugins can inject middleware to be executed before the `polyserve` wildcard handler. This replaces the `prepare:webserver` handler with one for the new `define:webserver` event, allowing this plugin to instrument code on the fly again. Also fixes thedeeno#41
Followed the example here but got report only shows 100%. It is not listing the file name and the corresponding coverage of each file.
{
"suites": ["path/myTestSuite.html"],
"verbose": true,
"plugins": {
"local": {
"browsers": ["chrome"]
},
"istanbul": {
"dir": "./coverage",
"reporters": ["text-summary", "lcov"],
"include": [
"path/some.html",
"path/some.js",
"path/some.html",
"path/some.js",
"path/some.html",
"path/some.js"
],
"exclude": []
}
}
}
Would we list the coverage of each file? Like the unit test coverage of java.
First level, it shows the percentage of a java Component
Second level, it shows the percentage of a namespace.
Third level, it shows the percentage of a java file.
The text was updated successfully, but these errors were encountered: