-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] [Meta] Add UI integration tests for Fleet app #121436
Comments
Pinging @elastic/fleet (Team:Fleet) |
@mostlyjason Would like some feedback on the priority here from a customer perspective. I think we will eventually cover all of this, but it would be good to prioritize the most important flows for customers + areas we expect to making changes in the near future. |
Looks like a good order |
One thing that I think Chaulet raised earlier, that we should point epr to a mock repo/API in cypress tests, to avoid breakages when epr packages change. I think we could try doing that with this issue. If it needs more effort, it can be raised as a new issue. |
I think we should discuss this. Is the benefit of doing this over running the local EPR registry with stable test packages that we can control when they change, worth the downsides? I worry that implementing a mock API will be fragile and could give us a false sense of confidence in the tests. Additionally, we are going to need to handle package changes, especially for these default packages which are slated to be bundled directly in Kibana as part of #112095. For those, I think we should explicitly test against package changes when they get updated in the Kibana repo. |
I'm not sure if the test covering the "add agent" flow is currently tracked in this issue: https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/cypress/e2e/fleet_agent_flyout.cy.ts |
We've had a few recent breakages that likely could have been caught by automated UI integration tests. In #113106, we added support for writing tests in the Cypress test framework which greatly improves the test writing experience and reliability. We should start leveraging this new framework to cover some our most important flows.
We should not use these UI integration tests to cover all edge cases, but should follow the familiar "testing pyramid" model where these tests cover each feature, but not every permutation of inputs and outputs. Unit tests should leveraged for such cases.
These tests will not be truly e2e (due to no running Fleet Server and Agents), but should assert against the expected state in the Fleet API, Elasticsearch APIs, and/or the
.fleet-*
indices.This issue is tangential to #115788 which covers the Integrations list behavior.
Areas needing tests
Roughly in priority of importance, we should add tests for the following UI flows:
Onboarding and setup
Agent policies
Integration policies
Integrations
Agent list view
Agent details view
Enrollment tokens view
Data streams view
Recommendation:
See as an example the time difference: real API takes minutes, mock API seconds
The text was updated successfully, but these errors were encountered: