Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#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 Klumbumbus, 4 years ago

Component: CoreUnit tests

comment:2 by GerdP, 4 years ago

Ah, now I understand. Results probably depend on the possibly random negative ids. I guess I should change the test data to avoid that

comment:3 by GerdP, 4 years ago

Resolution: invalid
Status: newclosed

comment:4 by GerdP, 4 years ago

In 17224/josm:

see #19955: Confusing result from sonarcube coverage analyser

  • use positive ids for ways and nodes so that they are not replaced by unpredictable numbers

comment:5 by GerdP, 4 years ago

In 17225/josm:

see #19955: Confusing result from sonarcube coverage analyser

  • last change did not produce the wanted dataset

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.