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

Stabilize dashboard selenium tests #11004

Closed

Conversation

stacey-gammon
Copy link
Contributor

Attempt to fix #10980. Suspect a toast disappearing around the time
this gets clicked may be messing it up.

@stacey-gammon
Copy link
Contributor Author

Passed once.

Jenkins, test this.

@stacey-gammon stacey-gammon added Feature:Dashboard Dashboard related features test labels Apr 3, 2017
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Apr 3, 2017
@stacey-gammon
Copy link
Contributor Author

Passed twice

Jenkins, test this.

@stacey-gammon
Copy link
Contributor Author

stacey-gammon commented Apr 3, 2017

Third times not a charm. I'm wondering if this time another click failed because of the disappearing toast message. Will try more try wraps.

16:51:26.283: clickDashboardByLinkText: Dashboard Test Time
16:51:26.358: in findTestSubject: [data-test-subj~="globalLoadingIndicator"]
16:51:26.562: in findTestSubject: [data-test-subj~="globalTimepickerRange"]
>> PASS: chrome on any platform - kibana - dashboard app - dashboard time - dashboard with stored timed - sets quick time on open (4881ms)
16:51:26.627: Clicking edit
16:51:26.627: in findTestSubject: [data-test-subj~="dashboardEditMode"]
16:51:26.699: Taking screenshot "/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/test/screenshots/failure/failure_1491238286699_dashboard with stored timed_is saved with absolute time.png"
>> FAIL: chrome on any platform - kibana - dashboard app - dashboard time - dashboard with stored timed - is saved with absolute time (190ms)
UnknownError: [POST http://localhost:4444/wd/hub/session/66e4710624e95522f956d241d7eff0b9/element/0.03164142997168784-39/click] unknown error: Element is not clickable at point (1025, 96). Other element would receive the click: <input parse-query="" input-focus="" kbn-typeahead-input="" ng-model="model.query" placeholder="Filter..." aria-label="Filter input" data-test-subj="dashboardQuery" type="text" class="kuiLocalSearchInput ng-pristine ng-untouched ng-valid ng-isolate-scope" ng-class="{'kuiLocalSearchInput-isInvalid': queryInput.$invalid}" autocomplete="off">
  (Session info: chrome=56.0.2924.87)
  (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.4.0-45-generic x86_64)
  at runRequest  <node_modules/leadfoot/Session.js:88:40>
  at <node_modules/leadfoot/Session.js:109:39>
  at new Promise  <node_modules/dojo/_debug/Promise.ts:411:4>
  at ProxiedSession._post  <node_modules/leadfoot/Session.js:63:10>
  at Element._post  <node_modules/leadfoot/Element.js:23:31>
  at Element.click  <node_modules/leadfoot/Element.js:163:15>
  at Command.<anonymous>  <node_modules/leadfoot/Command.js:680:19>
  at <node_modules/dojo/_debug/Promise.ts:393:16>

@stacey-gammon
Copy link
Contributor Author

stacey-gammon commented Apr 3, 2017

Iteration 2: passed once.

Jenkins, test this

@stacey-gammon
Copy link
Contributor Author

Iteration 2: Passed twice

Jenkins, test this

@stacey-gammon
Copy link
Contributor Author

Iteration 2: Third build was aborted.

Jenkins, test this.

@stacey-gammon
Copy link
Contributor Author

Iteration 2: Passed three times.

Jenkins, test this.

stacey-gammon added a commit that referenced this pull request Apr 4, 2017
* Convert default to named exports - errors

* Make all error classes use class syntax and extends

add tests

* Extending Error apparently doesn't work

* Merge PR #11004 to try to fix test failures
@stacey-gammon
Copy link
Contributor Author

Iteration 2: Passed four times.
One final run.
Jenkins, test this.

@stacey-gammon
Copy link
Contributor Author

stacey-gammon commented Apr 4, 2017

Well, that's too bad. Still failing:

14:49:26.481: Setting absolute range to 2015-09-19 06:31:44.000 to 2015-09-23 18:31:44.000
14:49:28.516: time picker open: false
14:49:28.516: --Opening time picker
14:49:28.516: in findTestSubject: [data-test-subj~="globalTimepickerButton"]
14:49:28.647: --Clicking Absolute button
14:49:28.735: --Setting From Time : 2015-09-19 06:31:44.000
14:49:38.788: Taking screenshot "/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/test/screenshots/failure/failure_1491317378787_dashboard without stored timed_Does not set the time picker on open.png"
>> FAIL: chrome on any platform - kibana - dashboard app - dashboard time - dashboard without stored timed - Does not set the time picker on open (12431ms)
NoSuchElement: [POST http://localhost:4444/wd/hub/session/531d6a26b123d07c89a7037e571ba092/element / {"using":"css selector","value":"input[ng-model='absolute.from']"}] no such element: Unable to locate element: {"method":"css selector","selector":"input[ng-model='absolute.from']"}
  (Session info: chrome=56.0.2924.87)
  (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 3.13.0-74-generic x86_64)
  at runRequest  <node_modules/leadfoot/Session.js:88:40>
  at <node_modules/leadfoot/Session.js:109:39>
  at new Promise  <node_modules/dojo/_debug/Promise.ts:411:4>
  at ProxiedSession._post  <node_modules/leadfoot/Session.js:63:10>
  at ProxiedSession.find  <node_modules/leadfoot/Session.js:1227:15>
  at Command.<anonymous>  <node_modules/leadfoot/Command.js:42:36>
  at <node_modules/dojo/_debug/Promise.ts:393:16>
  at run  <node_modules/dojo/_debug/Promise.ts:237:8>
  at <node_modules/dojo/_debug/nextTick.ts:44:4>

Screenshot:
failure_1491317378787_dashboard without stored timed_does not set the time picker on open

That message has been up for ~20 seconds so I think it might be unrelated to the errors. Looks like clicking the absolute link failed, but the clickAbsoluteButton function (which is wrapped in a try) unfortunately didn't report an error.

@stacey-gammon
Copy link
Contributor Author

Iteration 3: Passed Once
Jenkins, test this.

@stacey-gammon
Copy link
Contributor Author

Iteration 3: Passed Twice

Jenkins, test this.

stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Apr 4, 2017
* Convert default to named exports - errors

* Make all error classes use class syntax and extends

add tests

* Extending Error apparently doesn't work

* Merge PR elastic#11004 to try to fix test failures
@stacey-gammon
Copy link
Contributor Author

Iteration 3: Passed Thrice.

Jenkins, test this.

@stacey-gammon stacey-gammon changed the title Put click dashboard by link text in a try. Stabilize dashboard selenium tests Apr 4, 2017
stacey-gammon added a commit that referenced this pull request Apr 4, 2017
* Convert default to named exports - errors

* Make all error classes use class syntax and extends

add tests

* Extending Error apparently doesn't work

* Merge PR #11004 to try to fix test failures
@stacey-gammon
Copy link
Contributor Author

Iteration 3: Fourth time aborted.

Jenkins, test this.

@stacey-gammon
Copy link
Contributor Author

stacey-gammon commented Apr 4, 2017

Iteration 3: Fourth time passing! I think this is ready to go.

Rebasing to kick off another test.

@stacey-gammon
Copy link
Contributor Author

build aborted.

jenkins, test this

simianhacker pushed a commit to simianhacker/kibana that referenced this pull request Apr 5, 2017
* Convert default to named exports - errors

* Make all error classes use class syntax and extends

add tests

* Extending Error apparently doesn't work

* Merge PR elastic#11004 to try to fix test failures
@rhoboat
Copy link

rhoboat commented Apr 5, 2017

@stacey-gammon Looks promising! Please don't merge this up yet. I think #10910 may supersede some of the these fixes. I'd also like to pull your fixes that my PR doesn't have. If this branch went into master, however, merging with mine will be nontrivial, so I'd like to avoid that if possible.

@rhoboat
Copy link

rhoboat commented Apr 5, 2017

@stacey-gammon Which flaky dashboard test(s) does this fix? I can keep an eye out for that as I run tests with these changes.

@stacey-gammon
Copy link
Contributor Author

np @archanid, sorry for the mix up, didn't realize you were actively working on this.

One small additional change was fixing text add new visualization link -- At some point it because a test that was never run because of mixed up parens. lmk if you want to put that in your PR, otherwise I can create a separate PR.

Other than that it was mostly the toast notifications that were causing issues, so if your PR doesn't address that specifically, may want to close them purposefully.

One of the most common failing tests was:

FAIL: chrome on any platform - kibana - dashboard app - dashboard time - dashboard without stored timed - Does not set the time picker on open (51837ms)

Thanks!

// To avoid load errors in subsequent tests that refresh the index.
bdd.it('Finish each test on the landing page', async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
});
Copy link

Choose a reason for hiding this comment

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

Hmm.. Why make this an it? There is no expect here. Shouldn't this just be an after hook? Sounds like you want this to run at the end, so it would be an after all hook.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, that would make more sense. 👍 and be much more stable.

@rhoboat
Copy link

rhoboat commented Apr 5, 2017

@stacey-gammon I've incorporated all of your changes into my PR. I haven't run it yet, will update when I do.

@spalger
Copy link
Contributor

spalger commented Apr 7, 2017

Tests passing 🎉 🕺 🥇

@stacey-gammon
Copy link
Contributor Author

Closing in favor of #10910

@stacey-gammon stacey-gammon deleted the fix-flaky-dashboard-test branch April 12, 2017 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features review test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard fails 'Could not locate that dashboard (id: ...)'
3 participants