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

automate Auto Refresh test(s) #21177

Closed
LeeDr opened this issue Jul 24, 2018 · 3 comments
Closed

automate Auto Refresh test(s) #21177

LeeDr opened this issue Jul 24, 2018 · 3 comments
Labels
Team:Visualizations Visualization editors, elastic-charts and infrastructure test

Comments

@LeeDr
Copy link

LeeDr commented Jul 24, 2018

Describe the feature: We recently had regressions that broke Auto Refresh #20813

Describe a specific use case for the feature: We need automated tests for this important feature.

It should test Auto Refresh at a minimum on either Discover, Visualize, or Dashboard.

I think we'll have to create some new data loading method so that we can load data for a short period of time before and after now. This shouldn't require a lot of data. Potentially only a few docs would be enough.
Then go to Discover on that index, enable auto refresh at 5 second interval, get the hit count, wait 5 or 6 seconds, get the hit count again and verify it changed (or some other value appears or disappears from the results).

Testing on a dashboard would be great too since that could cover both Saved Searches and as many visualizations as we can verify.

@LeeDr LeeDr added test Feature:Visualizations Generic visualization features (in case no more specific feature label is available) :Sharing labels Jul 24, 2018
@LeeDr LeeDr changed the title automated Auto Refresh test(s) automate Auto Refresh test(s) Jul 24, 2018
@LeeDr
Copy link
Author

LeeDr commented Jul 24, 2018

I guess there's a couple more auto refresh cases that are important.

With a fixed timespan (absolute selection in time picker), enable auto refresh and add more data to the index. This could have 2 variations, one where it's a time-based index, and another which is not time-based (timepicker isn't used on non-time-based indices).

@timroes
Copy link
Contributor

timroes commented Jul 25, 2018

We should definitely test Discover and Visualize/Dashboard, since they use completely different mechanisms, so as in the above linked ticket, you can easily only break one of those.

Adding more data and waiting for that to load would actually be the ideal case. I think what would already be a good start (and would have caught that above issue), if we create an index pattern, that has a scripted field return System.currentTimeMillis(), which would always point to the current milliseconds. That way we could: render a chart, check that value and store it, wait the configured auto refresh timeout, check, that the chart now has a higher value in that field, which means it refreshed.

Though the way better approach for the long run should be: testing this on two different types of indexes (time-based and not) in at least Visualize and Discover app, but ideally also in Dashboard, containing both of them.

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed :Sharing Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Sep 13, 2018
@stratoula
Copy link
Contributor

Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Visualizations Visualization editors, elastic-charts and infrastructure test
Projects
None yet
Development

No branches or pull requests

3 participants