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

[Reporting] Improve functional test steps #63259

Merged
merged 6 commits into from
Apr 14, 2020

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Apr 10, 2020

Summary

This PR streamlines Reporting functional tests by using ES-Archiver to load saved dashboards to report against, instead of building a dashboard on-the-fly in the test.

Timing results:
BEFORE

           ?- ? pass  (18.9s) "reporting app Reporting Dashboard Print PDF button is not available if new"
           ?- ? pass  (10.8s) "reporting app Reporting Dashboard Print PDF button becomes available when saved"
           ?- ? pass  (1.0m) "reporting app Reporting Dashboard Print Layout downloads a PDF file"
           ?- ? pass  (15.6s) "reporting app Reporting Dashboard Print PNG button is not available if new"
           ?- ? pass  (11.7s) "reporting app Reporting Dashboard Print PNG button becomes available when saved"
           ?- ? pass  (2.0m) "reporting app Reporting Dashboard Preserve Layout matches baseline report"
           ?- ? pass  (3.7s) "reporting app Reporting Discover Generate CSV button is not available if new"
           ?- ? pass  (5.8s) "reporting app Reporting Discover Generate CSV button becomes available when saved"
           ?- ? pass  (25.3s) "reporting app Reporting Discover Generate CSV button generates a report with data"
           ?- ? pass  (15.3s) "reporting app Reporting Discover Generate CSV button generates a report with no data"
           ?- ? pass  (11.0s) "reporting app Reporting Visualize Print PDF button is not available if new"
           ?- ? pass  (33.2s) "reporting app Reporting Visualize Print PDF button becomes available when saved"
           ?- ? pass  (19.3s) "reporting app Reporting Visualize Print PDF button matches baseline report"
13 passing (8.0m)

AFTER

           ?- ? pass  (25.6s) "reporting app Reporting Dashboard Print PDF button is not available if new"
           ?- ? pass  (11.6s) "reporting app Reporting Dashboard Print PDF button becomes available when saved"
           ?- ? pass  (44.6s) "reporting app Reporting Dashboard Print Layout downloads a PDF file"
           ?- ? pass  (16.0s) "reporting app Reporting Dashboard Print PNG button is not available if new"
           ?- ? pass  (11.4s) "reporting app Reporting Dashboard Print PNG button becomes available when saved"
           ?- ? pass  (36.7s) "reporting app Reporting Dashboard Preserve Layout matches baseline report"
           ?- ? pass  (3.7s) "reporting app Reporting Discover Generate CSV button is not available if new"
           ?- ? pass  (5.9s) "reporting app Reporting Discover Generate CSV button becomes available when saved"
           ?- ? pass  (25.3s) "reporting app Reporting Discover Generate CSV button generates a report with data"
           ?- ? pass  (25.2s) "reporting app Reporting Discover Generate CSV button generates a report with no data"
           ?- ? pass  (10.9s) "reporting app Reporting Visualize Print PDF button is not available if new"
           ?- ? pass  (34.2s) "reporting app Reporting Visualize Print PDF button becomes available when saved"
           ?- ? pass  (35.2s) "reporting app Reporting Visualize Print PDF button downloaded PDF has OK status"
13 passing (5.0m)

NOTE:

  • 'reporting app Reporting Dashboard Print Layout downloads a PDF file' runs as a standalone test now
  • The PDF files in x-pack/test/reporting/functional/reports/baseline were not used, so I removed them in this PR.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

log.debug('ReportingPage:initTests');
await PageObjects.settings.navigateTo();
await esArchiver.loadIfNeeded('../../functional/es_archives/logstash_functional');
await esArchiver.load('reporting/historic');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reporting/historic was not used for anything

await esArchiver.load('reporting/historic');
await kibanaServer.uiSettings.replace({
defaultIndex: 'logstash-*',
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A default index is provided by the ES Archive now

@tsullivan
Copy link
Member Author

I've added the 7.7.0 version label, as all of these tests are still being skipped in the 7.7 branch and we'd like to re-enable them.

cc @liza-mae

@tsullivan
Copy link
Member Author

@elasticmachine merge upstream

@tsullivan tsullivan requested a review from liza-mae April 13, 2020 16:52
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. I started flaky test runner with 30 threads to check if it is stable:
https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/361/
Let's wait for it before merge

@tsullivan tsullivan merged commit 29aba88 into elastic:master Apr 14, 2020
tsullivan added a commit to tsullivan/kibana that referenced this pull request Apr 14, 2020
* Start of refactoring

* remove unused fixtuers

* fix the refactoring bugs

* update archive with better dashboard

* important comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 15, 2020
* master: (29 commits)
  Add test:jest_integration npm script (elastic#62938)
  [data.search.aggs] Remove service getters from agg types (AggConfig part) (elastic#62548)
  [Discover] Fix broken setting of bucketInterval (elastic#62939)
  Disable adding conditions when in alert management context. (elastic#63514)
  [Alerting] fixes to allow pre-configured actions to be executed (elastic#63432)
  adding useMemo (elastic#63504)
  [Maps] fix double fetch when filter pill is added (elastic#63024)
  [Lens] Fix missing formatting bug in "break down by" (elastic#63288)
  [SIEM] [Cases] Removed double pasted line (elastic#63507)
  [Reporting] Improve functional test steps (elastic#63259)
  [SIEM][CASE] Tests for server's configuration API (elastic#63099)
  [SIEM] [Cases] Case container unit tests (elastic#63376)
  [ML] Improving parsing of large uploaded files (elastic#62970)
  [ML] Listing global calendars on the job management page (elastic#63124)
  [Ingest][Endpoint] Add Ingest rest api response types for use in Endpoint (elastic#63373)
  Add help text to form fields (elastic#63165)
  [ML] Converts utils Mocha tests to Jest (elastic#63132)
  [Metrics UI] Refactor With* containers to hooks (elastic#59503)
  [NP] Migrate logstash server side code to NP (elastic#63135)
  Clicking cancel in saved query save modal doesn't close it (elastic#62774)
  ...
wayneseymour pushed a commit that referenced this pull request Apr 15, 2020
* Start of refactoring

* remove unused fixtuers

* fix the refactoring bugs

* update archive with better dashboard

* important comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
tsullivan added a commit that referenced this pull request Apr 15, 2020
* Revert "FTR: add chromium-based Edge browser support (#61684) (#63068)"

This reverts commit e8caa06.

* update lock file

* [Reporting] Improve functional test steps (#63259)

* Start of refactoring

* remove unused fixtuers

* fix the refactoring bugs

* update archive with better dashboard

* important comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* get tests to pass

* get more tests to pass

* reduce branch diffs

* reduce loc change

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
tsullivan added a commit that referenced this pull request Apr 16, 2020
* resolve conflicts

* get tests to pass

* get more tests to pass

* reduce branch diffs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@tsullivan tsullivan deleted the reporting/fn-test-better branch June 25, 2020 18:08
@sophiec20 sophiec20 added the (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:skip Skip the PR/issue when compiling release notes review v7.7.0 v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants