I have a project plan setup which contains some automated tests. The entire environment seems to be setup correctly, that is the controller is registered to the team project collection, and the agent is running interactively on the desktop of a client setup in labs.
Here is the problem I am facing. I have 100's of automated tests. If I run them 1 at a time they work just fine.
If I run 2 or more of them, they fail with the following exception on the 2nd test.
The control is not available or not valid.
Again if I run either test independently, they will both pass every time.
I'm guessing this has something to do with the state between the runs.
My test initialize looks like this:
[TestInitialize]
public void Init()
{
Playback.PlaybackSettings.WaitForReadyLevel = WaitForReadyLevel.AllThreads;
Playback.Wait(5000);
AppManager.EnsureMyAppIsRunning();
AppManager.SetTestEssentials();
}