locked
Running Coded UI Tests without Visual Studio Installed RRS feed

  • Question

  • I am coding my tests on a system with Visual Studio Enterprise 2015 and they work fine from within VS, MSTest.exe and vstest.console.exe. However, when I install the test agents (2015) on a devices and attempt to run vstest.console.exe, I see the following error:

    Error Message:
       Unit Test Adapter threw exception:
    The following package failed to load: PublicAssemblies\Microsoft.VisualStudio.TestTools.WindowsStore.UITesting.dll.
    Could not load file or assembly 'file:///C:\Users\jasonter\TestResults\jasonter_JASONTERREL6563 2016-01-29 21_16_22\Out\PublicAssemblies\Microsoft.VisualStudio.TestTools.WindowsStore.UITesting.dll' or one of its dependencies. The system cannot find the file specified..

    I tried simply copying that dll to the device, but no luck.

    How can I run these tests without having to install all of visual studio on every target device?

    Thanks


    Saturday, January 30, 2016 5:24 AM

Answers

  • Hi sologigolos,

    >>However, when I install the test agents (2015) on a devices and attempt to run vstest.console.exe, I see the following error...

    Maybe I misunderstood this issue.

    You mean that you just install the test agent in the remote machine A, but you want to run the test locally using the command line in this machine A without VS IDE, am I right? 

    I install the test agent 2015 in a clean machine, I could get the dll file here:

    Like the documents here:

    http://blogs.msdn.com/b/anutthara/archive/2009/12/16/running-tests-in-mstest-without-installing-the-vs-ide.aspx

    http://blogs.msdn.com/b/gautamg/archive/2011/02/25/faq-running-coded-ui-test-on-a-machine-without-vs.aspx

    You can choose to run mstest.exe from either the test agent or the build agent to run tests, but note that you can run only the unit test and ordered test types.

    So I think we would think about using the tool MSTest.exe and the real test type it supports.

    Maybe you could test it using the MSTest, if still no help, please tell me the detailed steps in command line you using, I will test it in my side.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 2, 2016 8:48 AM

All replies

  • Hi sologigolos,

    As far as I know the Windows Store app has his own coded UI test project teamplate which was different from the general coded UI test project teamplate.

    (1) What is your test agent machine? Whether it supports the specific store app tyep?

    (2) I think we have to check that whether the test agent includes the specific dll files in default, if not, I'm afraid that we have to register/copy all dll files manually in the agent machine.

    >>I tried simply copying that dll to the device, but no luck. 

    Or you could check all dll files in your previous test project, and then copy all references dll files to the test agent machine, maybe it is another dependencies dll file of this dll(Microsoft.VisualStudio.TestTools.WindowsStore.UITesting.dll).

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, February 1, 2016 4:54 PM
  • Hi Jack,

    Correct, there is a separate template for the Windows Store coded ui test development.

    1 - All machines are Windows 10 and can run the same tests from vstest after installing VS.

    2 - How can I properly install and register the dlls? I copied the whole PublicAssemblies and PrivateAssemblies, but this did not fix it.

    Thanks

    Monday, February 1, 2016 11:01 PM
  • Hi sologigolos,

    >>However, when I install the test agents (2015) on a devices and attempt to run vstest.console.exe, I see the following error...

    Maybe I misunderstood this issue.

    You mean that you just install the test agent in the remote machine A, but you want to run the test locally using the command line in this machine A without VS IDE, am I right? 

    I install the test agent 2015 in a clean machine, I could get the dll file here:

    Like the documents here:

    http://blogs.msdn.com/b/anutthara/archive/2009/12/16/running-tests-in-mstest-without-installing-the-vs-ide.aspx

    http://blogs.msdn.com/b/gautamg/archive/2011/02/25/faq-running-coded-ui-test-on-a-machine-without-vs.aspx

    You can choose to run mstest.exe from either the test agent or the build agent to run tests, but note that you can run only the unit test and ordered test types.

    So I think we would think about using the tool MSTest.exe and the real test type it supports.

    Maybe you could test it using the MSTest, if still no help, please tell me the detailed steps in command line you using, I will test it in my side.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 2, 2016 8:48 AM