Share via


How can I run VSTest.Console.exe without VS installed

Question

Monday, March 17, 2014 9:35 PM

Hi, I have a coded UI test project generated in Visual Studio 2013 Premium. Of course the output is a dll file. I want to use VSTest.Console.exe to run the test dll file on a machine which does NOT have any Visual Studio installed. Is there any SDK to be used for this kind of purpose? Thanks.

All replies (4)

Tuesday, March 18, 2014 8:44 AM ✅Answered | 1 vote

Hi,

Installing Visual Studio 2013 Test Agent(http://www.microsoft.com/en-in/download/details.aspx?id=40750)will install vstest.console.exe which you can find from %Program Files%\Microsoft Visual Studio 1.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow folder

After you install it, you can go to the cmd prompt and type the path of vstest.console.exe to get vstest.console.exe and then use it to run test.

Best regards,

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.


Wednesday, August 24, 2016 2:54 PM

It works as far TFS/MTM DataSource is not present on the test method. For me it fails on the method which tries to connect MTM DataSource with following error:-

Error details: Could not load file or assembly 'Microsoft.TeamFoundation.TestManagement.Controller, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I tried to put tfs credentials in vault but did not help.


Friday, September 30, 2016 8:19 AM

Hi,

And what about the license? Do i need a license for installing and running the VS2013 Test Agent on a different machine?

regards


Tuesday, November 8, 2016 10:47 PM

Hi,

I've installed Test Agent but when I try to run my tests, I get this error

"Class Initialization method MyTestSuite.ClassInit threw exception. System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object." at the following line:

        [ClassInitialize]
        public static void ClassInit(TestContext context)
        {
            baseUrl = context.Properties["webSiteUrl"].ToString();  <<<<<<<<
        }

Is it missing the TestContext? If so, how do I fix this?

Thanks in advance!