This repo only exists to reproduce an issue that I'm having with updating a session-status on browserstack.
The issue is that after each test-suite, a session-update will be sent to Browserstack. The request contains a status and a reason (if the suite had at least one failing test). In this setup, it seems that the status is applied, but the reason is ignored (or overwritten).
UPDATE 2020-03-06
Browserstack's support found out that Nightwatch's Browserstack-"transport module" sends a session-update after each test-suite, with a blank reason. In this case that resulted in an overwritten reason.
A pull request has been created in Nightwatch's repo: nightwatchjs/nightwatch#2357
Required node version: lts/dubnium
npm install
Following environment-variables have to be set:
BROWSERSTACK_USER
: Browserstack-usernameBROWSERSTACK_ACCESS_KEY
: Access-key for the user
npm run test
- The function (
sendBrowserStackSessionStatus
) which sends the session-update to browserstack, is located intest/e2e/util/browserstack.js
- The hook (
afterEach
) that triggers the session update (which is executed after every completed test-suite) is located intest/config/nightwatch-globals.js
- Setting the artificial delay
DELAY__BROWSERSTACK_STATUS
so something like5000
ms (may vary between a value of1000
and15000
to make it work), will make thereason
work
- Setting the artificial delay
- The Nightwatch-configuration for Browserstack is in
test/config/nightwatch-browserstack.conf.js
- The test-suites are in
test/e2e/scenarios