-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SonarQube don't import unit test results anymore #78
Comments
This another reporter is compliance with Generic Coverage Plugin: |
the mentioned plugin isn't functional on my project; but imho it is a very good feature for this plugin to comply to the somewhat more strict XSD Schema so SonarQube is supported out-of-the-box with some settings |
Sorry, what is imho? Do you import test results from Karma execution to SonarQube using other tool? Which setting do you use? |
I also faced that issue when make integration with Sonar |
Hi, Is there any plan to support new Sonar format for reporting test result ? https://docs.sonarqube.org/display/PLUG/Generic+Test+Coverage Reporters out there supporting this new format are not actively maintained. It would be great if the karma team supports it ! Maybe a new plugin to keep backward compatibility with the old format ? Or an option in this plugin asking for format ? Best regards. |
Good question, whether to keep this plugin as-is and make a new one. @r0main Anyhow, on the surface, the new Sonar XSD (schema) would mean only changing a couple of strings in the index.js of this plugin. So if the "rules" themselves are as they were in the older schema, the change is quite small. (Does someone read XSD ? :) I'll take a shot at it. |
Code ready in PR 117, please try it out and report on findings. I have validated the new XML being produced by the pull request, against Sonar's XSD schema file. What I would really like to know is does the new XML satisfy a running SonarQube. Of course also very interested to see whether there's any other issue. Tried to keep everything already working in status quo, ie. not disturb old code. Two things for testing:
ii) place the new index.js from the pull request, blob below: |
Thank you @jpaulin very much for adding this support! I have done some testing and found a couple of open items: |
@bmorenc This is good feedback, big thanks. As the code in my PR was rather large, I see that definitely missed these - I had too narrow test coverage, kind of, and thus was only testing for the obvious "positive" cases of test results, ie: 1. test passes or 2. A test fails. |
Thanks @jpaulin for this! I noticed that the output has: SonarQube documentation says that this should be either absolute or relative path the the test file. Is this maybe something that is already being worked on or something that could be contributed with? |
The latest version of JavaScript Plugin (2.10) from SonarQube removes the ability to import unit test results using JUnit format, they recommend to use another plugin (Generic Coverage) that uses a different XSD Schema.
Anyone uses this feature? Do you have any solution for that?
It's related to #69
The text was updated successfully, but these errors were encountered: