Team Foundation Server could not configure the test agent. Wait a few minutes, and then click 'Repair/Install Agents'. Alternatively, ...

Team Foundation Server could not configure the test agent. Wait a few minutes, and then click 'Repair/Install Agents'. Alternatively, use the Environment Viewer to connect to the machine and view any errors logged in the Event Viewer. Correct any errors, and then run the Test Agent Configuration tool manually on the machine.