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

Run Kibana tests on Cloud meta issue #17525

Closed
8 tasks done
LeeDr opened this issue Apr 3, 2018 · 10 comments
Closed
8 tasks done

Run Kibana tests on Cloud meta issue #17525

LeeDr opened this issue Apr 3, 2018 · 10 comments
Assignees

Comments

@LeeDr
Copy link

LeeDr commented Apr 3, 2018

Describe the feature: We need to be able to run Kibana tests against Elastic Cloud deployments.

@LeeDr LeeDr added the Meta label Apr 3, 2018
@tylersmalley
Copy link
Contributor

It would be great if we could have ECE available on CI with the nightly snapshots of ES. This was we could always use it to spin up clusters. I assume it would be faster/cleaner than running from source, which is what we do now.

@LeeDr
Copy link
Author

LeeDr commented Apr 3, 2018

Snapshots are being deployed nightly now on staging Elastic Cloud. But we don't have the API yet to automate creating an Elasticsearch node/cluster. But they're working on it.

Using an already started Cloud Elasticsearch node would certainly save time starting up Elasticsearch as part of our CI jobs. But we couldn't let multiple CI jobs hit the same cluster at the same time because our tests delete the .kibana index all the time.

  • The Kibana CI jobs could use the API to spin up an elasticsearch node just for this job and then destroy it. But I'm not sure if that would be any faster than what we do now.
  • We could have one Cloud Elasticsearch node and have our tests use a unique .kibana index for each job. But we'd still have a problem when one test loads logstash-* data and another test unloads it.
  • We could have a pool of Cloud Elasticsearch nodes and have our tests somehow select a "free" one.

@suyograo
Copy link
Contributor

The best approach is to use the API to spin up an ES node and tear it down after the test is run (success or failure). We'll need to capture logs/state when a test fails to debug why the test failed. For now, its even ok to leave the cluster running if the tests failed.

@liza-mae
Copy link
Contributor

liza-mae commented May 25, 2018

So far issues observed when trying to run kibana tests on a cloud instance:

1- Selectors are not being found. It is unclear yet if it is timing and/or just bad selectors. I did notice some of the selectors are using nth-child, which is fragile, we should look into adding data-test-subj instead for these tests.
2- Elements are not being clicked even though they are visible.
3- Tests have sleeps which cause some flaky, should have either retries or event based

(Note: The kibana tests are dependent on everything contained in the file, so tests may not run individually from a file if they depend on the previous test for data)

@liza-mae
Copy link
Contributor

I don't believe issue #13232 listed in the description is related to cloud testing, so I am going to remove it from this meta issue.

@liza-mae liza-mae self-assigned this Jun 4, 2018
@liza-mae
Copy link
Contributor

liza-mae commented Jun 5, 2018

To address the issue of selectors not being found, I have opened #19679, these deal with failures not with the use of .ng-scope which should be removed. We need to move towards data-test-subj.

@liza-mae
Copy link
Contributor

liza-mae commented Jun 5, 2018

Addressing #19679 has eliminated all but 12 or so failures for me on cloud testing. So I think that is a good start for 6.2.4 baseline.

@liza-mae
Copy link
Contributor

liza-mae commented Jun 5, 2018

Here are my results and failure analysis:

6.2.4 Baseline Results

Summary
297 passing (40m)
3 pending
12 failing

Failure Analysis

  • dashboard app dashboard queries Pie chart attached to saved search filters data as expected
  • no such element: Unable to locate element: {"method":"css selector","selector":"[group-name="buckets"] vis-editor-agg-params:not(.ng-hide) .agg-select"
  • dashboard app dashboard queries filters "before all" hook for "Pie chart attached to saved - search filters shows no data with conflicting dashboard query
  • Unable to locate element: {"method":"css selector","selector":"a[href="#/dashboards"]"}
  • dashboard app dashboard snapshots compare area chart snapshot
  • Error: expected 0.1490841968911917 to be below 0.05
  • management index result field sort sort by heading - name should sort ascending
  • no such element: Unable to locate element: {"method":"css selector","selector":"div.agg-table-paginated table.table.table-condensed tbody tr:nth-child(1) td:nth-child(1) span.ng-binding"}
  • management index result field sort sort by heading - name should sort descending
  • no such element: Unable to locate element: {"method":"css selector","selector":"div.agg-table-paginated table.table.table-condensed tbody tr:nth-child(1) td:nth-child(1) span.ng-binding"}
  • management index result field sort sort by heading - type should sort ascending
  • no such element: Unable to locate element: {"method":"css selector","selector":"div.agg-table-paginated table.table.table-condensed tbody tr:nth-child(1) td:nth-child(2) span.ng-binding"}
  • management index result field sort sort by heading - type should sort descending
  • no such element: Unable to locate element: {"method":"css selector","selector":"div.agg-table-paginated table.table.table-condensed tbody tr:nth-child(1) td:nth-child(2) span.ng-binding"}
  • timelion app expression typeahead dynamic suggestions for argument values .es() should show field suggestions for split argument when index pattern set
  • Error: expected 1 to sort of equal 52
  • timelion app expression typeahead dynamic suggestions for argument values .es() should show field suggestions for metric argument when index pattern set
  • TypeError: Cannot read property 'click' of undefined
  • visualize app visualize app Visual Builder markdown should allow printing raw value of data
  • Error: expected '61442901600000' to equal '6'
  • visualize app visualize app Visual Builder markdown allow time offsets allow positive time offsets
  • Error: expected '331442901600000' to equal '3'
  • visualize app visualize app Visual Builder markdown allow time offsets allow negative time offsets
  • Error: expected '23231442901600000' to equal '23'

@liza-mae
Copy link
Contributor

liza-mae commented Jun 6, 2018

The visualize app failures are mac platform specific, so we only have 9 more to go

@liza-mae
Copy link
Contributor

The Kibana parts of this are now complete.

  1. I baselined version 6.3.2, running locally and debugging tests.
  2. Latest results, all tests passed locally after debugging and fixing may test failures: https://drive.google.com/open?id=1pAvR6cN6ohlmnxf7ozWv-7i-I-hjYulT
  3. A Jenkins script has been created to run the kibana tests
    The remaining done through infrastructure work in ESTF project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants