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

feat(cli): add json test reporter #10426

Closed

Conversation

caspervonb
Copy link
Contributor

@caspervonb caspervonb commented Apr 29, 2021

This adds JSON as an output format for test results in the same style as the linter (non streaming).

Closes #8550

@caspervonb caspervonb marked this pull request as draft April 29, 2021 16:58
@caspervonb caspervonb force-pushed the feat-cli-add-json-test-reporter branch from 13fa9a9 to fc87397 Compare April 29, 2021 16:59
@caspervonb caspervonb marked this pull request as ready for review April 29, 2021 17:32
@caspervonb

This comment has been minimized.

@caspervonb caspervonb force-pushed the feat-cli-add-json-test-reporter branch from c22e6be to c79db5f Compare April 30, 2021 17:23
@@ -0,0 +1,101 @@
{
"events": [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on discord. The output of --json shouldn't be events-based, it should print out a summary at the end. We should have a separate --ndjson/--jsonl/etc. flag which outputs test events as individual line-delimited JSON objects. If anyone thinks we only need one of these, we should favour the latter. I think both are useful.

This pattern of having an overarching JSON object where nested array elements are chunked one-by-one isn't a real format and doesn't work well. Streaming consumers can't take advantage of the overarching JSON structure and will have a really annoying time parsing. Non-streaming consumers have no use for an events-based output and likely just need a summary. So this output doesn't serve anyone.

@caspervonb caspervonb marked this pull request as draft May 12, 2021 08:57
@caspervonb
Copy link
Contributor Author

Punting this for a while because upcoming changes to the internal representation is going to affect the output.

@caspervonb
Copy link
Contributor Author

Closing this for now, will revisit later.

@caspervonb caspervonb closed this Jun 10, 2021
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

Successfully merging this pull request may close these issues.

Analyse Test Results?
2 participants