TFS2015 - Determine impacted tests during vNext bu

2019-09-19 02:54发布

问题:

We've got several thousand unit tests that run in one of our projects. These currently take over ten minutes to run, and I'm trying to reduce this time.

One of the things I'm looking at is determining which tests are impacted by the latest code changes and only run those impacted tests. This seems to be a feature that TFS has, but all of the tutorials are from TFS2010 and the old XAML builds and not for the new vNext builds in TFS2015.

Does anyone have any experience in getting this to work?

Following this tutorial: https://msdn.microsoft.com/en-us/library/ff576128(v=vs.100).aspx

I've defined a .testsettings file, and referenced it from a .runsettings file, and then in TFS2015 build I've set the .runsettings file as the Run Settings here:

But there doesn't seem to be any test impact files generated.

回答1:

Answer from Microsoft:

Hi Steve,

Thanks for your post.

I tested it in my TFS 2015 vNext build and received the same result.

It seems there’s no the Analysis test impact = True/False option in TFS 2015 vNext build Test task, this option is exist in XAML build definition.

For this scenario, please submit it to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio, Microsoft engineers will evaluate it seriously.

https://social.msdn.microsoft.com/Forums/en-US/610e304d-608e-49e9-8fcc-e65617828a6f/determine-impacted-tests-during-vnext-build?forum=tfsbuild