TeamCity and DotCover does not provide 'number of covered lines'
I have set up a teamcity build to run nunit tests (version 3.7.0 of NUnit) with code coverage. The code coverage tool is dotCover 2017.1.20170407.131846. That is the only one that works btw with NUnit.
Anyways, this works great. My unit tests execute and I get code coverage reports from this.
The problem is in my teamcity Failure Conditions settings.
I chose a failure condition of:
Fail build on metric change
with
Fail build if number of covered lines is less than X
It runs great, executes my tests with code coverage. No errors until the very end, when this fail condition executes. Then it spits out this warning:
Cannot calculate build metric 'number of covered lines' - no value
which results in my build passing (perhaps when it shouldn't...)
Please sign in to leave a comment.
Hi
Unfortunately dotCover is not publishing this statistics now. But you could use for instance `number of covered methods` or `percentage of statement coverage` instead