开发者

Run tests in TFS 2010 with a different identity

开发者 https://www.devze.com 2023-04-09 06:05 出处:网络
Is it possible to run the tests on T开发者_运维问答FS 2010 with a different identity ? The code being tested require higher privileges ( Active Directory, Filesystem manipulations) than the ones the

Is it possible to run the tests on T开发者_运维问答FS 2010 with a different identity ?

The code being tested require higher privileges ( Active Directory, Filesystem manipulations) than the ones the current account has. Right now there there is impersonation in the code but I want to get rid of it as the calling website will have the impersonation active.

Thanks ! Vincent


From the Test agent, Test Controller and MSTEST FAQ:

Will Test Agents allow you to impersonate another user? Or does the Test Agent always kick of tests as the user its configured start up as?

There is no built in support for impersonation, so by default tests run under the identity of the test agent. If this is something you really need, you could write a unit test extension that does the impersonation for you.

You can potentially also turn this behavior into your advantage: run an MSTest agent under an elevated account and dispatch your test runs to be executed by this MSTest agent. To configure this, please read: Create Test Settings to Run Automated Tests from Visual Studio. This will allow you to run your test to be executed under the account ofn desire, without having to explicitly impersonate your user all the time.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号