pytest-reportlog
pytest-reportlog copied to clipboard
Documentation of json format
Is the format of the json-stream documented somewhere?
I've tried to follow the code and it appears to be a serialization of a https://docs.pytest.org/en/7.1.x/reference.html#_pytest.reports.TestReport object (or any of the other BaseReport). Is this correct? In that case can that be clarified in documentation?
Also curious if there is any ambition to document the serialized form of the json, or is the reference to the TestReport object enough?
Hi @hterik,
Is this correct?
Yes, exactly.
In that case can that be clarified in documentation?
That it is a serialization of BaseReport
? I think so.
Also curious if there is any ambition to document the serialized form of the json, or is the reference to the TestReport object enough?
Not sure how we could document that (I mean, which format, how to present it, etc). I think that for now a mention that it is a serialization of TestReport
is harmless, but doesn't really tell much.
I think for now users are best served that if they just produce an output using their suite, and use that as reference.
Thanks. Links to TestReport/BaseReport/etc would be great, it has a lot of the necessary information.
Just to note, sample output for reference is ok as an introduction only, but not enough as documentation for a serialization format. Because it only shows you the values that happened to be produced during that single run. It might for example only show outcomes passed
and fail
, leaving me unaware there is a third outcome; skipped
, that my parser must support.