#19955 closed defect (invalid)
Confusing result from sonarcube coverage analyser
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Unit tests | Version: | |
Keywords: | Cc: |
Description
With r17222 I added a unit test which executes most of the routines in method fixError().
This routines wasn't covered by any unit test.
I waited until Jenkins job Sonar-JOSM finished and looked at the new (?) coverage data.
https://josm.openstreetmap.de/sonar/code?id=josm&selected=josm%3Asrc%2Forg%2Fopenstreetmap%2Fjosm%2Fdata%2Fvalidation%2Ftests%2FDuplicateWay.java
I see that some lines are covered now but not those for relations. When I execute the test in the debugger I see that those lines are executed.
When I look at the output for the jenkins job https://josm.openstreetmap.de/jenkins/job/Sonar-JOSM/4888/console I see that there are several ERROR messages, e.g.
ERROR: Unable to run check class org.sonar.java.filters.PostAnalysisIssueFilter - on file 'test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java', To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/
Could this be the reason?
Attachments (0)
Change History (5)
comment:1 by , 4 years ago
Component: | Core → Unit tests |
---|
comment:2 by , 4 years ago
comment:3 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Ah, now I understand. Results probably depend on the possibly random negative ids. I guess I should change the test data to avoid that