Only Running Impacted Tests in a CI Build.

One of the key things about your CI build is to ensure that is runs fast so that you have a very quick feedback loop to see if you have a good build or not.  Rob Maher has an interesting blog post up describing how he customized the build process to make use of the test impact analysis feature so that only the impacted tests are run as part of the CI build and then the full test suite run later. 

If your tests take a long time to run, you may wish to only run the tests that have been impacted by code changes checked in with the build (and of course run a full nightly build that executes all tests :) Unfortunately there is no out of the box feature to do this, so we need to edit our build xaml to do it.

TFS 2010 Build - Only run impacted testsRobert Maher

In Rob’s example he uses a nightly build process to baseline the test impact analysis – however this might be a good candidate for a Rolling Build set to run once an hour or so (I personally prefer builds to run when there is someone still at work able to fix a build process should it break).  Anyway, it’s an interesting read not only for the idea but also as a good example of some of the key techniques when customizing a build in TFS 2010.


Creative Commons License
This blog is licensed under a Creative Commons License.