-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Different results when rerunning CoverageReportParser
against same input files
#690
Comments
Can you share the coverage files you are using? You can send them privately via email: reportgenerator@palmmedia.de or share them here. |
Same for me. |
@AlexanderBartoshZ |
@danielpalme Thank you for quick reaction! Open the html report and check the difference - you expect none, but you get some: The coverage is collected using |
Thank you! Will have a look as soon as possible! |
@AlexanderBartoshZ One remaining problem is, that some classes appear twice in the report (e.g. I guess you are using Microsoft CodeCoverage, therefore nested classes appear differently in the Cobertura file (compared to tools like coverlet). |
Sorry for missing this @danielpalme . Not sure I'm allowed to share my files I'm afraid. That said, I do believe I have a variant of the the same duplicate classes issue you highlighted above, although my issue is happening specifically withe Merge. I've tested locally and #697 fixes my inconsistency. |
Thank you @danielpalme. As soon as there is a binary I can verify it with - Will gladly do that! With regards to #663 :
If there are enough arguments IMO the pressure for a change of https://github.com/microsoft/codecoverage can be built up. |
Microsoft does not want to change form |
Yes. Have read that ... |
If I re-run
CoverageReportParser.ParseFiles
against the same input coverage files, I'm getting different total line counts.I believe the problem is coming from some kind of concurrency race condition - after removing the parallelism from the following line, I start getting consistent results.
ReportGenerator/src/ReportGenerator.Core/Parser/CoberturaParser.cs
Line 135 in 4444f14
Digging further, I came across the following, and confirmed that my report files are ending up with multiple classes with the same name. When the earlier parallelism is enabled, these duplicates get added in different orders, meaning the
FirstOrDefault
can return different results if re-run against the same inputs.ReportGenerator/src/ReportGenerator.Core/Parser/Analysis/Assembly.cs
Line 180 in 4444f14
At this point I'm getting a bit lost in the weeds, but I have two theories for the root cause.
The first is that the
Equals
method forClassNameParserResult
compares bothName
andDisplayName
, meaning we get all unique PAIRS of Name and DisplayName - giving us opportunities for later duplicatesReportGenerator/src/ReportGenerator.Core/Parser/CoberturaParser.cs
Lines 122 to 128 in 4444f14
The other possible cause is a mismatch between the following bits of logic in filtering for elements for a given class:
ReportGenerator/src/ReportGenerator.Core/Parser/CoberturaParser.cs
Lines 122 to 128 in 4444f14
ReportGenerator/src/ReportGenerator.Core/Parser/CoberturaParser.cs
Lines 149 to 157 in 4444f14
ReportGenerator/src/ReportGenerator.Core/Parser/CoberturaParser.cs
Lines 190 to 198 in 4444f14
The text was updated successfully, but these errors were encountered: