Excluding calls originating from a specific function/binary. Is it possible? #1466
-
|
Some of the code we want to test needs quite some setup in the form of a created instance (mocking is not sufficient due to all the relations needed and checked. Mocking would mostly result in testing the mocks). We would like to include the coverage these tests generate. however This poses the following problem: The code used to generate the instances is also seen as coverage. I have (simplified) following setup: Projects:
I would like to measure the coverage in Would such be possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Isn't it possible for you to realize this with a filter expression on the |
Beta Was this translation helpful? Give feedback.
coverletinjects the tracker at sequence points in the IL which most of the time corresponds to line and column numbers.Maybe yes this could work to enable/disabled the tracker that collects the line/branch hits. But as @MarcoRossignoli already mentioned, we don't analyze the code flow. So we wouldn't really know if a line wasn't hit because it wasn't planned to be covered or because of a test not executing the code.