1

I use a custom browser provider - saucelabs - I'd like my custom reporter to know in which remote browser it ran so I can properly correlate the saucelabs video with a failed test. This obviously is only an issue with concurrency > 1 :)

If a test fails which remote browser was it run in??? thanks!! Mark

1 Answers1

1

The reportTestDone method of a reporter plugin is called after a test is done in all browsers. If testRunInfo.errs array is empty, it means that the test passed in all browsers. If it is non-empty, every item has a userAgent property, telling in which browser the error occurred.

So, if you need a list of browsers in which the test fails, you could use something like this: _.chain(testRunInfo.errs).map('userAgent').uniq().value().

I didn't find this in the official documentation, though.

Vladimir A.
  • 2,202
  • 2
  • 10
  • 28
Alexey Lindberg
  • 756
  • 3
  • 12
  • thanks!!!! I know you can get which -type- of browser failed a test - for saucelabs to get the video of the failed test I need to know specifically -which- browser failed (specifically the webdriver sessionId). – user1883202 May 06 '20 at 17:17
  • @user1883202 At the moment there is no detailed information about browsers in `reportTestDone` arguments. I suggest you create a separate feature request in the TestCafe repository using the following form: [https://github.com/DevExpress/testcafe/issues/new?template=feature_request.md](https://github.com/DevExpress/testcafe/issues/new?template=feature_request.md) and describe your scenario in greater detail. – Alex Kamaev May 07 '20 at 13:05