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

Add automated tests with dashboards #1705

Open
jsoriano opened this issue Mar 1, 2024 · 3 comments
Open

Add automated tests with dashboards #1705

jsoriano opened this issue Mar 1, 2024 · 3 comments
Labels
Team:Fleet Label for the Fleet team

Comments

@jsoriano
Copy link
Member

jsoriano commented Mar 1, 2024

Currently the only tests we have with dashboards check that they can be installed during assets tests. Having functional tests would allow us to check that the dashboards actually work, and to have additional checks on the data collected.

We need to find a way to check that the data collected is relevant for dashboards, and that dashboards have enough data to render correctly.

Some ideas to explore:

  • Look for programatic ways to check if the dashboard has any panel with errors.
    imagen
  • The inspect view in Kibana dashboards is able to show the queries executed by the panel, if there is some API to access this information we could run the queries during system tests and check that the collected data is valid and relevant for dashboards.
    imagen
    imagen
  • Add a dashboards test runner (elastic-package test dashboards) that uses data generation like the one provided by elastic-package benchmark stream to test the dashboards.
  • Deploy some MITM proxy between Kibana and Elasticsearch and capture queries done when opening dashboards.
  • Use webdriver or similar to do headless browser testing.
  • Screenshot-based tests could help to validate that the actual rendered dashboard makes sense, but we would need to be able to control all the data represented in a deterministic way.

The implementation could be incremental, adding features in different areas of testing.

cc @lalit-satapathy

@jlind23 jlind23 added the Team:Fleet Label for the Fleet team label Mar 26, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/fleet (Team:Fleet)

@jlind23
Copy link
Collaborator

jlind23 commented Mar 26, 2024

@rayafratkina is this something that your time already gave some thoughts on? Automated tests for dashboards.

@drewdaemon
Copy link
Contributor

drewdaemon commented Jun 11, 2024

Linking to a PoC which adds an API that extracts the Elasticsearch queries from dashboards: elastic/kibana#173416

If this were to be shipped to production in Kibana, the test runner could extract the Elasticsearch queries from integration dashboards and use them to run assertions.

Issue to track: elastic/kibana#175487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Label for the Fleet team
Projects
None yet
Development

No branches or pull requests

4 participants