Skip to content

testream/webdriverio-jira-reporter

Repository files navigation

WebdriverIO Jira Reporter: Send WebdriverIO Results to Jira with Testream

This repository is a practical WebdriverIO + Jira integration example using @testream/webdriverio-reporter. It shows how to upload WDIO E2E results and failure screenshots from local runs and GitHub Actions into Jira through Testream.

If you are searching for "WebdriverIO Jira reporter", "WDIO GitHub Actions Jira integration", or "send WebdriverIO results to Jira", this repo is the implementation template.

Why this example is useful

  • CI-ready: Includes a complete GitHub Actions workflow.
  • Failure screenshots: Captures screenshots for failing tests via afterTest.
  • Correct WDIO wiring: Registers Testream in both services and reporters.
  • Safe local onboarding: Upload only activates when TESTREAM_API_KEY is set.

What is Testream?

Testream is an automated test management and reporting platform for Jira teams. It ingests test results from frameworks like WebdriverIO, Playwright, Cypress, and Jest, then provides failure diagnostics and trends inside Jira.

If this sample repository is not the framework you need, browse all native reporters in the Testream docs: https://docs.testream.app/.

Watch Testream in action

Click to see how Testream turns raw CI test results into actionable Jira insights (failures, trends, and release visibility):
Watch the video

Install Testream Automated Test Management and Reporting for Jira in your Jira workspace to view uploaded runs.

Project structure

test/
  specs/
    navigation.spec.ts - Navigation tests (passing + 1 intentional failure)
    forms.spec.ts      - Form interaction tests (passing + 1 intentional failure)
    assertions.spec.ts - Assertion tests (passing + 1 intentional failure)
wdio.conf.ts
.github/workflows/webdriverio.yml
.env.example

The intentional failures demonstrate how WDIO failures and screenshots appear in Testream/Jira.

Quick start: WebdriverIO to Jira reporting

1. Create your Testream project and API key

  1. Sign in at testream.app.
  2. Create a project.
  3. Copy your API key.

2. Install dependencies

npm install

Requires Node.js 18+.

3. Configure environment variables

cp .env.example .env

Set at least:

TESTREAM_API_KEY=<your key>

4. Run WebdriverIO tests

npm test

With TESTREAM_API_KEY, uploads run automatically. Without it, tests still execute and upload is skipped.

Reporter configuration (wdio.conf.ts)

Key behavior in this example:

  • uploadEnabled is derived from API key presence.
  • Testream is added to both:
    • services (run-level aggregation/upload orchestration)
    • reporters (test result capture)
  • failOnUploadError: true is enabled.
  • testType: 'e2e', appName, appVersion, and testEnvironment are explicit.
  • CI metadata (branch, commitSha, repositoryUrl, buildNumber, buildUrl) is auto-detected.

Reporter docs: https://docs.testream.app/reporters/webdriverio

GitHub Actions setup

The workflow at .github/workflows/webdriverio.yml runs on pushes and pull requests to main.

Add this repository secret:

Settings -> Secrets and variables -> Actions -> New repository secret

Name Value
TESTREAM_API_KEY Your Testream API key

Workflow env examples already set:

Variable Example
TESTREAM_APP_VERSION ${{ github.sha }}
TEST_ENV ci

How results appear in Jira

After connecting Testream to Jira, you get:

  • Dashboard-level pass/fail summaries
  • Failure diagnostics with stack traces and screenshots
  • Trend analytics across runs
  • Jira issue creation directly from failed tests

Troubleshooting

Upload not happening

  • Confirm TESTREAM_API_KEY exists in .env or Actions secrets.
  • Confirm Testream is enabled in both services and reporters.

Screenshots missing in Jira

  • Keep the afterTest failure screenshot hook in wdio.conf.ts.

CI uploads missing

  • Confirm workflow run context has access to repository secrets.

FAQ

Is this production-ready?

It is an example repository with production-style wiring intended for adaptation.

Why include failing tests?

To demonstrate screenshot-aware failure triage in Testream/Jira.

Can I run WDIO without Testream?

Yes. WDIO runs normally without API key-based upload.

WebdriverIO Jira reporting alternatives (quick view)

Approach Benefit Tradeoff
Raw WDIO logs/artifacts Easy baseline Limited Jira-native reporting
Custom upload logic Flexible Higher maintenance
Testream WDIO reporter (this repo) Native integration + screenshot-aware Jira workflow Requires Testream setup

Related links