简体   繁体   中英

How to merge two or more dotnet test code coverage files

I have a .Net solution with two dotnet core class libraries and its associated unit test projects in it.

When I run dotnet test **\\*.Tests.csproj --collect "Code Coverage" command then it generates separate .coveragexml files for each unit test project.

My requirement is to merge all the .coveragexml files into one single file and use that to get the total coverage matrix for a whole solution.

Is there any tool or script to achieve this?

Note:

如果不需要合并的结果仍然是 .coveragexml 格式,您可以使用 ReportGenerator ( https://github.com/danielpalme/ReportGenerator ) 作为合并工具。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM