JSON exporter

The JSON exporter generates a structured JSON file with detailed results for each test case, plus Excel files for failed tests.

This is the default export format.

Output structure

{output_path}/json/
├── test_results.json             → Structured results for all test cases
└── test_results/
    ├── Test case 1.xlsx          → Gap details (only for failed tests)
    └── Test case 2.xlsx

JSON structure

[
  {
    "execution_id": "a1b2c3d4-...",
    "name": "Test case name",
    "state": "passed",
    "source": {
      "start": "2024-02-05T17:08:36Z",
      "end": "2024-02-05T17:08:36Z",
      "duration": 0.003298,
      "count": 150,
      "executed_action": "SELECT * FROM employees"
    },
    "expected": {
      "start": "2024-02-05T17:08:36Z",
      "end": "2024-02-05T17:08:36Z",
      "duration": 0.000061,
      "count": 150,
      "executed_action": "./data/expected.csv"
    },
    "compare": {
      "start": "2024-02-05T17:08:36Z",
      "end": "2024-02-05T17:08:36Z",
      "duration": 0.000465,
      "success_rate": 1.0
    },
    "error": {
      "type": null,
      "message": null,
      "detailfilepath": null
    }
  }
]

JSON properties

PropertyDescription
executionidUnique identifier for the test run
nameTest case name
stateResult: passed, failed, error, notExecuted
source.start / end / durationSource loading timing
source.countNumber of rows in source dataset
source.executedactionQuery or path executed
expected.start / end / durationExpected loading timing
expected.countNumber of rows in expected dataset
expected.executedactionQuery or path executed
compare.start / end / durationComparison timing
compare.successratePercentage of matching rows
error.typeError category: headers, count, data, compare
error.messageError description
error.detailfilepathPath to XLSX gap analysis file

Usage

Command line

ploosh --connections connections.yml --cases test_cases --export JSON

JSON is the default format, so --export can be omitted.

Gap analysis Excel files

For each failed test case, an XLSX file is generated showing the differences between source and expected datasets with side-by-side comparison of values.