divekit / divekit-report_visualizer

A component of divekit used to create a visualization from test reports.
MIT License
0 stars 0 forks source link

Add an improved machine-readable format #13

Open BlobCodes opened 1 year ago

BlobCodes commented 1 year ago

Problem

With v0.2.2, a machine-readable format for parsing the reports was added (export.json). This format was just created on a whim, and is not very adaptable or future-proof. This format is also part of the theme, not the report generator itself, which is a weird place to generate it.

Solution

A new format should be created, preferably as part of the report-generator itself. To keep backwards compatibility in the coming v0.3.x branch, this export should be saved under a new filename. It should preferably include versioning information, system information, report data and information about broken reports.

Draft:

{
  "version": 0, // Gets increased each time a breaking change was made
  "status": "success", // Status of the whole report.
  "reports": [
    // This array currently includes the contents of the previous export.json
    {"name":"first test","category":"test-testing","status":"success"}
  ],
  "errors": [ // Maybe more error information should be added?
    {
      "path": "./*.pmd.json", 
      "error": "File::NotFoundError",
      "message": "Could not find file \"./*.pmd.json\""
    },
    {
      "path": "./dir/dir/TEST-ObjectFactoryFactory.xml", 
      "error": "IndexError",
      "message": "Index out of bounds"
    }
  ]
}