How to exclude auto properties from dotCover in TeamCity?
When running dotCover in the VS IDE there is an "Exclude auto-properties from coverage results" option.
When running dotCover from the command line there is a --HideAutoProperties option
However when using the JetBrains dotCover step in TeamCity, there is no equivalent option to exclude auto properties. I also tried adding --HideAutoProperties in the "Additional arguments" section for dotCover, but that didn't work either:
[JetBrains dotCover] Not used command line parameter: 'HideAutoProperties'
Is it not possible to exclude autoproperties when generating coverage reports in TeamCity? The inconsistency between what developers will see in their IDEs is annoying - nor do we want to have to write pointless get/set tests for all our DTO classes that have no business logic in those properties (hence them being auto).
Please sign in to leave a comment.
Pasting the response from the corresponding SR for anyone else having this question:
The
Not used command line parameter: 'HideAutoProperties'
warning is related to thedotcover.exe cover/merge/delete
commands, which don't have such an argument as--HideAutoProperties
. But the argument is also passed to thedotcover.exe report
command, which makes use of it.The issue is that TeamCity applies the argument to all dotcover.exe commands which is not correct. However, it doesn't cause any problems other than the message in the log. I've filed the bug regarding that: https://youtrack.jetbrains.com/issue/TW-74655
In the meantime, you can safely ignore the warnings in the logs. When you use
--HideAutoProperties
, the auto-properties are not included in the report.