Code coverage in the SetUp method of a SetUpFixture
Is it possible to enable code coverage in the [SetUp] method of the SetUpFixture? For some reason code called from the method is not being covered. The [TearDown] method is being covered.
The reason this is important because the application initialization happens in that method and covers a significant % of the code base.
Please sign in to leave a comment.
Hello Dmitry,
This method should be covered as well.
Could you please tell which unit testing framework (+version) are you using?
What are your dotCover and ReSharper versions?
We'll try to reproduce the issue.
I am using Resharper 5.1.1753.4 runner using the built-in NUnit 2.5.7 along with dotCover 1.0.120.2. The set up fixture looks like this:
}
The code in the [SetUp] method is highlighted in red. If I click "show covering tests" it says "Text fixture initialization and other auxilary methods is not included into the statistics."
Thanks
Hello Dmitry,
Thank you for the info.
We will investigate the issue.