-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add json
format support (not via --jsonfile)
#312
Comments
Thank you for your interest in gotestsum! This is an interesting feature request. It should be relatively easy to implement by adding a new formatter here Lines 239 to 240 in f39e7fa
The formatter could simply Before accepting this feature, I'd like to better understand Does |
Thanks for reply! In this example the The main benefit of Let me know which direction you'd like to go. Thanks! |
I have created a PR (#313) just in case you'll decide this is something what should be added as a feature to the tool. |
This is great, thank you! I'm happy to add the Just yesterday I was looking at creating a github actions format (#315) that uses a similar syntax to group logs. I think it should be pretty easy to use the same approach for a buildkite format. I'd love to add those formats to avoid needing to pipe to another binary. Is there anywhere I can see your build output to get a better idea of what sections are collapsed? Or could you describe it in more detail? While working on the github actions format a few ideas came to mind:
Are either of these similar to what you have now? |
Thank you for implementing this feature! I've created #316 for tracking the new formats. I'd love your feedback on these formats! Either on this issue or the new one would be great. |
Posted short answer on #316. |
The
gotestsum
tool currently has--jsonfile
flag. But that does not work well when test suite is large and it is desired to pipe json output while tests are still running.Imagine we have a tool named
json2ci
to format test runs for CI system (e.g. Buildkite?). Withgo test
this would be simple as:With
gotestsum
it is possible to run following code:But the code above blocks reporting until
gotestsum
is done. It is a problem if it takes a while to run the test suite. It would be better to have this:Such feature would bring
gotestsum
closer togo test
in terms of drop-in replacement.Current approach is executing
gotestsum
in the background and parsing content viatail
:P.S. I would like to know if there is a need for such feature or if there are other ways how to achieve the goal. Also understand potential blockers. I would be happy to implement the feature if needed.
The text was updated successfully, but these errors were encountered: