in Uncategorized

Limitation with Team Build with respect to TestRunConfigs

I made a post to the Team Build forums about two weeks ago about the inability to use multiple .testrunconfig settings in a Team Build and, unfortunately, haven’t heard back from anyone on it yet. So I figured I’d post it here in case anyone else is stumbles across the limitation and is looking for help.

The problem lies in the way that you specify test lists and test configurations in a Team Build build type. While you can technically supply multiple test meta-data files per build type, you can only supply one test configuration for them all to run under. This stems from the fact that they chose to use a separate property, called RunConfigFile, to specify the testrunconfig file to use for the build type as opposed to making it a piece of meta-data for the MetaDataFile item. I’m somewhat baffled why they went this route, regardless of whether they wanted to support multiple test meta-data files, since they used item meta-data for everything else about it.

Why might you want to have two testrunconfigs? Well the main reason that I had was that I have some tests that need to be run under an ASP.NET host and others that only need to be run under the default host. I guess I technically could run the others under an ASP.NET host as well, but, aside from that not making sense logically, if my testrunconfig is shared across solutions then some of those solutions might not have a web project for the ASP.NET host to be configured with.

Anyway, I recommended a solution in the post that’s really simple to do: just modify the Microsoft.TeamFoundation.Build.targets file to pull the testrunconfig from the MetaDataFile item instead of a property. The only downside is that you need to make sure you do this on all machines where you’re planning on running builds.

Leave a comment