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

Configure code coverage analysis #2

Open
maybeec opened this issue May 19, 2016 · 4 comments
Open

Configure code coverage analysis #2

maybeec opened this issue May 19, 2016 · 4 comments
Assignees
Labels

Comments

@maybeec
Copy link
Member

maybeec commented May 19, 2016

We should utilize coveralls.io to analyze and track our test coverage.

@maybeec maybeec added the SCM/CI label May 19, 2016
@maybeec maybeec changed the title Configure coveralls Configure code coverage analysis May 24, 2016
@maybeec maybeec self-assigned this May 24, 2016
@maybeec
Copy link
Member Author

maybeec commented May 24, 2016

Currently, I am implementing code coverage based on browserify with tsify plugin and an browserify-istanbul transformer with isparta instrumenter.

  • However, as discussed with @dumbNickname we have to check whether it also works with typescript.
  • Furthermore, we have to check if it can be aligned with @mmatczak solution of debugging typescript

@dumbNickname
Copy link

Again thanks for the sync! There is one more thing that I would like to add regarding building coverage with browserify. In general this Angular2 application template was generated with broccoli as task runner behind the scenes. When it serves the project it uses Angular2App with: const BroccoliTypescript = require('./broccoli-typescript'); So in general tests will be compiled with a different plugin/module than the production/dev source code. In general it can bring some risks and potential problems (e.g. tsify compiler might work a bit differently, not all features newly introduced to typescript compiler might work). If tsify depends on original typescript compiler, then dependency version problems might occur (e.g typescript compiler being used in different versions). The question is how reliable would those tests be with differences in compilation process.

@maybeec
Copy link
Member Author

maybeec commented May 24, 2016

Good hint, thanks.
Surely, I would prefer the same build for tests as well as for production. We should especially try to make further steps in this direction. As far as I got it right, systemjs + typescript transpiler would be nice to have when we are able to integrate karma + typescript transpiler + istanbul code coverage analysis.

According to broccoli, I think it als edges a different discussion related to task runners. This first version of the application was mainly driven by the angularjs2-cli generator based on the angularjs2 communities proposals. However, I am totally aware, that this might not be the best choice. It was just a starting point.

If you are interested to even discuss the use a different task runner, we may discuss this in a seperate topic. However, we should align this with a consolidated working technology stack enabling

  • the use of the typescript transpiler for build, test, and code coverage
  • debugging in typescript rather than in transpiled sources

as already identified.

@cbeldacap
Copy link
Collaborator

I've found an interesting seed project with coverage integrated. Runing it with npm test offers a good visualization of its repo's current state by branches.
https://github.com/AngularClass/angular2-webpack-starter

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants