Skip to content

testream/cypress-jira-reporter

Repository files navigation

Cypress Jira Reporter: Send Cypress Test Results to Jira with Testream

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

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

Why this example is useful

  • CI-ready: Includes a working GitHub Actions workflow with cypress-io/github-action.
  • Failure artifacts in Jira: Captures screenshots on failed tests and uploads them.
  • Safe onboarding: Upload is enabled only when TESTREAM_API_KEY exists.
  • Real debugging flow: Intentional failing tests show how triage looks in Testream/Jira.

What is Testream?

Testream is an automated test management and reporting platform for Jira teams. It ingests test results from frameworks like Cypress, Playwright, Jest, and Vitest, then provides failure analysis, trends, and release visibility 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 the Testream Automated Test Management and Reporting for Jira app in your Jira workspace to view uploaded runs.

Project structure

cypress/
  e2e/
    navigation.cy.ts   - Navigation tests (passing + 1 intentional failure)
    actions.cy.ts      - Form interaction tests (passing + 1 intentional failure)
    assertions.cy.ts   - DOM assertion tests (passing + 1 intentional failure)
  support/
    commands.ts        - Custom Cypress commands
    e2e.ts             - Support entry point
cypress.config.ts
.github/workflows/cypress.yml
.env.example

The intentional failures exist so you can verify how errors and screenshots appear in Jira.

Quick start: Cypress 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 Cypress tests

npm test

When TESTREAM_API_KEY is present, results upload automatically. Without it, tests still run locally and no upload happens.

Reporter configuration (cypress.config.ts)

The Testream reporter is initialized inside setupNodeEvents. Key behavior:

  • uploadEnabled is derived from API key presence.
  • Reporter is only created when a key exists.
  • screenshotOnRunFailure: true and reporter screenshot: true attach failure screenshots.
  • failOnUploadError is currently false in this example (non-blocking upload behavior).
  • CI metadata (commitSha, repositoryUrl, branchName, buildNumber, buildUrl) is auto-detected.

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

GitHub Actions setup

The workflow at .github/workflows/cypress.yml runs on push, pull request, and manual dispatch.

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 wired:

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

How Cypress results appear in Jira

After connecting your Testream project to Jira, you get:

  • Dashboard views for pass/fail health
  • Failed test details with stack traces and screenshots
  • Trend analytics across runs
  • Jira issue creation from failures with context included

Troubleshooting

Uploads not showing from local runs

  • Ensure TESTREAM_API_KEY is set in .env.
  • Restart your terminal session if env values were changed.

Uploads not showing from GitHub Actions

  • Confirm TESTREAM_API_KEY exists in repository secrets.
  • For fork PRs, check whether secrets are available to the workflow.

Screenshots missing in Testream/Jira

  • Keep screenshotOnRunFailure: true in Cypress config.
  • Keep reporter option screenshot: true enabled.

FAQ

Is this production-ready?

It is an example designed to be copied and adapted. The CI and reporter wiring are production-oriented.

Why include failing tests?

They demonstrate real failure triage in Jira, including screenshot artifacts.

Can I run Cypress without Testream?

Yes. The test suite runs normally without TESTREAM_API_KEY; upload is skipped.

Cypress Jira reporting alternatives (quick view)

Approach Benefit Tradeoff
Raw test artifacts only Simple setup Limited Jira-native analytics
Custom upload scripts Flexible More maintenance and error handling
Testream Cypress reporter (this repo) Native integration + screenshots + Jira workflow Requires Testream setup

Related links