Export test results as JSON
Closed this issue · 3 comments
otto-ifak commented
The cli allows to print the result to console or to write an HTML file.
To improve integration in CI pipelines, there should also be the option to output the results as JSON.
otto-ifak commented
This is already implemented for the python interface:
We need to
- document this
- add a comment line option to the cli
otto-ifak commented
Rename to_json
to to_dict
otto-ifak commented
Done:
python -m aas_test_engines check_file test.aasx --output json > output.json
Example output:
{
"m": "Check JSON",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/Environment is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Property assetAdministrationShells is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "item 0 is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/AssetAdministrationShell is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Property assetInformation is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/AssetInformation is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Property globalAssetId is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/Identifier is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Value is shorter than 1",
"f": "",
"l": 2,
"s": []
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"m": "Property submodels is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "item 0 is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/Submodel is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Property submodelElements is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "item 0 is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/SubmodelElement_choice is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/Property is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Property valueId is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/Reference is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Property keys is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Array is shorter than 1",
"f": "",
"l": 2,
"s": []
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"m": "item 1 is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/SubmodelElement_choice is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/RelationshipElement is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/RelationshipElementBase is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Does not match all sub-schemas",
"f": "",
"l": 2,
"s": [
{
"m": "Property first is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/Reference is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Property keys is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Array is shorter than 1",
"f": "",
"l": 2,
"s": []
}
]
}
]
}
]
},
{
"m": "Property second is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Reference #/$defs/Reference is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Property keys is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Array is shorter than 1",
"f": "",
"l": 2,
"s": []
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"m": "Property conceptDescriptions is invalid",
"f": "",
"l": 2,
"s": [
{
"m": "Array is shorter than 1",
"f": "",
"l": 2,
"s": []
}
]
}
]
}
]
}
]
}