angularjs - Is there a code coverage for HTML using Karma when doing angular e2e test? -


we can use coverage see how javascript code covered our unit testing. e2e testing literally testing view components in html code against controller. question is, there same code coverage available how of html dom elements covered or touched in our e2e testing? agree, there big difference in execution path testing , ui testing. curious. thanks

as know e2e testing use files served web server, unit test served directly karma, e2e testing used sure page work expect, end-to-end test use server side , client side. that's why typically never expected have 100% e2e coverage because more fragile.

so people focus on unit test (testing edge-cases), , add e2e test sure behavior of page works correctly.

you can use istanbul , build coverage report karma.

http://gotwarlost.github.io/istanbul/

or article : http://lkrnac.net/blog/2014/04/measuring-code-coverage-by-protractor/ sum how use protractor e2e generate coverage report of e2e tests. using using tool : https://github.com/r3b/grunt-protractor-coverage

hope it's help.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -