Fixing: Error in Release Management when using "MTM Automated Tests Manager" – build name restriction

If you want to run an automated test as part of your deployment "MTM Automated Tests Manager" tool as described here: Make sure that your build name does NOT contain any spaces. Due to a bug/limitation in the powershell script used by Release Management this will fail if your build name contains any spaces.

Comments (3)

  1. Mehdi says:

    Hi Michael,

    Thanks for the heads up…It was not my case.

    However, when running the "MTM Automated Tests Manager", I consistently get the following error:

    Error is: "A Visual Studio testing sku must be installed to use this command."

    Basically from what I see (debugging little bit) TcmExec.ps1 gets executed in the deploy machine (where the deployment agent is – In the same Domain as the release management server machine-), and at some point it gets to the following line:

    C:Program Files (x86)Microsoft Visual Studio 12.0Common7IDETCM.exe run /export /id:23 /collection:xxxxxxx /teamproject:yyyyy

    That's the line which triggers the error mentioned above. I have installed + license key the Visual Studio Test professional in the deploy machine as the message seems to be hinting. But it did not make any difference? Any idea? (the other option of TCM.exe such as plans, configs, suites, etc…work fine…but not the run option?!)

    Apart from this problem, I still have one confusion: isn't it this command suppose to run in the Test environment ? (i.e: The environment corresponding to the name entered in the 'TestEnvironment' variable in the 'MTM Automated Tests Manager' component….which suppose to be the environment setup from the Lab Management with a lab agent running in it. In my case that's a 3rd machine: I have got the Release Management Server machine + the deploy machine + the Test Environment machine (which says Ready in Lab Management). My understanding is that the deployment occurs in the deploy machine and the tests will run in this test environment machine, am I correct? But if it's the case, this machine will also need Visual Studio Test installed or else it won't have the TCM.exe?. confused.


  2. Michael Bach Pedersen says:

    Hi Mehdi,

    Yes this command should be executed by the test agent running on the Test Environment machine and on this machine you need to install VS. Perhaps you can share the deployment workflow that you are using? Also consider which user you have used when installing VS Test Professional vs. the user used when executing the test using the deployment agent…

  3. John Hoffman says:

    Hi Michael,

    We are struggling to get an MTM test to run within ReleaseManagement and are pretty sure its due to white space in our $(TeamProject) name. We used the meta data variable,  hardcoded it and tried putting double quotes around it. No luck. We consistently get an error connecting to the tfs server.

    Creating test run …

    TF31002: Unable to connect to this Team Foundation Server:

    I omitted our server name.

    Do you know if there are any know issues with this?

    Can we resolve this issue by modifying the powershell script?

    Our other option is to rename our project. We are extremely leery about this option. We expect sharepoint issues.

Skip to main content