locked
How to run MSTEST on remote VM during a CI Build? RRS feed

  • Question

  • We want to run tests during an automated build.

    The build and tests are driven by a script (think of it as a glorified batch file).  The build is run on a VM,  and when the build is done I want to deploy the bits to another VM (perhaps several) and execute the tests on the remote VM.  We are using Cruise Control .NET for the CI server (for now).  The tests are written using MSTEST within VS2008.

    What needs to be installed on the test VM in order to be able to remotely execute the tests? Does this require a full install of VS2008 (that would be a bad thing)? Is this supported without using test rigs (controllers and agents)? 

    FYI: The script can remotely execute a process via psexec.exe.  In essence, I want a test runner that I can control across machine boundaries.

    Thanx

    Thursday, August 6, 2009 2:05 PM

Answers

  • You will need to install VSTS Test Edition or VSTS Team Suite on the Test VMs. As you already pointed out, you can use psexec on the build VM to deploy your build and kick off tests in the test VMs.

    To publish test results, one will need to specify a team build number. Since you are using CC instead of TFS, you will need to find an alternative way to collect test results generated in each test VM.

    In TFS 2010, it will support deploying/running tests in VMs. See The Lab Management Product – An Overview  for more information.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, August 10, 2009 7:15 AM

All replies

  • You will need to install VSTS Test Edition or VSTS Team Suite on the Test VMs. As you already pointed out, you can use psexec on the build VM to deploy your build and kick off tests in the test VMs.

    To publish test results, one will need to specify a team build number. Since you are using CC instead of TFS, you will need to find an alternative way to collect test results generated in each test VM.

    In TFS 2010, it will support deploying/running tests in VMs. See The Lab Management Product – An Overview  for more information.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, August 10, 2009 7:15 AM
  • Hi, I'm trying to do the same thing.  Run MSTEST.EXE on a remote machine.

    If I run it locally, on the machine, either via command line, or calling it from within a powershell script, it works fine.

    If I run it remotely, I get the following error:

    Failed to queue test run 'xxxx': Failed to connect to an IPC Port: Access is denied.

    Where xxxx is the name of the test run.

    I get the same error message regardless of whether I run it remotely via command line and PsExec, or from Powershell, using remoting and Invoke-Command.

    The remote user is a domain account that exists on both machines. (each machine is in a different domain however... and the remote machines domain trusts the client machine domain, if that matters)

    Any ideas?
    • Edited by TFarrell Thursday, December 10, 2009 10:41 PM clarified error message
    Thursday, December 10, 2009 10:34 PM
  • Tfarell,

     

    Did you end you finding solution

    Monday, April 26, 2010 8:55 PM
  • I have done this using Jenkins which essentially runs a batch script calling mstest. The following walkthrough was the most helpful. Don't miss the part to add a testsettings file to your solution which defines a 'remote execution' role linking to the test controller.
    Walkthrough: Install Test Controller and Test Agents for Visual Studio Automated Tests

    Test agent connects to a test controller:
    How to: Set Up Your Test Agent to Run Tests that Interact with the Desktop

    Calling mstest on the command line:
    Run Coded UI Test using MSTest

    Some machines (windows server, xp, vista) require this update
    http://support.microsoft.com/kb/971513

    Friday, December 7, 2012 4:46 PM