0

I have an Angular application (v10) which is being tested using manual and selenium based automated suite. I have no unit tests or e2e tests, only external testing is available.

I would like to have code coverage of my component/services/helpers/etc. Any ideas if possible and how to do that?

I have experience with nyc/istanbul and for node/express applications it works great simply by nyc node index.js, however with angular doing nyc ng serve fails the compilation and I am unable to access my application!

Edit: I realize that the application will be running in the browser but I guess I was hoping for magical solution to make it just work!

I really appreciate any help.

Pierre
  • 1,329
  • 2
  • 12
  • 21
  • 1
    Did you check out https://stackoverflow.com/questions/59470540/code-coverage-for-angular-spa-application-with-e2e-in-selenium-java-or-cypress – dream_team Jul 15 '21 at 19:29
  • Thank you so much for the reference. It seems to provide the right approach. I will test it out later. – Pierre Jul 17 '21 at 16:54
  • @Pierre did you manage to have it working? Can you share the solution pls? – DDana Jan 04 '23 at 08:12
  • Unfortunately not. We had to stop the effort and instead accept test coverage rather than code coverage (% of tests that have been automated using selenium) and it was good enough for the client. – Pierre Jan 05 '23 at 15:59

0 Answers0