Whilst setting up a TFS 2012 Lab management environment for Coded UI testing we got the problem that none of the tests were running, in fact we could see no tests were even being passed to the agent in the lab
On the build report I clicked on the ‘View Test Results’ which loaded the result in Microsoft Test Manager (MTM)
and viewed the test run log, and we saw
The issue, it claimed, was that the build controller did not have rights to access the drop folder containing the assembly with the CodedUI. tests.
Initially i thought the issue was the test controller was running a ‘local service’, so I changed it to the domaintfsbuild account (which obviously has rights to the drops folder as it put the files there) but still got the same error. i was confused.
So I checked the event log on the build controller and found the following
The problem was my tfslab account, not the local service or tfsbuild one. So the message shown in the build report was just confusing, mentioning the wrong user. The lab account is the one configured in the test controller (yes you have to asked how had I missed that when I had been into the same tools to change the user the test controller ran as!)
As soon as I granted this tfslab user rights to the drops folder all was OK