Test Impact Analysis

 
Test Impact Analysis is a new feature that will be part of Visual Studio Team System 2010 and it will enable developers to view which Tests are impacted by your latest code changes that are not checked in yet. I was struggling a bit to get it up-and-running but once you know the drill, it’s quite straightforward. The fact is that you need to have published test results by a Team Build on the previous stable situation.

How to set it up?

  • Create a new Team Build for your solution that also triggers your UnitTests and publishes the test results :
    1. Select Solution to Build and select your tests to run

    2. Enable Get Impacted Tests

    3. Enable Publish the Test Impact Data

  • Enable Code Coverage for appropriate assemblies

  • Queue a new build of the newly created Team Build
  • Change some code that would impact a Unit Test
  • Open the Test Impact View Window

  • See the results …

    This window reads as follows : 2 Unit Tests are impacted by my latest code changes that are not yet checked in. The AddTest Unit Test should be rerun because of changes made to the Add method.

I hope that this process will be simplified a bit more in the final release. If you don’t get it working immediately, check the Build log in search for Test Impact. Note that the Build log in TFS2010 has improved a lot! Maybe a topic for one of my next posts …

3 Responses to Test Impact Analysis

  1. This is a feature that i wished i had three years ago. Especially for timely end-to-end tests this can be a real time saver.

  2. […] probably already know I’m referring to the Test Impact Analysis Pieter talked about yesterday. Well, Pieter’s post reminded me of something we discussed […]

  3. Stijn Guillemyn says:

    Nice feature, but you know I wished for some more features in this area: http://stijnguillemyn.wordpress.com/2009/02/06/did-i-cause-these-tests-to-fail/

    A lot can be done in making unit tests more loved than hated/feared by many developers. I know for a fact that many developers still look at them as a burden and a real pain in the ass…

    I’d love to hear more ideas, wishes and dreams in this area, you never know they make it to the product some day if we make enough noise around them😀

    But this feature sure is a step in the good direction!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: