I’m using TFS2008 – soon to move to TFS2010
I want run code coverage for as part of my nightly builds. Since it adds some overhead I don’t want it to run on my dev machine or as part of the CI build.
Is there a way to run code coverage only on my nightly builds?
The only way I’m aware is having two .testconfig files one for each build – and I’m wondering if anyone has tried doing that. If I choose this path how do I define while testconfig file to use locally?
Absolutely.
You can have different Build Definitions (one for CI & one for Nightly), and then simply set Code Coverage to the latter.
Separating the builds with different Definitions is in any case a good idea.
Each build has different targets/requirements anyway (what they do with WorkItems, what Tests they do, what DBs-WebApps they deploy, what they email to whom etc).