angular-eclipse icon indicating copy to clipboard operation
angular-eclipse copied to clipboard

Provide code coverage information for unit test (or e2e test) execution

Open PMJMendes opened this issue 8 years ago • 5 comments

Provide source highliting (like EclEmma) after test execution according to which source lines and branches were executed during the test batch.

PMJMendes avatar Oct 14 '16 14:10 PMJMendes

I think it's a big work. Perhaps we could start to provide a JUnit View like? I don't know if it's possible to do that. I must study result of test (never played with ng test).

angelozerr avatar Oct 14 '16 19:10 angelozerr

@PMJMendes I tell me if it's a really interesting feature since https://github.com/angul ar/angular-cli/wiki/test provides the capability to generate HTML pages with coverage.

When you execute:

ng test --code-coverage

You can generate report like

image

angelozerr avatar May 10 '17 13:05 angelozerr

Hello,

From: Angelo [mailto:[email protected]]

@PMJMendeshttps://github.com/PMJMendes I tell me if it's a really interesting feature since

https://github.com/angular/angular-cli/wiki/test provides the capability to generate HTML pages with coverage ?

Hmmm, good call. I haven’t checked out the coverage HTML pages yet. If they work well, I guess it’s not as important a feature as it would be without them. Having the code colored directly in the editor is helpful, so I guess it’s probably still interesting, but just as a nice-to-have…

Cheers, J.

PMJMendes avatar May 11 '17 08:05 PMJMendes

@angelozerr @PMJMendes I just created an Issue in typescript.java (See angelozerr/typescript.java#175), since this should be solved for typescript in general, not only for angular (in my opinion).
As you said, it will be pretty complex, but after a quick investiagation, it does not seem impossible to me.
There is already an Eclipse-implementation for code coverage in java and karma supports different coverage reporters, which results we could use.
Since there are already pretty cool reporters for karma (like the HTML-Reporter shown above), I don't think this has a high priority, but it would be a nice feature anyways.

probert94 avatar May 12 '17 06:05 probert94

Hey, :)

From: Springrbua [mailto:[email protected]]

this should be solved for typescript in general, not only for angular (in my opinion).

I don't think this has a high priority, but it would be a nice feature anyways.

Agree on all counts.

Cheers, J.

PMJMendes avatar May 12 '17 08:05 PMJMendes