gpt4 book ai didi

visual-studio-2010 - 在 TFS 2010 中以不同的身份运行测试

转载 作者:行者123 更新时间:2023-12-01 05:37:55 27 4
gpt4 key购买 nike

是否可以使用不同的身份在 TFS 2010 上运行测试?

正在测试的代码需要比当前帐户更高的权限(事件目录、文件系统操作)。
现在代码中有模拟,但我想摆脱它,因为调用网站将激活模拟。

谢谢 !
文森特

最佳答案

来自 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.



您还可以潜在地将这种行为转化为您的优势:在提升的帐户下运行 MSTest 代理,并分派(dispatch)您的测试运行以由该 MSTest 代理执行。要配置它,请阅读: Create Test Settings to Run Automated Tests from Visual Studio .这将允许你运行你的测试以在你想要的帐户下执行,而不必一直显式地模拟你的用户。

关于visual-studio-2010 - 在 TFS 2010 中以不同的身份运行测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7606831/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com