Skip to content

Cypress Reporter ​

The UTEM Cypress reporter is a zero-dependency plugin that streams test results to the UTEM server in real time as specs run.

Installation ​

bash
npm install --save-dev utem-cypress-reporter

Configuration ​

cypress.config.js ​

javascript
const { defineConfig } = require('cypress');
const { registerUtemPlugin } = require('utem-cypress-reporter');

module.exports = defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      registerUtemPlugin(on, config, {
        serverUrl: 'http://localhost:8080/utem',
        apiKey: process.env.UTEM_API_KEY,
      });
    }
  }
});

cypress.config.ts ​

typescript
import { defineConfig } from 'cypress';
import { registerUtemPlugin } from 'utem-cypress-reporter';

export default defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      registerUtemPlugin(on, config, {
        serverUrl: 'http://localhost:8080/utem',
        apiKey: process.env.UTEM_API_KEY,
      });
    }
  }
});

Configuration options ​

MethodExample
Plugin option{ serverUrl: 'http://host:8080/utem' }
Environment variableUTEM_SERVER_URL=http://host:8080/utem
Defaulthttp://localhost:8080/utem

CI Integration ​

GitHub Actions ​

yaml
- name: Run Cypress tests
  run: npx cypress run
  env:
    UTEM_SERVER_URL: http://your-utem-server:8080/utem
    UTEM_API_KEY: ${{ secrets.UTEM_API_KEY }}

Jenkins / GitLab CI ​

bash
UTEM_SERVER_URL=http://utem:8080/utem UTEM_API_KEY=utem_xxx npx cypress run

Custom Run Name ​

Set via environment variable:

bash
UTEM_RUN_NAME="Nightly E2E" npx cypress run

What Gets Reported ​

Cypress eventUTEM event
before:runTEST_RUN_STARTED
before:specTEST_SUITE_STARTED (per spec file)
after:spec test passedTEST_PASSED + TEST_CASE_FINISHED
after:spec test failedTEST_FAILED + TEST_CASE_FINISHED
after:spec test pendingTEST_SKIPPED + TEST_CASE_FINISHED
after:specTEST_SUITE_FINISHED
after:runTEST_RUN_FINISHED

On failure, the assertion error message and stack trace are captured and shown in the dashboard.

Requirements ​

  • Node.js ≥ 18
  • Cypress ≥ 10

Released under the MIT License.