admin管理员组

文章数量:1379419

I am working with 2 C# solutions: A library project (DLL) that contains the core logic. An executor project (EXE) that runs the library by calling its methods.

I want to measure line-by-line code coverage for the library while it is being executed by the EXE. I want to do this because I want to figure out which lines are actually used for a given input. I would like to see coverage directly in Visual Studio (e.g., with covered lines in green and uncovered lines in red) as provided by the fine code coverage extension.

I installed Fine Code Coverage extension for visual studio and ran a unit test in the library solution that calles the exe.

var process = new Process { 
StartInfo = { 
   FileName = "Path\\to\\executor.exe" } 
   Arguments = "Path\\to\\libconfig.json"}; 
process.Start();)

When I execute the unit test the exe runs the libray but no line coverage appears in the library solution except for the units tests.

本文标签: