- Setup a project on Buildkite Test Analytics and note the key
- Add 'buildkite-analytics' to your npm packages
- Configure Jest to use the reporter and enable
testLocationInResults
// jest.config.js
reporters: [
'default',
'buildkite-analytics/jest-reporter'
],
testLocationInResults: true
- set the environment variable for your test analytics
export BUILDKITE_ANALYTICS_KEY=xyz
- Run your tests
To enable debugging, set BUILDKITE_ANALYTICS_DEBUG=true