Current filter:
                                You should refresh the page.
                                  • The test runner, when running with coverage, should respect code marked with [ExcludeFromCodeCoverage] such that, regardless of the actual test coverage (if any), code marked with that attribute should appear fully covered.

                                    Currently I have a class under test where the whole class is marked with [ExcludeFromCodeCoverage]. i do have a couple of unit tests that run against the class but in general when looking at coverage reports I don't want that to appear as though it's not properly covered.

                                    When running these tests through the CodeRush for Roslyn test runner with coverage, that class currently appears as 44.44% covered, so my overall coverage (in this very small project) appears to be 67.53% covered rather than 100% covered.

                                    Even better might be some sort of visual differentiation to show that the uncovered bits are explicitly excluded (but the overall coverage percentage shouldn't be penalized for excluded code).

                                    Screen shot attached.

                                • Alex Eg (DevExpress) 01.15.2016

                                  Hi Travis,
                                  I totally agree that Code Coverage should provide the capability to exclude areas of code from analysis. We will introduce this feature in one of future releases.

                                1 Solution

                                Creation Date Importance Sort by


                                We have fixed this problem and will include it in an upcoming release. The final release date has not been set, but once it is published we will send you an automatic notification.
                                • Scott Huppert 02.10.2017

                                  If this was fixed a year ago is it ever going to get released?  I'm running CodeRush for Roslyn and it's not there.

                                • Alex Eg (DevExpress) 02.13.2017

                                  Hi Scott,
                                  I tried to reproduce the issue but failed - please take a look at the attached screencast:
                                  Could you send us a sample where the [ExcludeFromCodeCoverage] attribute is ignored by the Code Coverage feature?
                                  Thanks in advance.

                                • Scott Huppert 02.13.2017

                                  Hi Alex,

                                  Thanks for the quick response.  I ended up with 2 copies of my DataSet partial class in the project.  Once I located that the exclusion works as expected.


                                • Alex Eg (DevExpress) 02.13.2017

                                  You are welcome, Scott! I'm happy to hear that the feature works as expected.