locked
MSTest standalone - executing tests without VS / MTM RRS feed

  • Question

  • Hi,

    I use sometimes MSTest to execute my CodedUI Tests (With agents + controller).
    This is especially comfortable when often executing the same tests.

     

    Now I want to start the tests from a Server using the MSTest.exe
    On the server there is no Visual Studio and I don’t want to install it there.
    Looking for a way to get MSTest working without the overhead of the whole VS I found some older posts/blogs on the internet.
    I see that I’m not the only one, how want to do that. There are some descriptions how and what hast to be copied.

    So these posts are all not very actual.
    So I’m asking if there is nowadays a better/proper solution for that,
    Maybe a installation pack for MSTest standalone.

    Tuesday, July 24, 2012 12:01 AM

Answers

  • Hi Eric,

    Sorry for my delay.

    The link was explaining the “normal” remote execution (in my understanding), also don’t understand what the team agent is.

    I think your opinion is correct, it means that we run the test with the Test Controller and Agent remotely, even though we don’t install the VS in the test agent machine, we would install it in another machine.

    I just have these two ways, if you didn’t have the Team build/TFS Environment, I don’t have a good idea. To help you resolve issue, you could submit this feature request: http://visualstudio.uservoice.com/forums/121579-visual-studio. The Visual Studio product team is listening to user voice there. You can send your ideas/suggestions there and people can vote. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, July 31, 2012 2:56 AM
    Moderator

All replies

  • Hi Eric,

    Thank you for posting in the MSDN forum.

    If you want to run your test without installing the VS, one way, you need the Visual Studio Team Agent to be installed on your test machine to run your tests. Another way, you can setup the build agent on a machine without VS installed.But we can run only the unit test and ordered test types. As my understanding, the coded UI test is a part of the unit tests.

    Reference:

    Running tests in mstest without installing the VS IDE.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    • Proposed as answer by Fabfella Thursday, July 26, 2012 8:52 PM
    Wednesday, July 25, 2012 8:25 AM
    Moderator
  • Thanks for your answer.
    But there is something unclear.

    For a better understanding my environment looks like this:

    http://www.img-teufel.de/img_setup50a76f1ejpg.jpg.html

    Some machines with the installed MS Test Agents. (A)
    One machine with installed MS Test Controller (B)

    Normally I connect my VS2010 to the test controller and start the tests. (C)
    So now I want to start the Tests from a other machine which has no VS. (D)
    I already tried to start the tests from my machine (C) with MSTest and it worked.
    Now I want to use MSTest on the machine (D), there is no Team Build/TFS.

    PS: The link to the "team agent" (?) in the blog post does not work.

    Wednesday, July 25, 2012 9:10 PM
  • Thanks for your answer.
    But there is something unclear.

    For a better understanding my environment looks like this:

    http://www.img-teufel.de/img_setup50a76f1ejpg.jpg.html

    Some machines with the installed MS Test Agents. (A)
    One machine with installed MS Test Controller (B)

    Normally I connect my VS2010 to the test controller and start the tests. (C)
    So now I want to start the Tests from a other machine which has no VS. (D)
    I already tried to start the tests from my machine (C) with MSTest and it worked.
    Now I want to use MSTest on the machine (D), there is no Team Build/TFS.

    PS: The link to the "team agent" (?) in the blog post does not work.

    Can you remote desktop to computer D and use the command prompt to start the test execuition. (a bat file is also good for this")

    or

    How can I run another application or batch file from my Visual C# .NET code?

    http://blogs.msdn.com/b/csharpfaq/archive/2004/06/01/146375.aspx

    or

    Here is a basic code snippet C#

    string filePath = @"\\v-nesing1\monitoring\try.bat";
     //v-nesing1 is the remote machine and monitoring is folder where a bat file is placed.
     // First check existance of file whether it exist on given path or not.
     if (File.Exists(filePath))
     {
     // Start a new process which open a command prompt 
    ProcessStartInfo processInfo = new ProcessStartInfo("CMD.Exe");
     // pass the .bat file path in arguments option with /c option which inforce only to execute .bat file process.
     processInfo.Arguments = "/c " + filePath;
     processInfo.UseShellExecute = false;
     // CreateNoWindow means you want to do work silently without opening cmd.exe
     processInfo.CreateNoWindow = true;
     Process.Start(processInfo);
     }
    

    • Proposed as answer by Fabfella Thursday, July 26, 2012 8:52 PM
    Wednesday, July 25, 2012 11:48 PM
  • Can you remote desktop to computer D and use the command prompt to start the test execuition. (a bat file is also good for this")

    Yes, batch would be fine (the best).

    From my point of view this is not the problem.
    The problem is starting the test run on computer (D).
    I was thinking about MSTest, but there is no installer for a stand alone MSTest. Istn't?

    Thursday, July 26, 2012 9:58 AM
  • Can you remote desktop to computer D and use the command prompt to start the test execuition. (a bat file is also good for this")

    Yes, batch would be fine (the best).

    From my point of view this is not the problem.
    The problem is starting the test run on computer (D).
    I was thinking about MSTest, but there is no installer for a stand alone MSTest. Istn't?

    Yeah the MSTest does not have a GUI, it is only a command prompt 'app'

    This is a great oppertunity for you to develop a free CodePlex app!

    Thursday, July 26, 2012 10:21 AM
  • Yeah the MSTest does not have a GUI, it is only a command prompt 'app'

    This is a great oppertunity for you to develop a free CodePlex app!

    Sorry, I think you don’t get the problem or I misunderstood you.
    I don’t need a GUI.

    I need MSTest installed on machine D, without VS/MTM.


    Thursday, July 26, 2012 1:56 PM
  • As Jack wrote, The Test Agent is the MSTest runner with the smallest installer footprint. 

    You can actually get MSTest to run without installing VS, but its not supported, a loot of work, and have way bigger footprint then the test agent.

    • Proposed as answer by Fabfella Thursday, July 26, 2012 8:52 PM
    Thursday, July 26, 2012 3:39 PM
  • Ok, I didn’t read from Jacks post, that the MS Test Agent also contains the MSTest.exe.

    The link was explaining the “normal” remote execution (in my understanding), also don’t understand what the team agent is.

    Test Agent is sill an overhead but not as much as VS for the  MSTest.

    Monday, July 30, 2012 1:01 PM
  • Hi Eric,

    Sorry for my delay.

    The link was explaining the “normal” remote execution (in my understanding), also don’t understand what the team agent is.

    I think your opinion is correct, it means that we run the test with the Test Controller and Agent remotely, even though we don’t install the VS in the test agent machine, we would install it in another machine.

    I just have these two ways, if you didn’t have the Team build/TFS Environment, I don’t have a good idea. To help you resolve issue, you could submit this feature request: http://visualstudio.uservoice.com/forums/121579-visual-studio. The Visual Studio product team is listening to user voice there. You can send your ideas/suggestions there and people can vote. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, July 31, 2012 2:56 AM
    Moderator