-
Notifications
You must be signed in to change notification settings - Fork 27
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
Coverage report #230
Coverage report #230
Conversation
How does coverage output affect whether the Travis job fails or passes? What's the scope of this PR? Is there an associated GH issue? |
the scope is only for showing the coverage report. |
Thanks. I'm seeing the following output in Travis: For unit tests (RITEway):
For integration tests (Alsatian):
Is this the expected output? What's up with the |
Also: it's a good opportunity to update the README's coverage section. Lines 277 to 284 in 6a00eaf
|
@lautarodragan |
Regarding integration test: well, before shown wrong information because it was over test files
now the information it's about the app files
|
well, we have a problem with the option |
If it's only a problem with Alsatian maybe we can ignore it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this one with Request changes
for now
Report: Unit tests: it's already. Several files are untracked until we will do the unit tests. It was tested. Integration tests: At the moment there are several issues with this report. there is no official documentation about how to get the report for the integration tests. I left this issue, is like an introduction to the problem Keeping in mind that the report doesn't work properly. What is your opinion with the report for the integration test? When we decided the path, I will update the README |
Is it possible report on untested files for the unit test? Or do they also have a problem with the --all flag? |
the
these will be tracked when you do the unit test. Is a bug, I think yes |
ok. so typescript is interfering here somehow? |
seems is Typescript, I leave these links Coverage reports don't include TS files unless explicitly compiled
Typescript code coverage with "all": true flag reports incorrect missing coverage Problems with --all --all fails with ts-node (Typescript) Including all files when not using require or register Better TypeScript coverage support in Istanbul |
thanks for thoroughly documenting that Walter!
If we made sure there was a unit test file to every code file (even if it
only ran the most basic test),
would that get us around the problem? Every file would be required so every
file by definition would
show up in the coverage report.
We could write a script that makes sure every file has a matching unit test
file and have travis run it so newly added files don't sneak thru.
…On Thu, Jul 19, 2018 at 11:40 AM Walter Zalazar ***@***.***> wrote:
seems is Typescript, I leave these links
*Coverage reports don't include TS files unless explicitly compiled*
istanbuljs/nyc#742 <istanbuljs/nyc#742>
open: Dec 8 2017
last comment: Jun 15 2018
status: OPEN
*--all does not include .ts files that use typecasting*
istanbuljs/nyc#679 <istanbuljs/nyc#679>
open: Sep 22 2017
last comment: Jun 16 2018
status: OPEN
*Typescript code coverage with "all": true flag reports incorrect missing
coverage*
istanbuljs/nyc#643 <istanbuljs/nyc#643>
open: Aug 11 2017
last comment: May 17 2018
status: CLOSED
*Problems with --all*
istanbuljs/nyc#603 <istanbuljs/nyc#603> (Jun 11
2017 - Mar 29 2018) OPEN
open: Jun 11 2017
last comment: Mar 29 2018
status: OPEN
*--all fails with ts-node (Typescript)*
istanbuljs/nyc#504 <istanbuljs/nyc#504>
open: Jan 26 2017
last comment: 1 Jul 2018
status: CLOSED
*Including all files when not using require or register*
istanbuljs/nyc#776 <istanbuljs/nyc#776>
open: Feb 10 2018
last comment: Feb 17 2018
status: OPEN
*Better TypeScript coverage support in Istanbul*
microsoft/TypeScript#24993
<microsoft/TypeScript#24993>
open: Jun 15 2018
last comment: Jun 15 2018
status: OPEN
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#230 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAB1z0SoO1bmo4pnexcAE_rPQLYoeCJ0ks5uIMSmgaJpZM4VR7Tl>
.
|
our
|
package.json
Outdated
@@ -68,10 +70,11 @@ | |||
"babel-plugin-module-resolver": "3.1.1", | |||
"concurrently": "3.6.0", | |||
"nodemon": "1.18.3", | |||
"nyc": "12.0.2", | |||
"nyc": "https://github.com/poetapp/nyc.git", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you specify a commit hash? This way if changes are pushed the master branch of poetapp/nic they won't get picked up automatically by the node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good idea!!! 👍
Looks like there's still some files missing from that report. In src/API: Router.ts, WorkController.ts |
these files have a problem with the instrument because it has a decorator in the constructor. I have to create a unit test for this files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @wzalazar!! This will really help us as we increase our unit test coverage.
@warrenv thanks!!! from here we start...
|
I need your review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work @wzalazar !
Description of Changes
Introduces report of coverage for unit test and integration test.
I run the coverage separated because are different instances and when you run another after the first one it will rewrite the input. Maybe when we have the all test in the same instance we will be able to capture the all the coverage together.
needed-by #11
PR Review Checklist