Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Distributed MSTest actions



  • I am running an automated regression based on promoting a build to a new environment; in this case from Dev to QA. Our unit tests run fine as they are housed on the build server, but the distributed tests are causing an issue with integration of agents for both BuildMaster and TFS.

    We tried using the MStest action and pointing it to the test configuration file as well as the MSTest executable on both target machine and build server.

    Is there an accepted best practice for this with BuildMaster.



  • Please see the log file and the batch script that we use. We are getting an odd error and are unsure why we can call the batch locally on the target machine, but the build server can not.

    Batch file contents:

    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"

    call C:\Windows\System32\cmd.exe

    MSTest /testcontainer:AutomatedTestCases\bin\Release\AutomatedTestCases.dll /test:Forcast

    BM Log:
    Action 4: Execute C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Automatedtest\ExecuteAutomatedTest.bat in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC

    The system cannot find the path specified.

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>call C:\Windows\System32\cmd.exe

    'MSTest' is not recognized as an internal or external command,

    operable program or batch file.

    Microsoft Windows [Version 6.1.7600]

    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>MSTest /testcontainer:AutomatedTestCases\bin\Release\AutomatedTestCases.dll /test:Forcast

    Process Exit Code indicates error: 1 (0x00000001)



  • I'm not sure what you mean by distributed tests for MSTest, but pointing the MSTest Action at the configuration file is the way to go if you already have one.

    As for the batch file problem, what does your action configuration look like to try to run the .bat file? Is it set to run on the correct server? Does the account running BuildMaster have access to those paths? It's also possible that when you're running locally on the target server that you have the MSTest directory in your PATH but the BuildMaster account doesn't.

    That being said, is there a problem running the MSTest action as opposed to this batch file? It will be better integrated into the logs if you use that instead - the batch output will only give you stdout/stderr as opposed to an individual test breakdown.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation