I am trying to push a TFS build to a VM to run some Coded UI Tests. They run perfectly fine when I deploy them locally through the Visual Studio installed on the VM, but when I try to deploy them through TFS they fail.
The first test fails with: Initialization method Solution.Method.MyTestInitialize threw exception. Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException: The control is not available or not valid..
Then all proceeding tests fail with: Initialization method Solution.Method.MyTestInitialize threw exception. System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object..
They all fail when it gets to a Mouse.Click(UITestControl) point in the test.