Find all unit tests that call a method/property

Find all unit tests that call a method/property

I need to find all unit tests that use a particular method or property (directly or indirectly). How do I extract this information from a coverage report? Is this even possible?

Thanks in advance!


RE: Find all unit tests that call a method/property

Ananthb,

There are two ways to do this....either before coverage is run or afterwards in the NCover Explorer.

1) Before Coverage (BC): You can apply exclusion rules to attributes such as namespaces. Check out the profiling options available (in NCover Console and NCover Explorer) at http://docs.ncover.com/ref/3-0/ncover-console/command-line/profiling-options.

2) After Coverage (AC): Once coverage is done, you can right click on any method / namespace, etc that you don't want to see and exclude it. Additionally, in the display settings, you can exclude elements there as well.

I always find it's best to go with #1 since it requires less effort and will reduce the coverage process time.

Happy coding!

P.s., pardon the date puns. =)