-
Notifications
You must be signed in to change notification settings - Fork 1k
Introduce code coverage collection to Cypress runs #9084
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9084 +/- ##
==========================================
- Coverage 61.02% 57.62% -3.41%
==========================================
Files 3813 4187 +374
Lines 91401 114337 +22936
Branches 14443 24825 +10382
==========================================
+ Hits 55782 65887 +10105
- Misses 32056 45284 +13228
+ Partials 3563 3166 -397
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Talking to @ananzh, |
Also: * Add coverage reporting to Cypress CI
…running against Also: * Turn on test isolation when security is disabled Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Also: * Add auto-login Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
…hen needed Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
…issing a `url` Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
There's a lot of good stuff in this PR. Unfortunately due to the age of the PR and the tremendous changes we made to the testing files past month, it cannot be merged as is. I will pick the good things that are relevant from this PR and make a fresh PR |
@@ -57,6 +57,8 @@ | |||
"test:ftr": "scripts/use_node scripts/functional_tests", | |||
"test:ftr:server": "scripts/use_node scripts/functional_tests_server", | |||
"test:ftr:runner": "scripts/use_node scripts/functional_test_runner", | |||
"test:cypress": "env TZ=America/Los_Angeles NO_COLOR=1 yarn cypress run", | |||
"test:cypress:open": "env TZ=America/Los_Angeles NO_COLOR=1 yarn cypress open", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we recently changed the timezone to be run on UTC: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9358/files#diff-1a2b52d55ed1bf51fa9d61ccc1c27d91bc7d0af28b49ec0905966edf07e57c18R20
* @param {Partial<Cypress.RequestOptions>} requestOptions | ||
*/ | ||
|
||
Cypress.Commands.add('sendOpenSearch', (requestOptions) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think requestOpenSearch
is better to conform to cypress's naming of cy.request()
'osd-xsrf': true, | ||
}, | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add this change once we have SECURITY_ENABLED tests
|
||
beforeEach(() => { | ||
cy.login(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we've had discussions as a team about how we want to remove the usage of beforeEach
whenever possible, due to the following:
- The tests were taking too long
- The crashes that were happening due to the duration of the tests
Would a future implementation where this is replaced with before
work?
cypress/screenshots | ||
cypress/videos | ||
coverage | ||
retention-days: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can code coverage work with split test buckets? We currently got all of our query-enhancements
test split into 5 buckets due to how long they take
We have recently broken up our tests into five separate buckets due to how long they take (i think total will be around 8 hours). Will cypress test coverage still work without having one test runner run the entire tests? |
Description
Changelog
Check List
yarn test:jest
yarn test:jest_integration