Skip to content

Add automated tests with dashboards #1705

@jsoriano

Description

@jsoriano

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions