skylock / cypress-angular-coverage-example

31 stars 7 forks source link

how to instrument the angular code and run cypress test when application and cypress test are in different repositories #8

Closed swathishetty closed 4 years ago

swathishetty commented 4 years ago

I have a different folder structure and cypress tests are present in a separate independent repository. @skylock Any help would be appreciated. Thank you

skylock commented 4 years ago

You basically want to :

  1. instrument the app code
  2. Run the app with the instrumented code
  3. Check you have _coverage object available
  4. Add code coverage plugin to cypress
  5. Run cypress tests and collect code coverage
  6. Map the collected coverage results to your app source files, if not done automatically

For examples, please see : Cypress Code Coverage