Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] How to enable cypress coverage for plugins #975

Open
joshuali925 opened this issue Nov 23, 2021 · 3 comments
Open

[Feature] How to enable cypress coverage for plugins #975

joshuali925 opened this issue Nov 23, 2021 · 3 comments
Labels
enhancement New feature or request technical debt If not paid, jeapardizes long-term success and maintainability of the repository. test:integration

Comments

@joshuali925
Copy link
Member

joshuali925 commented Nov 23, 2021

Is your feature request related to a problem? Please describe.

Most of plugins use cypress for integration tests, which are not giving coverage currently. Cypress supports code coverage, I spent some time but couldn't get it to work. Here is what I tried:

  1. enable istanbul in .babalrc
  2. add .nycrc
  3. enable coverage in support
  4. add coverage task in cypress plugins
  5. also tried to use cypress webpack preprocessor

Cypress shows 0 for all source files except the files used by tests. Looks like the code is not instrumented, I tried to clean cache and rebuild but didn't work. Could this be related to webpack config from core?

Describe the solution you'd like

Some guidance from core on how to instrument plugin code to enable code coverage

@joshuali925 joshuali925 added the enhancement New feature or request label Nov 23, 2021
@kavilla kavilla changed the title How to enable cypress coverage for plugins [Feature] How to enable cypress coverage for plugins Nov 27, 2021
@kavilla
Copy link
Member

kavilla commented Nov 27, 2021

Right now we don't have officially support cypress within core so we will have to spend sometime doing some RnD, or we can try to see if this repo has more insight: https://github.com/opensearch-project/opensearch-dashboards-functional-test

@tmarkley
Copy link
Contributor

Related to #754

AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
@tmarkley tmarkley added the technical debt If not paid, jeapardizes long-term success and maintainability of the repository. label May 25, 2022
@zhongnansu
Copy link
Member

Right now we don't have officially support cypress within core so we will have to spend sometime doing some RnD, or we can try to see if this repo has more insight: https://github.com/opensearch-project/opensearch-dashboards-functional-test

@kavilla Do we have anything on the roadmap about cypress? Or any issue that tracks it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request technical debt If not paid, jeapardizes long-term success and maintainability of the repository. test:integration
Projects
None yet
Development

No branches or pull requests

4 participants