Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Test exception doesn't stop the browserstack session #191

Open
SevenOutman opened this issue May 30, 2021 · 0 comments
Open

Test exception doesn't stop the browserstack session #191

SevenOutman opened this issue May 30, 2021 · 0 comments

Comments

@SevenOutman
Copy link

SevenOutman commented May 30, 2021

I have a test suite that exits unexpectedly on IE11. But the BrowserStack session does not stop, leaving its "REST API" attribute "UNMARKED" instead of "FAILED" like when the test cases fail on other browsers, hence the test result reports "4/5 failed" which was actually "5/5".
image

Below is the log from the IE11 sessoin.

29 05 2021 21:07:07.617:INFO [karma-server]: Karma v6.3.2 server started at http://localhost:9876/
29 05 2021 21:07:07.619:INFO [launcher]: Launching browsers bs_win_ie11 with concurrency unlimited
29 05 2021 21:07:07.666:INFO [launcher]: Starting browser IE 11.0 (Windows 10) on BrowserStack
29 05 2021 21:07:17.765:INFO [launcher.browserstack]: IE 11.0 (Windows 10) session at https://automate.browserstack.com/builds/36c39a182abbe245bfcecbb13e68610092de5037/sessions/1de0279f76b638289f68fd04d9eb0402781fe7b7
29 05 2021 21:07:25.503:INFO [IE 11.0 (Windows 10)]: Connected on socket 7s00gmL65GNO_poRAAAB with id 64246556
IE 11.0 (Windows 10) ERROR
  Object doesn't support property or method 'fromEntries'
  at :1063:3
  
  TypeError: Object doesn't support property or method 'fromEntries'
     at _default (eval code:1063:3)
     at getDefaultPalette (eval code:1206:3)
     at eval code (eval code:490:1)
     at ./src/AutoComplete/test/AutoCompleteStylesSpec.js (/var/folders/51/jsm48g3x0d92hb5v_h7l63w40000gp/T/_karma_webpack_86116/commons.js:3453:1)
     at __webpack_require__ (/var/folders/51/jsm48g3x0d92hb5v_h7l63w40000gp/T/_karma_webpack_86116/runtime.js:31:12)
     at webpackContext (eval code:220:2)
     at runAllTests (eval code:85:3)
     at eval code (eval code:89:1)
     at ./test/index.js (/var/folders/51/jsm48g3x0d92hb5v_h7l63w40000gp/T/_karma_webpack_86116/commons.js:8942:1)
     at __webpack_require__ (/var/folders/51/jsm48g3x0d92hb5v_h7l63w40000gp/T/_karma_webpack_86116/runtime.js:31:12)

Finished in 0.233 secs / 0 secs @ 21:07:43 GMT+0800 (China Standard Time)

SUMMARY:
✔ 0 tests completed
  Affix
    ✔ Should render a button
    ✔ Should have a custom style
  Animation
    ✔ Should outout enteredClassName
npm ERR! code ELIFECYCLE
npm ERR! errno 1

Looks like the plugin only stops BS session when the tests exits normally.

emitter.on('exit', function (done) {
log.debug('Shutting down BrowserStackLocal')
bsLocal.stop(function () {
log.debug('Stopped BrowserStackLocal')
done()
})
})

But I believe an unexpected exit should also be considered a failed session.

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

No branches or pull requests

1 participant