As far as I know that the test case you run belongs to one spcific test plan, and every test plan accociates one specific .testsetting file. And at the same time, the test plan may associate one virtual environment. In order to run
the test case successfully, you should make sure that you have the avaliable test agents to fulfill the settings in the .testsetting file.
For example, you specfiy one test agent with the role "Desktop Client" in the .testsetting file. You also need to have one test agent with the role "Desktop Client" in the virtual environment as well. Otherwise, you will not get your tests run successfully.