Skip to content

Support exporting test results to structured data formats #971

Description

@arcursino

Feature request

Description the feature

Introduce an option to export the final test execution results into structured, machine-readable formats such as JSON, JUnit XML, and CSV.

Goals of this feature:

  • Enable CI/CD Integration: Provide native support for industry-standard formats like JUnit XML, allowing platforms (GitHub Actions, GitLab CI, Jenkins) to parse and display ScanAPI test results directly in their native UI.
  • Enable Data Pipelines: Provide raw, machine-readable JSON and CSV outputs to allow data and DevOps teams to feed ScanAPI results into external databases or BI tools (like Kibana, Grafana, or Tableau).
  • Maintain Modular Architecture: Ensure the reporting system is refactored into an extensible, modular architecture where new formats can be easily added in the future.
  • Backward Compatibility: Ensure that adding these formats does not affect or break the generation of the default HTML report.

Is your feature request related to a problem?

Yes. Currently, ScanAPI only generates an interactive HTML report. While this is great for manual inspection by developers, it is difficult to integrate into automated data pipelines, central logging platforms, or generic CI/CD dashboard tools that require structured data.

To use ScanAPI results in automated quality-tracking systems, users currently have to write custom parsers for the HTML report or scrape stdout logs.

Do you have any suggestions on how to add this feature in scanapi ?

  • CLI Interface: Introduce a new CLI flag like scanapi run --output-format json or scanapi run -o report.json.
  • Architecture: Refactor the current reporting system to use a generic Reporter base class or interface.
  • Reporters: Implement specific reporter classes: HTMLReporter (existing logic), JSONReporter, JUnitXMLReporter, and CSVReporter. This keeps the codebase modular and clean.

Metadata

Metadata

Assignees

Labels

ReporterRelated with the API doc generated by ScanAPI
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions