Every time I add the Typemock Isolator custom activity to a TFS 2010 build I learn something new that eases the process. In the past I have posted on the basic process to get the activity into your build, and I would also draw your attention to the ALM rangers guide to build customisation, which provides loads of useful information on this front.
Today, when I added the activity to a build I made the following improvements to the settings to make life a bit easier. This build is one used wildcard scanning for assemblies containing test with a test configuration file (this is the red usage in the documentation, it will make sense if you read the documentation)
So the changes over and above the usually configuration.
- In the project used to edit the build process workflow I added a reference to the Microsoft.TeamFoundation.Client assembly (found in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Client.dll)
- This meant I could replace the hard coded TPC Url property ProjectCollection on the ExternalTestRunner activity with BuildDetail.BuildServer.TeamProjectCollection.Uri.ToString()
- I noticed you have to explicitly set the build definition’s configuration and platform. If you only set the target solution and let these default the test results are not published. This I suppose is a bug in the activity, but not one I am rushing to look at as I would normally set these values
So for my usage of the custom activity the properties are
As you can see these are nicely generic now, no project based hardcoded values