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

Result reporter tool #555

Closed
jayvdb opened this issue Apr 17, 2018 · 19 comments · Fixed by #704
Closed

Result reporter tool #555

jayvdb opened this issue Apr 17, 2018 · 19 comments · Fixed by #704
Assignees

Comments

@jayvdb
Copy link
Member

jayvdb commented Apr 17, 2018

The coala json format provides a stable output.

There are other formats which are useful for reporting tests and failures.

Most commonly used is JUnit format. (which isnt really a specified format; see https://blog.ilias.xyz/unit-test-output-formats-a-state-of-affairs-5734b4c8e577)

Converting the static analysis results into a test results format has been done a few times, such as early PEP8 plugins to Jenkins. The mapping isnt exact, but the benefits of using the test result format is tight integration with various system.

CircleCI can accept this format: https://circleci.com/docs/2.0/collect-test-data/

AppVeyor can receive a test results XML format, in the format output by xunit, presumably the same as JUnit.
https://www.appveyor.com/docs/running-tests/#uploading-xml-test-results

The first project phase could involve converting the JSON to JUnit format and uploading into Circle CI and Appveyor.

The JUnit format should also be tested with a Jenkins install, to ensure it is uploading correctly there. This would mean our Jenkins project is much less important.

Another common format is TAP.

And there is Clover XML format.

Then there are some system, such as Phabricator, which have a custom format they expect.
c.f. facebook/infer#673

The above probably doesnt fill 3 months.

Pulling the coala results from CI using this format could be a way to inform newbies of the style problems with their PRs.

Another way to expand this project is to also push the unit test results as XML to the CI (using combination XML files if necessary)

@jayvdb
Copy link
Member Author

jayvdb commented Jun 19, 2018

@jayvdb
Copy link
Member Author

jayvdb commented Aug 10, 2018

There is also the LSP diagnostics format, which has been worked on at

https://github.com/coala/coala-vs-code/blob/6648e76/coala_langserver/diagnostic.py

@jayvdb
Copy link
Member Author

jayvdb commented Aug 10, 2018

We have a new repo for it https://gitlab.com/coala/coala-json

@srivama
Copy link
Contributor

srivama commented Jan 15, 2019

@jayvdb Is this project proposal explicitly for GSOC, or can we work and complete it outside of it?

@jayvdb
Copy link
Member Author

jayvdb commented Jan 31, 2019

See coala-bears> git grep -i json bears for bears using json formats, and look for similar strutures.

@jayvdb Is this project proposal explicitly for GSOC, or can we work and complete it outside

There is at least one projet in this, maybe two. And lots of little related bugs and improvements that are available for anyone to work on.

@li-boxuan li-boxuan changed the title JSON result reporter tool Result reporter tool Feb 1, 2019
li-boxuan added a commit to li-boxuan/projects that referenced this issue Feb 1, 2019
li-boxuan added a commit to li-boxuan/projects that referenced this issue Feb 1, 2019
@AkshJain99
Copy link
Member

do we need to develop plugins for each CI and each format mentioned in the project?

@KVGarg
Copy link
Contributor

KVGarg commented Mar 19, 2019

@jayvdb @li-boxuan Since CI tools will help us in reporting tests and failures, and in that case time factor plays a vital role so won't it be good if we add execution time for each section in the coala output results?

@AkshJain99
Copy link
Member

AkshJain99 commented Mar 19, 2019 via email

@li-boxuan
Copy link
Member

Since CI tools will help us in reporting tests and failures, and in that case time factor plays a vital role so won't it be good if we add execution time for each section in the coala output results

This sounds like a plan. You can also mention that in your proposal 👍

@chay2199
Copy link
Contributor

chay2199 commented Mar 20, 2019

Since CI tools will help us in reporting tests and failures, and in that case time factor plays a vital role so won't it be good if we add execution time for each section in the coala output results?

If we observe all the given test result formats carefully then we can find many such attributes that we can add to coala result and thus we can change our coala result probably the one last time before the final mapping to various test results.

@KVGarg
Copy link
Contributor

KVGarg commented Mar 20, 2019

Yes @chay2199 I've been already analyzing all such attributes that can help us.
Thanks for help 😇 👍

@KVGarg
Copy link
Contributor

KVGarg commented Mar 21, 2019

@li-boxuan test part of uploading results to CI tools is not to be integrated with the repository, right? that is, we need to just add documentation for developers on how can they upload the results to it, right?

@AkshJain99
Copy link
Member

@li-boxuan as we need to create tool which convert json to junit format but also there are existing tool present which can do so cant we integrate them only or make them only to support coala?

@li-boxuan
Copy link
Member

as we need to create tool which convert json to junit format but also there are existing tool present which can do so cant we integrate them only or make them only to support coala?

Be specific. Which tool? You can write down in your draft proposal with examples and why you believe they can solve our problem.

@AkshJain99
Copy link
Member

okay I am writing down that in my draft proposal and will submit for review today only or at max tomorrow
thanks :)

@Dhiraj240
Copy link
Member

Dhiraj240 commented Apr 2, 2019

@li-boxuan i used csv to json converter like this in my project.

Although this may sound silly do we need to use already available tools like this but its dependency is npm .Also which results are we talking about in phase 1 upload coala results into Circle CI and Appveyor is the the converted json results i.e Junit ? which will then reside in coala-json repo.

Also, jenkins xunit plugin can use xml check this
l found something https://github.com/EduardFazliev/rally_json2junit

Some information about this Rally is ageneric testing tool that automates and unifiesmulti-node OpenStack deployment, verification, testing &profiling.  It can be used as a basic tool for an OpenStack CI/CD systemthat would continuously improve its SLA,performance and stability.

But these may not serve the purpose i think we need to develop the tool our self using the above open sourced available tools.
do we need to create a new repositry in coala for this tool ?
I will making proposal on this project.

@AkshJain99
Copy link
Member

@Dhiraj240 r u going to submit the proposal for this idea?

@Dhiraj240
Copy link
Member

Yes.I am not getting gut feeling for my ANTLR idea as of now.

@li-boxuan
Copy link
Member

Although this may sound silly do we need to use already available tools like this but its dependency is npm

It's not a good idea. First, it's a node package instead of a python package. Second, it might be out of date. Third, it does not have tests. Last, it is not very complex, so why not write a python version?

Also which results are we talking about in phase 1 upload coala results into Circle CI and Appveyor is the the converted json results i.e Junit

Yes. Please also read #704 (review)

do we need to create a new repositry in coala for this tool?

This has been answered in #704

li-boxuan added a commit to li-boxuan/projects that referenced this issue May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

7 participants