Friday, August 17, 2012 6:23 PM
I have enabled TIA in local.testsettings and also in the build definition. Now I am running the build but in each build it is running test, showing coverage results but impacted test is not showing up. It always says no tests were impacted whereas I am changing the code before kicking off new build.
I am not referring to MTM but referring to the build summary section where we get the description. Please find below the screenshot.
Monday, August 20, 2012 6:41 AMModerator
Thank you for your post.
What changes you have done with the code? Test impact analysis will analyze, in the background, the resulting assemblies produced by the build to look for meaningful changes to method instructions or data such as strings. This means that changes to comments or changes that are optimized away by the compiler are ignored by test impact analysis. So, if you make some change to test metod, anything information show put in build log impacted tests section?
For more information, you can refer to http://msdn.microsoft.com/en-us/library/ff576128.aspx
Lily Wu [MSFT]
MSDN Community Support | Feedback to us
Monday, August 20, 2012 5:54 PMIt is a good point. Since it is a POC for me, I did changes like changing a switch block to if block so the logic of program stay intact and also changed the number of parameters in the method to make sure it get caught on TIA. Do these changes seem ok to have some impacted test?
Tuesday, August 21, 2012 7:24 AM
Meaningful change in code is determined through IL Diff, Visual Studio looks into the baseline data to identify which tests call into the modified methods. The Test Impact engine updates its baseline as tests are successfully executed (to eliminate the possibility inaccurate Test Impact information). As such, it is important to create and maintain a comprehensive baseline.
Changed the number of parameters in the method is meaningful change, may be you can go to vs test forum for help.
Wednesday, August 22, 2012 9:54 PMOwnerI concur with Mini on the suggestion to visit the test forum. I doubt this is an issue specific to Team Foundation Service, which is our focus here. If you can build locally with TFS 2012 and get different results than what you're seeing via our hosted build (assuming you are using hosted build for this - it's not clear), then we would need to look more deeply at the TFService.
Trevor Hancock (Microsoft)
Please remember to "Mark As Answer" the replies that help.
Thursday, August 23, 2012 5:27 PM
Sorry for replying late.
Yes so this is what I did. I installed TFS locally and created the same scenario of code change to see if test impact is coming or not. And it worked on the initial build itself. So that uncovers the fact that in TFS preview some more setting might be needed or it could be an existing issue.