Consume Report Files
Midscene HTML report files capture the full execution history of a single Agent, making them useful for replay and debugging.
Starting in v1.7.0, you can extract raw screenshots and JSON data from a report file, or convert the report into Markdown so other tools can consume it.
Example
You can parse a report file into a Markdown file like this:
You can then combine it with the Remotion Skill to parse the Markdown file and generate a customized replay video.
The generated video looks like this:
Parse With The CLI
The report parsing tool is included in each platform CLI package, such as @midscene/web and @midscene/android. The subcommand is report-tool.
Extract report contents as JSON and export the related screenshots into the output-data directory:
Convert the report file into Markdown and write the result into the output-markdown directory:
Merge multiple report files into a single combined report:
Repeat --htmlReport once per source report. --outputDir and --outputName are optional; when omitted, the merged file is written to the default Midscene report directory with an auto-generated name. Pass --overwrite to replace an existing merged file.
Parse With The JavaScript SDK
If you prefer to control report parsing in code, use splitReportFile, reportFileToMarkdown, and mergeReportFiles from @midscene/core.
splitReportFile, reportFileToMarkdown, and mergeReportFiles serve different outputs:
splitReportFilegenerates JSON files for the original structured objects (one*.execution.jsonper execution). The JSON keeps the rawReportActionDump-style data and exports screenshots alongside it. The returnedexecutionJsonFilesandscreenshotFilesare lists of generated file paths.reportFileToMarkdownconverts the same report into human-readable Markdown and exports the screenshots referenced by that Markdown. The returnedmarkdownFilescontains the generated Markdown file paths.mergeReportFilescombines several report files into one merged HTML report. It is a thin wrapper overReportMergingToolthat derivestestTitle/testDescriptionfrom each source report'sgroupNameautomatically. Use it when you run multiple CLI actions or tests and want to consolidate their reports.
About Fields In JSON And Markdown
The parsed JSON and Markdown structures may change as Midscene evolves. Use the actual conversion result as the source of truth.

