-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add functional test for UI Metric #1223
Conversation
|
||
miscUtils.visitPage('app/home#/'); | ||
|
||
cy.wait(45000); |
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 not add wait statements to the test. Cant we wait for the loader? There should be a helper function to do this. You can do something similar for the other waits as well
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.
+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.
Updated the tests to remove wait statements. Instead we are now waiting for the API call to be successful. @ashwin-pc @kavilla
|
||
cy.request( | ||
'GET', | ||
'http://localhost:5601/api/stats?extended=true&legacy=true&exclude_usage=false' |
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.
pull from cypress settings the dashboards url.
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.
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.
@kavilla Update to the use base path from config.
Then we can actually enable this and disable the running of these tests. Especially if it's default disabled then likely the tests will fail if they are executed. Here's an example: edit: Yeah I think it should be a blocker if ui metric is disabled by default to avoid test failures. |
@kavilla that sounds good. I can update the tests so that they are being guarded by the config. |
Also, might need to validate the addition to a ciGroup here: https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/main/package.json#L31 And see if this test gets ran. The ciGroups are ran from the OSD github ci: |
Note for after merging. If you would for these tests to then be executed from the build CI then we will need to update the test manifest: |
Also for after merging updating OSD too if you would like it to be ran in our GitHub ci: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/.github/workflows/cypress_workflow.yml#L37. But might have to be cautious about that. We have been hitting water marks for memory so depends on how much memory UI metric consumes. |
Description
Add functional tests to validate the UI Metric Collector introduced in OpenSearch dashboards core.
Tests
ui_metric_no_security.spec.js.mp4
ui_metric_with_security.spec.js.mp4
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.