ploosh.
Documentation
Structure
output/
├─ json/
│ ├─ test_results.json
│ ├─ test_results/
│ │ ├─ test case 1.xlsx
│ │ ├─ test case 2.xlsx
│ │ └─ ...
The json extractor will generate a testresults.json file and a testresults folder containing the details of the test cases results in xlsx format.
test_results.json
Thetest_results.json file will contain the following properties:
execution_id: the unique execution identifier for this test runname: the name of the test casestate: the state of the test case. Can bepassed,failedorerrorerror.type: the type of the error if the test case failed or raised an errorerror.message: the error message if the test case failed or raised an errorerror.detailfilepath: the path to the Excel file containing the comparison gap details (only present when there are data mismatches)source.start: the start time of the source extractionsource.end: the end time of the source extractionsource.duration: the duration of the source extractionsource.count: the count of the source datasetsource.executed_action: the executed action for the source (SQL query, file path, etc.)expected.start: the start time of the expected extractionexpected.end: the end time of the expected extractionexpected.duration: the duration of the expected extractionexpected.count: the count of the expected datasetexpected.executed_action: the executed action for the expected dataset (SQL query, file path, etc.)compare.start: the start time of the comparisoncompare.end: the end time of the comparisoncompare.duration: the duration of the comparisoncompare.success_rate: the success rate of the test case
test_results folder
Thetest_results folder will contain one xlsx file per test case. Each file will contain a sheet with the gap between the source and the expected datasetExample
[
{
"executionid": "testexecution_123",
"name": "test 1",
"state": "passed",
"source": {
"start": "2024-02-05T17:08:36Z",
"end": "2024-02-05T17:08:36Z",
"duration": 0.0032982,
"count": 100,
"executed_action": "SELECT * FROM table1"
},
"expected": {
"start": "2024-02-05T17:08:36Z",
"end": "2024-02-05T17:08:36Z",
"duration": 6.0933333333333335e-05,
"count": 100,
"executed_action": "SELECT * FROM table2"
},
"compare": {
"start": "2024-02-05T17:08:36Z",
"end": "2024-02-05T17:08:36Z",
"duration": 0.0032982,
"success_rate": 1.0
}
},
{
"executionid": "testexecution_123",
"name": "test 2",
"state": "failed",
"source": {
"start": "2024-02-05T17:08:36Z",
"end": "2024-02-05T17:08:36Z",
"duration": 0.0032982,
"count": 100,
"executed_action": "SELECT * FROM table1"
},
"expected": {
"start": "2024-02-05T17:08:36Z",
"end": "2024-02-05T17:08:36Z",
"duration": 6.0933333333333335e-05,
"count": 100,
"executed_action": "SELECT * FROM table2"
},
"compare": {
"start": "2024-02-05T17:08:36Z",
"end": "2024-02-05T17:08:36Z",
"duration": 0.0032982,
"success_rate": 0.95
},
"error": {
"type": "Data",
"message": "Some rows are not equals between source dataset and expected dataset",
"detailfilepath": "/output/json/test_results/test 2.xlsx"
}
}
]