This is a migrated thread and some comments may be shown as answers.

MSTest

1 Answer 118 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arthur
Top achievements
Rank 1
Arthur asked on 02 Apr 2013, 10:22 PM
Hi,

I am currently writing tests in VS2012 Ultimate SP1 and Windows 8 Pro x64. UAC is at the lowest level. (I have not manually edited the registry to drop it to fully off {this borks Metro/ModernUI applications}).  My account is an administrator on the machine also.  All of the tests are purely code using MSTest for the unit test attributes.  If I have Visual Studio or a command prompt elevated as an administrator all of the tests execute fine.  If they are not then the browser will open and nothing happens.

If I use the standalone Test Studio and create a test via the GUI and launch it from there it will work.  I did not elevate the standalone TS when I did this so there must be some way to allow VS and CMD to execute the tests properly without being elevated. I read the entry http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/command-line-test-execution/mstest.aspx and watched the corresponding video but neither were helpful.  The screenshots are VS2010 specific and some features have been removed in VS2012. 

Is there anyway to run the tests without requiring admin elevation in Windows 8 with VS2012? Any help or suggestions would be appreciated.  Hopefully I am just doing something wrong or missing some setting and this isn't a limitation of TS.

Thanks

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 05 Apr 2013, 10:43 PM
Hello Arthur,

Is there anyway to run the tests without requiring admin elevation...

The short answer is no there isn't. This has always been true for running our tests in Visual Studio ever since Windows Vista was introduced. Now for the technical explanation: When you run our standalone Test Studio IDE, we have buried a special marker in the .exe file that Windows recognizes so that it will always run with administrator privileges. The Visual Studio .exe (devenv.exe) does not have this special marker. You have to "Run-as-administrator" to get the necessary admin level.

The reason we require this is the way we inject our hook into the IE browser requires admin level access. Anything less and Windows blocks our attempt as a potential security threat.

The easiest thing for you to do as a Visual Studio user is to configure Visual Studio to always run as administrator. This is a very easy configuration change to make.

Regards,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Arthur
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or