Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of json format #18

Open
hterik opened this issue May 31, 2022 · 2 comments
Open

Documentation of json format #18

hterik opened this issue May 31, 2022 · 2 comments

Comments

@hterik
Copy link

hterik commented May 31, 2022

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?

@nicoddemus
Copy link
Member

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.

@hterik
Copy link
Author

hterik commented Jun 3, 2022

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.

RonnyPfannschmidt added a commit to RonnyPfannschmidt/pytest-reportlog that referenced this issue May 2, 2023
when using the .bz2/.gz/.xz extension use the stdlib openers for it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants