Skip to content

Cypress reporter options

Cypress does not use a config-based reporter in the same way as Vitest or Playwright. You generate reports in one of two ways:

When Cypress runs, it uses Mocha under the hood. You can pass the executable-stories reporter and options:

Terminal window
cypress run --reporter executable-stories-cypress/reporter --reporter-options outputDir=docs,outputName=user-stories

Reporter options match FormatterOptions from executable-stories-formatters. See Vitest reporter options for the full option list (output configuration, filtering, markdown options, html, junit, history, notifications, and more).

After cypress.run(), build a raw run and generate reports programmatically:

import cypress from 'cypress';
import {
buildRawRunFromCypressResult,
generateReportsFromRawRun,
} from 'executable-stories-cypress/reporter';
const result = await cypress.run();
const rawRun = buildRawRunFromCypressResult(result, { projectRoot: process.cwd() });
await generateReportsFromRawRun(rawRun, {
formats: ['markdown', 'html'],
outputDir: 'docs',
outputName: 'user-stories',
output: { mode: 'aggregated' },
});

Options are the same FormatterOptions used by the other framework reporters: formats, outputDir, outputName, output, markdown, html, junit, cucumberJson, cucumberMessages, history, notification, and so on.

OptionTypeDefaultDescription
formatsOutputFormat[]["cucumber-json"]Output formats: "markdown", "html", "junit", "cucumber-json", "cucumber-messages", "cucumber-html".
outputDirstring"reports"Base directory for output files.
outputNamestring"test-results"Base filename (without extension).
outputNameTimestampbooleanfalseAppend a UTC timestamp suffix to the output filename.
outputOutputConfig{ mode: "aggregated" }Output routing configuration.

For OutputConfig, markdown, html, and other nested options, see Vitest reporter options.