Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

feat(tests): Add client and server test coverage to Gulp #1466

Merged
merged 3 commits into from
Sep 3, 2016

Conversation

hyperreality
Copy link
Contributor

feat(tests): Add client and server test coverage to Gulp

This runs server-side test coverage using grunt-istanbul and sets karma
to run coverage tests, when gulp test:coverage is run.

I need a project maintainer to help integrate coveralls to this. After that is
done, Gulp should be 100% ready to replace Grunt.

Completes one of the #1175 milestones, also #1231 can be closed

@lirantal
Copy link
Member

@hyperreality awesome, what do you need my help with?

@simison
Copy link
Member

simison commented Aug 30, 2016

@lirantal
Copy link
Member

True, that will kick off the coveralls so we can see some results, and also maybe we should update the README/npm scripts in package.json for a coverage command.

@hyperreality
Copy link
Contributor Author

@lirantal I wasn't quite sure how to integrate coveralls at the time, but I found a package gulp-coveralls so I'll have a go at implementing that with my next commit.

@simison yes I'll edit that with my next commit here, good catch.

@@ -50,6 +50,7 @@
"glob": "~7.0.0",
"grunt": "~1.0.1",
"grunt-cli": "~1.2.0",
"gulp-istanbul": "^1.1.1",
Copy link
Member

@ilanbiala ilanbiala Aug 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ilanbiala thanks, noted.

@coveralls
Copy link

coveralls commented Aug 30, 2016

Coverage Status

Changes Unknown when pulling 82c0ac58e28632cf85332f913fa67bf602e57a16 on hyperreality:gulp-coverage into * on meanjs:master*.

3 similar comments
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 82c0ac58e28632cf85332f913fa67bf602e57a16 on hyperreality:gulp-coverage into * on meanjs:master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 82c0ac58e28632cf85332f913fa67bf602e57a16 on hyperreality:gulp-coverage into * on meanjs:master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 82c0ac58e28632cf85332f913fa67bf602e57a16 on hyperreality:gulp-coverage into * on meanjs:master*.

@hyperreality
Copy link
Contributor Author

Okay this is pretty weird stuff. Here are the results of the grunt coverage task: https://coveralls.io/builds/7677048
And here are the results of the new gulp coverage task: https://coveralls.io/builds/7677185

Karma is testing a different set of client side files each time! The original grunt coverage test misses out client-side directives, controllers and services. On the other hand, the gulp coverage test misses out all 'config' directory files which were included in the grunt task.

I'll take another look at this tomorrow.

@lirantal
Copy link
Member

Ok, keep us posted @hyperreality, this one is really important to merge when ready.

@hyperreality
Copy link
Contributor Author

Okay, I think I cracked it. There was a bug with the previous Grunt coverage tasks never submitting client-side tests to coveralls. This new Gulp coverage task fixes that by merging the client and server side test reports and submitting them together. Thus the number of files being recorded for coverage has increased.

Should be ready now I believe.

@hyperreality
Copy link
Contributor Author

I can't seem to get the checks kicking off on this one.

@mleanos
Copy link
Member

mleanos commented Aug 31, 2016

@hyperreality Looks like there's a conflict with your version of the branch & master. Try re-basing your local master branch from upstream, and then re-basing your PR branch from your local master.

@hyperreality
Copy link
Contributor Author

@mleanos Cheers, I didn't see those new commits coming in.

@coveralls
Copy link

coveralls commented Sep 1, 2016

Coverage Status

Changes Unknown when pulling 6aacfae on hyperreality:gulp-coverage into * on meanjs:master*.

@lirantal
Copy link
Member

lirantal commented Sep 1, 2016

@hyperreality how is it now?
seems that the coverage is now back to testing only the unit tests, not e2e coverage as well. Can you take a look?

@hyperreality
Copy link
Contributor Author

@lirantal I'm not sure what's going on. My personal builds are getting coverage for all tests: https://coveralls.io/builds/7697944

@lirantal
Copy link
Member

lirantal commented Sep 2, 2016

Very odd.
I'll anyway merge this in and will appreciate if you can track it further to figure out. Maybe the travis build process is the issue.

@lirantal lirantal merged commit 7be1910 into meanjs:master Sep 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants