get dotCover results inside build
Hi, I need to get the percentage of code coverage inside the build after dotCover runs. I know I can get this data on the xml on .teamcity folder, but now I need it while the build is still running to use on another build step
I'm, using TC 2017.2.1
I've searched on the web but didn't find any response
how can I do this?
Thanks!
Please sign in to leave a comment.
Hi Renato,
it should be somewhat possible, although it might be a bit hard to find and use. The coverage report should be created as a report in disk after the tests with coverage are run, which means it should be possible to find it, parse it and gather the results.
Another, maybe easier option, could be to split the build in two. The first part runs the coverage, then publishes the report as an artifact. The second build picks up the artifact as a dependency, then performs whichever operations are required.
Hope this helps.
Hi Denis,
Thanks for the response
I prefer to use the first approach, I'm using runner type Nunit with dotCover enabled, I was able to get the file by specifying /Output on additional arguments, but it looks like TC does still try to look at other location to build the code coverage reports. See below
Nunit step