-
Notifications
You must be signed in to change notification settings - Fork 161
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 a JSON Reporter #469
Add a JSON Reporter #469
Conversation
hmm, so @mark-davenport-fountain this isn't well documented as it is mostly for the developers of coverband, but I have also used it for tool integration in the past... There are two JSON endpoints
I think these would cover your use cases... to enable and display links to that data add this to your coverband config:
If these don't have the specific data you are after we could modify or add another endpoint... I am more likely to support an API than some of the recent requests to dump static reports... All of these 'extra' options that folks do a bit more of one off processing has in the past added a lot of maintenance burden and isn't frequently used. Take a look at the current endpoints and let me know if they meet your needs... Otherwise the code and pattern looks good, so I could cleanup and move all the JSON api endpoints more towards this style, if there is enough interest in using the JSON. |
I saw those to endpoints but they didn't meed my needs since they didn't have the data clearly laid out to consume. The enriched_debug_data has it a little closer, but I wanted to have an endpoint that made it clear and simple for how to use the data that is presented in JSON. For example:
Runtime relevant lines is easier to understand, and coverage also is her but still not clear how to tell what they mean.
I could probably use these endpoints if they add some good docs on how to make sense of the responses. |
OK, I think we can take your approach, could you resolve the conflict and ensure that it has all the data for your use cases... If so I am good with pulling this in, after it is merged, I will likely move over all the other json endpoints to follow some of these patterns. @mark-davenport-fountain let me know if you run into any issues. |
Sounds good. I 'll get this fixed up shortly. I as out on vacation last week. I'll let you know! |
67d0ae6
to
e7a7454
Compare
I've got this ready now. @danmayer please take a look, and may want to approve the workflow to run. |
@mark-davenport-fountain approved workflow run |
Looks like I missed running standardrb on one of my files. I've got that done now. Should be green on the next run. |
Just a small bump on this @danmayer. |
hmm still another standard error |
Alright - got that one too. I was running into some trouble with standardrb locally. I'm seeing this same scanning error locally as I'm seeing in CI, but I guess it's not causing any actual problems. Looks like to fix it you'd need to unlock and update standardrb. |
merged, thanks I will update the changes and get this in a RC release sometime soon |
Than you @danmayer |
ok so you can install coverband RC release 5.2.6.rc.4 to test out this functionality let me know if you have any issues @mark-davenport-fountain |
I'm proposing adding a JSON route and reporter. This can be used by systems to pull a structured view of the data and then can be easily processed.
I based this off of what was in the html file view.
In my use case I'd like to be able to hit this end point periodically and then store the results to process locally and give feedback during dev about usage of a file that's in production, but having this structured set available for systems to use could be valuable for other use cases as well.
Example output (truncated):