Skip to content
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

Coverage file having complete build path in it for files causing issue while merging multiple coverage files together #197

Open
nidhipandya030 opened this issue Nov 15, 2023 · 1 comment

Comments

@nidhipandya030
Copy link

Hi Steve,

In our environment we are generating Cobertura coverage files using AltCover on multiple testing servers.

We have dotnet based service which builds on the automation servers having distinct paths and then those services are used by testing servers.

The service for which we are generating the coverage gives the complete path of file where it was build in coverage file. Please find the example of two server's having same file with different path in Cobertura coverage file for the respective servers.

Screenshot 2023-11-15 120939

Screenshot 2023-11-15 120839

When I am merging this two Cobertura coverage files, the issue is that there are two occurrences for the same file in the merged coverage file.

Source contains two entries for same package when combined. Ex. - ServiceSource\Service\VersionControl\AdapterComponents and others.
Screenshot 2023-11-15 120602

For the above stated scenario, is there any solution to get package path for file in-place of a complete build path in coverage file for the service being tested?

Also, if you can suggest a proper way or command to merge Cobertura coverage files is such a way that only one occurrence of file is there in merged file would be helpful.

Thanks!

@SteveGilham
Copy link
Owner

Getting back to this after other real life issues.

The underlying problem is the lossy cobertura format, which doesn't include any file fingerprint information that would give confidence as to two files of the same file name being the same file, rather than a build for a different platform or version of the code base. It has however recently occurred to me that it would be possible to make a synthetic file path that includes just the fingerprint information, which could be presented as an option instead of the real path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants