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:
Parse With The JavaScript SDK
If you prefer to control report parsing in code, use splitReportFile and reportFileToMarkdown from @midscene/core.
splitReportFile and reportFileToMarkdown 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.
Use splitReportFile when you want the most complete, programmatic raw data. Use reportFileToMarkdown when you want readable content for summarization or downstream content generation.
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.

