Use built-in Cucumber formatters
mainCucumber-js provides several built-in formatters to control how test results are displayed or exported. You can choose a formatter based on whether you need real-time terminal feedback, a rich interactive report, or structured data for other tools.
Available built-in formatters:
summary: Outputs a summary of results (including errors and pending step snippets) at the end of the run.progress: Provides real-time feedback for each step/hook and a summary at the end.progress-bar: Provides a real-time updating progress bar.pretty: Writes a rich, detailed report of scenario and example execution as it happens (Added in v12.1.0; can be referenced as@cucumber/pretty-formatterfrom v11.1.0).html: Produces a standalone, interactive HTML report.message: Outputs Cucumber Messages as newline-delimited JSON (recommended for structured data).json: Outputs results in the legacy JSON format (maintenance mode).junit: Produces XML-based reports in the JUnit format, ideal for CI platforms.snippets: Prints only the code snippets needed to implement undefined steps.usage: Lists step definitions, their usage locations, and durations.usage-json: Outputs step usage data in JSON format.