Error starting the test run: Build directory of the test run is not specified or does not exist.

In Microsoft Test and Lab Manager, the above error message is observed during the execution of an automated test run on a test controller. It can occur in either of the following conditions.

1. The account under which test controller is running does not have read permission on the build directory. (The build directory is same as the drop location of build associated with this test run.)

2. The build directory itself does not exist.

So to come out of this error, ensure that build directory exists and test controller service account has read permission on it.

Comments (10)
  1. Mario Servino SF/QA Manager says:

    I had the same problem after we disabled Netbios over TCP/IP on the Test Controller, the share on the Build Agent couldn't be accessed.

  2. Thanks Mario for sharing this. It should help the other users of microsoft test and lab manager.

  3. Techno says:

    I have tests continuously being run and all of a sudden I am seeing the same error message, what's going on?

    I did check bellow and came up with nothing:

    • Did the TFS server rebooted due to patch? No
    • Did the share changed? No

    • Did the build machine experienced network problem? Probably, hard to tell. Windows Event Viewer does not seem to indicate that something is up.

    • Did the controller rebooted? No

    • Did the agent reboot? No

    I find that MTM/coded UI/Agent/Controller and continuously running tests are not reliable. Anyone noticing this? Is this ready for prime time?

  4. Is it possible to access the build folder from test automation? says:

    I am writing setup automation where I want the unit tests to install the MSI based on what the test case requires and what data to verify after setup msi has completed. In the unit test, how can I access the build drop folder for that particular build to be able to copy down the binaries to the local machine?



  5. Manish,

    You can specify deployment items on your test case to inform the framework that about the set of files required to run the test.…/microsoft.visualstudio.testtools.unittesting.deploymentitemattribute(v=vs.100).aspx

    The framework copies these deployment items as well to the local machine along with the test binaries and its dependencies and they are be available in the working directory during the execution of the test. Please try it out and let me know if it does not work.


    Aseem Bansal

  6. ps_testware says:

    Hey Aseem,

    Our build team does not make use of the drop location when building, is there any way I can point the test controller to a different folder where the files are?

  7. Hello ps_testware,

    You can use the command-line tool, Tcm.exe, to specify the different folder.

    Tcm.exe run create /builddir:….


    Aseem Bansal

  8. Basant says:

    Hello Aseem,

    I am facing a the same issue in a specific situation.

    At my work network I am able to run the automated test from MTM without any issue. (proves I have proper rights).

    But when I connect to vpn and run the test from MTM  I get the errpr "The build directory of the test run either does not exist or access permission is required.".

    I checked with IT guys they says from VPN portal the required port 9191 is open and you should be able to connect. I am not sure what's going on here. however I can still queue the new build on VPN but just can't run my test.



  9. Hi Basant,

    9191 is the port on which build controller/agent listens. But since tests are executed by test controller/agent, opening of port 9191 is not useful.

    Can you please share whether test controller/agent is running on your machine or on the work network?


    Aseem Bansal

  10. Uday says:

    Make sure build path is accessible from Controller machine.

Comments are closed.

Skip to main content