JavaScript / TypeScript

Test Suite Monitoring for Cypress

Monitor your Cypress test suite health with TestGlance

Get Started in 3 Steps

  1. 1Install the mocha-junit-reporter: `npm install --save-dev mocha-junit-reporter`
  2. 2Configure Cypress to use the JUnit reporter in cypress.config.ts
  3. 3Add the TestGlance GitHub Action to your CI workflow

GitHub Actions Workflow

# .github/workflows/test.yml
name: Tests
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - name: Run tests
        run: npx cypress run --reporter mocha-junit-reporter --reporter-options mochaFile=test-results/cypress.xml
      - name: Report to TestGlance
        if: always()
        uses: testglance/action@v1
        with:
          api-key: ${{ secrets.TESTGLANCE_API_KEY }}
          report-path: test-results/cypress.xml

What You Get

  • Flaky test detection — automatically identify tests that pass and fail intermittently
  • Duration trends — track which tests are getting slower over time
  • Health score — a single metric summarizing your test suite reliability
  • CI summary — rich test result summaries directly in your GitHub Actions runs

FAQ

How do I generate JUnit XML from Cypress?

Install mocha-junit-reporter and configure it in your Cypress config or via CLI: `cypress run --reporter mocha-junit-reporter --reporter-options mochaFile=test-results/cypress.xml`.

Does TestGlance work with Cypress component tests?

Yes. Both Cypress e2e and component tests can output JUnit XML. Configure the reporter for both test types and point TestGlance to the output files.

How does TestGlance handle Cypress retries?

When Cypress retries a failing test and it passes, TestGlance sees the final result. However, if the same test flips between runs, it gets flagged as flaky.

Start Monitoring Your Cypress Tests

Free to get started. Set up in under 5 minutes.

Get Started

Other Frameworks