Skip to content

Capture browser logs on test failure#22670

Merged
stacey-gammon merged 5 commits intoelastic:masterfrom
stacey-gammon:2018-09-04-capture-browser-logs
Sep 13, 2018
Merged

Capture browser logs on test failure#22670
stacey-gammon merged 5 commits intoelastic:masterfrom
stacey-gammon:2018-09-04-capture-browser-logs

Conversation

@stacey-gammon
Copy link
Copy Markdown

@stacey-gammon stacey-gammon commented Sep 4, 2018

Spit out when a test failures along with the rest of normal test output.

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@stacey-gammon
Copy link
Copy Markdown
Author

Simulated failure, you can see the output is now:

               │ info Current URL is: http://localhost:5620/app/kibana#/dashboard?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272018-01-01T00:00:00.000Z%27,mode:absolute,to:%272018-04-13T00:00:00.000Z%27))&_a=(description:%27%27,filters:!(),fullScreenMode:!f,options:(darkTheme:!f,hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(),gridData:(h:15,i:%271%27,w:24,x:0,y:0),id:%278090dcb0-4195-11e8-bb13-d53698fb349a%27,panelIndex:%271%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%272%27,w:24,x:24,y:0),id:%279fb4c670-4194-11e8-bb13-d53698fb349a%27,panelIndex:%272%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%273%27,w:24,x:0,y:15),id:%2703d2afd0-4192-11e8-bb13-d53698fb349a%27,panelIndex:%273%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%274%27,w:24,x:24,y:15),id:%270ca8c600-4195-11e8-bb13-d53698fb349a%27,panelIndex:%274%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%275%27,w:24,x:0,y:30),id:c10c6b00-4191-11e8-bb13-d53698fb349a,panelIndex:%275%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%276%27,w:24,x:24,y:30),id:%279bebe980-4192-11e8-bb13-d53698fb349a%27,panelIndex:%276%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%277%27,w:24,x:0,y:45),id:%271dcdfe30-4192-11e8-bb13-d53698fb349a%27,panelIndex:%277%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%278%27,w:24,x:24,y:45),id:%27584c0300-4191-11e8-bb13-d53698fb349a%27,panelIndex:%278%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%279%27,w:24,x:0,y:60),id:%2776c7f020-4194-11e8-bb13-d53698fb349a%27,panelIndex:%279%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%2710%27,w:24,x:24,y:60),id:b3e70d00-4190-11e8-bb13-d53698fb349a,panelIndex:%2710%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%2711%27,w:24,x:0,y:75),id:df72ad40-4194-11e8-bb13-d53698fb349a,panelIndex:%2711%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%2712%27,w:24,x:24,y:75),id:%27760a9060-4190-11e8-bb13-d53698fb349a%27,panelIndex:%2712%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%2713%27,w:24,x:0,y:90),id:%277ff2c4c0-4191-11e8-bb13-d53698fb349a%27,panelIndex:%2713%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%2714%27,w:24,x:24,y:90),id:%2735417e50-4194-11e8-bb13-d53698fb349a%27,panelIndex:%2714%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%2715%27,w:24,x:0,y:105),id:%27039e4770-4194-11e8-bb13-d53698fb349a%27,panelIndex:%2715%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%2716%27,w:24,x:24,y:105),id:%2763983430-4192-11e8-bb13-d53698fb349a%27,panelIndex:%2716%27,type:visualization,version:%277.0.0-alpha1%27),(embeddableConfig:(),gridData:(h:15,i:%2717%27,w:24,x:0,y:120),id:ca5ada40-3dca-11e8-8660-4d65aa086b3c,panelIndex:%2717%27,type:search,version:%277.0.0-alpha1%27)),query:(language:lucene,query:%27%27),timeRestore:!f,title:%27New%20Dashboard%27,viewMode:edit)
               │ info Browser output is: http://localhost:5620/bundles/vendors.bundle.js 276017:40 TypeError: Cannot read property 'prop' of null
               │          at Object.positionElements (http://localhost:5620/bundles/commons.bundle.js:67744:32)
               │          at positionTooltip (http://localhost:5620/bundles/commons.bundle.js:68621:42)
               │          at http://localhost:5620/bundles/commons.bundle.js:68655:28
               │          at processQueue (http://localhost:5620/bundles/vendors.bundle.js:278387:37)
               │          at http://localhost:5620/bundles/vendors.bundle.js:278435:27
               │          at completeOutstandingRequest (http://localhost:5620/bundles/vendors.bundle.js:267646:10)
               │          at http://localhost:5620/bundles/vendors.bundle.js:267925:7
               │      http://localhost:5620/bundles/vendors.bundle.js 13368:14 "Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
               │          in CreateIndexPatternWizard
               │          in IntlProvider (created by I18nProvider)
               │          in I18nProvider"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: now-15m, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at Function.convertTimeToUTCString (http://localhost:5620/bundles/kibana.bundle.js:56347:32)
               │          at DashboardStateManager.handleTimeChange (http://localhost:5620/bundles/kibana.bundle.js:184143:41)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183464:29)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: now-15m, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at Function.convertTimeToUTCString (http://localhost:5620/bundles/kibana.bundle.js:56347:32)
               │          at DashboardStateManager.handleTimeChange (http://localhost:5620/bundles/kibana.bundle.js:184143:41)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183464:29)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: now-15m, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at Function.convertTimeToUTCString (http://localhost:5620/bundles/kibana.bundle.js:56347:32)
               │          at DashboardStateManager.handleTimeChange (http://localhost:5620/bundles/kibana.bundle.js:184143:41)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183464:29)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: now-15m, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at Function.convertTimeToUTCString (http://localhost:5620/bundles/kibana.bundle.js:56347:32)
               │          at DashboardStateManager.handleTimeChange (http://localhost:5620/bundles/kibana.bundle.js:184143:41)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183464:29)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Tue Apr 09 2018 23:00:00 GMT-0500, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at DashboardStateManager.syncTimefilterWithDashboard (http://localhost:5620/bundles/kibana.bundle.js:184611:43)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183416:31)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)
               │          at nodeLinkFn (http://localhost:5620/bundles/vendors.bundle.js:271157:35)"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Tue Apr 09 2018 23:00:00 GMT-0500, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at DashboardStateManager.syncTimefilterWithDashboard (http://localhost:5620/bundles/kibana.bundle.js:184611:43)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183416:31)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)
               │          at nodeLinkFn (http://localhost:5620/bundles/vendors.bundle.js:271157:35)"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: now-15m, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at Function.convertTimeToUTCString (http://localhost:5620/bundles/kibana.bundle.js:56347:32)
               │          at DashboardStateManager.handleTimeChange (http://localhost:5620/bundles/kibana.bundle.js:184143:41)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183464:29)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Mon Apr 09 2018 17:56:08 GMT-0400, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at Function.convertTimeToUTCString (http://localhost:5620/bundles/kibana.bundle.js:56347:32)
               │          at DashboardStateManager.handleTimeChange (http://localhost:5620/bundles/kibana.bundle.js:184143:41)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183464:29)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)"
               │      http://localhost:5620/bundles/vendors.bundle.js 149434:2961 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
               │      Arguments: 
               │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Mon Apr 09 2018 17:56:08 GMT-0400, _f: undefined, _strict: undefined, _locale: [object Object]
               │      Error
               │          at Function.createFromInputFallback (http://localhost:5620/bundles/vendors.bundle.js:149435:3368)
               │          at Yt (http://localhost:5620/bundles/vendors.bundle.js:149435:21322)
               │          at Ot (http://localhost:5620/bundles/vendors.bundle.js:149435:22033)
               │          at Tt (http://localhost:5620/bundles/vendors.bundle.js:149435:22115)
               │          at n (http://localhost:5620/bundles/vendors.bundle.js:149435:209)
               │          at Function.convertTimeToUTCString (http://localhost:5620/bundles/kibana.bundle.js:56347:32)
               │          at DashboardStateManager.handleTimeChange (http://localhost:5620/bundles/kibana.bundle.js:184143:41)
               │          at controller (http://localhost:5620/bundles/kibana.bundle.js:183464:29)
               │          at Object.invoke (http://localhost:5620/bundles/vendors.bundle.js:266324:19)
               │          at $controllerInit (http://localhost:5620/bundles/vendors.bundle.js:272294:34)"
               │
               │ info Saving page source to: /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/failure_debug/html/dashboard app using current data dashboard filtering adding a filter that excludes all data _before all_ hook.html
               └- ✖ fail: "dashboard app using current data dashboard filtering adding a filter that excludes all data "before all" hook"
               │      retry.try timeout: Error: 16 elements completed rendering, waiting on a total of 17
               │     at retry.try (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/renderable.js:42:17)
               │     at <anonymous>
               │     at process._tickCallback (internal/process/next_tick.js:188:7)
               │   Error: retry.try timeout: Error: 16 elements completed rendering, waiting on a total of 17
               │       at retry.try (test/functional/services/renderable.js:42:17)
               │       at <anonymous>
               │       at process._tickCallback (internal/process/next_tick.js:188:7)
               │       at lastError (test/common/services/retry/retry_for_success.js:29:9)
               │       at retryForSuccess (test/common/services/retry/retry_for_success.js:63:13)
               │       at <anonymous>

Note it will only track console.errors, not console.log.

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Copy link
Copy Markdown
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM

@stacey-gammon stacey-gammon merged commit 041a475 into elastic:master Sep 13, 2018
stacey-gammon pushed a commit to stacey-gammon/kibana that referenced this pull request Sep 13, 2018
* Capture browser logs

* spit out in logs, simulate failure to test

* remove leftover code

* simulate failure

* Remove forced failure
stacey-gammon pushed a commit that referenced this pull request Sep 13, 2018
* Capture browser logs

* spit out in logs, simulate failure to test

* remove leftover code

* simulate failure

* Remove forced failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants