Skip to main content

WebdriverIO Reporter

Use the Testream WebdriverIO Reporter to send browser-automation test results from CI/CD into Testream and Jira with built-in upload support.

Looking for the commercial overview first? Read the website page for WebdriverIO Jira integration.

If your WebdriverIO suites include Cucumber and Gherkin workflows, also read BDD Jira integration.

Installation

npm install --save-dev @testream/webdriverio-reporter

Basic Configuration

Add the reporter and launcher service to your wdio.conf.ts:

wdio.conf.ts
const testreamConfig = {
apiKey: process.env.TESTREAM_API_KEY || "",
uploadEnabled: true,
};

export const config: Options.Testrunner = {
reporters: ["spec", ["@testream/webdriverio-reporter", testreamConfig]],
services: [["@testream/webdriverio-reporter", testreamConfig]],
};

The services entry registers a launcher service that automatically aggregates per-worker CTRF reports and uploads the merged result when the test run completes.

Configuration Options

OptionTypeDefaultDescription
apiKeystring-Required Testream API key
uploadEnabledbooleantrueEnable/disable automatic upload
failOnUploadErrorbooleanfalseFail the test run if upload fails
branchstringautoGit branch name
commitShastringautoGit commit SHA
repositoryUrlstringautoGit repository URL
outputDirstringctrfCTRF output directory
outputFilestringctrf-report.jsonCTRF report filename
buildNamestring-Build name
buildNumberstringautoBuild number
buildUrlstringautoBuild URL
testEnvironmentstring-Environment name
appNamestring-Application name
appVersionstring-Application version
testTypestringe2eTest type (e.g., api, unit)

Full Configuration Example

wdio.conf.ts
const testreamConfig = {
apiKey: process.env.TESTREAM_API_KEY || "",
uploadEnabled: true,
failOnUploadError: true,
outputDir: "ctrf",
outputFile: "ctrf-report.json",
testType: "e2e",
appName: "My App",
appVersion: "1.0.0",
buildName: process.env.GITHUB_WORKFLOW,
testEnvironment: process.env.TEST_ENV || "ci",
};

export const config: Options.Testrunner = {
runner: "local",
specs: ["./test/specs/**/*.ts"],
maxInstances: 5,
capabilities: [
{
browserName: "chrome",
"goog:chromeOptions": { args: ["--headless", "--disable-gpu"] },
},
],
logLevel: "info",
framework: "mocha",
reporters: ["spec", ["@testream/webdriverio-reporter", testreamConfig]],
services: [["@testream/webdriverio-reporter", testreamConfig]],
mochaOpts: { ui: "bdd", timeout: 60000 },
};

GitHub Actions Example

.github/workflows/wdio-tests.yml
name: WebdriverIO Tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Run WebdriverIO tests
env:
TESTREAM_API_KEY: ${{ secrets.TESTREAM_API_KEY }}
run: npx wdio run wdio.conf.ts

Notes

Git Context Detection

In CI environments like GitHub Actions, GitLab CI, and CircleCI, git context (branch, commit SHA, repository URL) is automatically detected from environment variables. You only need to provide these values explicitly if running outside of standard CI environments.

Sample Project

The testream/webdriverio-jira-reporter repository is a complete working example of a WebdriverIO project integrated with Testream. It includes example tests, full reporter configuration, and a ready-to-use GitHub Actions workflow.

NPM Package

What's Next?