Reading this I should think it should be working out of the box using the right format ....
I have created an rspec custom formatter that generates the generic test data format for unit tests. But when I try to import it, is seems to get ignored, but parsed.
Which you can find here https://github.com/witjoh/rspec_sonar_formatter
From the logs :
09:37:01.125 DEBUG: Sensors : Generic Test Executions Report -> Puppet Squid Sensor -> SonarJavaXmlFileSensor -> Analyzer for "php.ini" files -> Zero Coverage Sensor -> CPD Block Indexer
09:37:01.125 INFO: Sensor Generic Test Executions Report
09:37:01.125 WARN: Property 'sonar.genericcoverage.unitTestReportPaths' is deprecated. Please use 'sonar.testExecutionReportPaths' instead.
09:37:01.125 INFO: Parsing /vagrant/playground/workflow/sonar_demo/puppetlabs-ntp/junit/reports_sonar.xml
09:37:01.184 INFO: Imported test execution data for 0 files
09:37:01.184 INFO: Test execution data ignored for 2 unknown files, including:
./spec/classes/contains_spec.rb
./spec/classes/ntp_spec.rb
09:37:01.184 INFO: Sensor Generic Test Executions Report (done) | time=59ms
Puppet code does have *.pp, and the test files have *spec.rb extensions ....
Could that be the reason the reports are ignored ?
And what do we need to do to connect the right test (_spec.rb) file to the right manifest (.pp) file ?
The docs about generic test data are really sparse .... for me ...
I'm really lost now, and if someone could put me on the right track to make this work, I will be very thankfull ...
Grts
Johan
(warning) Unlike for coverage reports, the files present in the report must be test file names, not source code files covered by tests.
Thanks for helpingStill no results ...Could the cause be thet puppet only parses *.pp files, and the test files are *.rb, sonarqube cannot match tests files against source files ?
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/8a93b706-4a00-41f0-8eb4-85f18a082625%40googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/hON5Z4dfWIA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
Nicolas Bontoux | SonarSource
Support Engineer
Hi Johan,Please make sure to keep the group included in your responses, that way the overall community can benefit from this discussion and related findings.I confirm that the test files must be mapped to a specific language analyzer, you'll notice in fact that with v6.7 the analysis currently fails with: Line 2 of report refers to a file with an unknown language: ./spec/classes/contains_spec.rbSounds like you need to follow-up with Puppet/Ruby Community Plugin maintainers to discuss how this could all play together.Best regards,Nicolas
On Thu, 8 Feb 2018 at 14:27 Johan De Wit <jozo...@gmail.com> wrote:
Thanks for helpingStill no results ...Could the cause be thet puppet only parses *.pp files, and the test files are *.rb, sonarqube cannot match tests files against source files ?
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/8a93b706-4a00-41f0-8eb4-85f18a082625%40googlegroups.com.
Ok, I will try to get in touch with them ... and keep this thread updated ..thanks
On Fri, Feb 9, 2018 at 1:08 PM, Nicolas Bontoux <nicolas...@sonarsource.com> wrote:
Hi Johan,Please make sure to keep the group included in your responses, that way the overall community can benefit from this discussion and related findings.I confirm that the test files must be mapped to a specific language analyzer, you'll notice in fact that with v6.7 the analysis currently fails with: Line 2 of report refers to a file with an unknown language: ./spec/classes/contains_spec.rbSounds like you need to follow-up with Puppet/Ruby Community Plugin maintainers to discuss how this could all play together.Best regards,Nicolas
On Thu, 8 Feb 2018 at 14:27 Johan De Wit <jozo...@gmail.com> wrote:
Thanks for helpingStill no results ...Could the cause be thet puppet only parses *.pp files, and the test files are *.rb, sonarqube cannot match tests files against source files ?
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/8a93b706-4a00-41f0-8eb4-85f18a082625%40googlegroups.com.