Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Cypress io Cypress Reporter Component

From Leeroopedia
Revision as of 11:10, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Cypress_io_Cypress_Reporter_Component.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains UI, React
Last Updated 2026-02-12 00:00 GMT

Overview

Concrete React component for rendering test results in real time provided by the Cypress reporter package.

Description

The Reporter is a React functional component wrapped in MobX observer for reactive rendering. It receives test execution events from the driver, initializes MobX stores for runnables, stats, and app state, and renders the full test result UI including headers, runnable trees, and command logs. It supports Studio mode for recording new tests.

Usage

This component is mounted by the unified runner in the Cypress application. It is used in both open mode (interactive) and as the foundation for headless mode result aggregation.

Code Reference

Source Location

Signature

export interface BaseReporterProps {
  appState: AppState
  className?: string
  runnablesStore: RunnablesStore
  runner: Runner
  scroller: Scroller
  statsStore: StatsStore
  autoScrollingEnabled?: boolean
  isSpecsListOpen?: boolean
  showFetchRequests?: boolean
  events: Events
  error?: RunnablesErrorModel
  resetStatsOnSpecChange?: boolean
  renderReporterHeader?: (props: ReporterHeaderProps) => JSX.Element
  studioEnabled: boolean
  runnerStore: MobxRunnerStore
}

export interface SingleReporterProps extends BaseReporterProps {
  runMode?: 'single'
}

const Reporter: React.FC<SingleReporterProps> = observer(({
  appState, runner, className, error, runMode, studioEnabled,
  autoScrollingEnabled, isSpecsListOpen, showFetchRequests,
  resetStatsOnSpecChange, renderReporterHeader, runnerStore
}) => { ... })

Import

import Reporter from '@packages/reporter/src/main'

I/O Contract

Inputs

Name Type Required Description
appState AppState Yes Application state (auto-scrolling, spec list)
runner Runner Yes Runner instance for event communication
runnablesStore RunnablesStore Yes MobX store for test tree data
statsStore StatsStore Yes MobX store for pass/fail/pending counts
studioEnabled boolean Yes Whether Studio recording mode is available
runnerStore MobxRunnerStore Yes Runner store with spec and run information

Outputs

Name Type Description
JSX.Element React component Rendered test results UI with command log

Usage Examples

Mounting the Reporter

import Reporter from '@packages/reporter/src/main'

<Reporter
  appState={appState}
  runner={runner}
  runnablesStore={runnablesStore}
  statsStore={statsStore}
  studioEnabled={false}
  runnerStore={runnerStore}
  scroller={scroller}
  events={events}
/>

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment