Skip to content

Latest commit

 

History

History
78 lines (50 loc) · 2.16 KB

TESTING.md

File metadata and controls

78 lines (50 loc) · 2.16 KB

Testing the Bugsnag JS notifier

Initial setup

Clone and navigate to this repo:

git clone [email protected]:bugsnag/bugsnag-js.git --recursive
cd bugsnag-js

Install top level dependencies:

npm i

Build each of the standalone packages:

npm run build

Unit tests

Runs the unit tests for each package.

npm run test:unit

Type tests

This tests the validity of .d.ts files by attempting to compile a TypeScript program that uses Bugsnag.

npm run test:types

Linting

Lints the entire repo with ESLint. On JavaScript files this uses the standard ruleset and on TypeScript files this uses the @typescript/eslint recommended set of rules.

npm run test:lint

End to end

These tests are implemented with our notifier testing tool Maze runner.

End to end tests are written in cucumber-style .feature files, and need Ruby-backed "steps" in order to know what to run. The tests are located in the top level test directory.

Maze runner's CLI and the test fixtures are containerised so you'll need Docker (and Docker Compose) to run them.

Note: only Bugsnag employees can run the end-to-end tests. We have dedicated test infrastructure and private BrowserStack credentials which can't be shared outside of the organisation.

Authenticating with the private container registry

You'll need to set the credentials for the aws profile in order to access the private docker registry:

aws configure --profile=opensource

Subsequently you'll need to run the following command to authenticate with the registry:

npm run test:test-container-registry-login

Your session will periodically expire, so you'll need to run this command to re-authenticate when that happens.

For further details, see the TESTING.md for individual platforms: