Skip to content

codekie/browserstack-status-update-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

browserstack-status-update-sample

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

Requirements

Required node version: lts/dubnium

Installation

npm install

Configuration

Following environment-variables have to be set:

  • BROWSERSTACK_USER: Browserstack-username
  • BROWSERSTACK_ACCESS_KEY: Access-key for the user

Run the tests

npm run test

Important Files

  • The function (sendBrowserStackSessionStatus) which sends the session-update to browserstack, is located in test/e2e/util/browserstack.js
  • The hook (afterEach) that triggers the session update (which is executed after every completed test-suite) is located in test/config/nightwatch-globals.js
    • Setting the artificial delay DELAY__BROWSERSTACK_STATUS so something like 5000ms (may vary between a value of 1000 and 15000 to make it work), will make the reason work
  • The Nightwatch-configuration for Browserstack is in test/config/nightwatch-browserstack.conf.js
  • The test-suites are in test/e2e/scenarios

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published