How to check which unit test has covered specific line of code in visual studio
e.g.
My solution has multiple class libraries.
I am analyzing code coverage for all tests from Test menu in VS.
For some methods, it is showing green, which means that code is covered in unit testing.
public void someclassMethod()
{
_service.Method();
}
I want to check unit tests for this _service.Method() (which is marked as green means covered code)
Is there any way to find out which code is covered in which unit test project?
The CodeLens feature shows the method that tests the related method.
e.g. : SS
I use VS Enterprise 2019 but Community Edition included CodeLens features. CodeLens features - VS 2022 Community Edition
To activate it you need to: