在构建服务器上运行MSTest时出现问题 [英] Problem running MSTest on build server

查看:62
本文介绍了在构建服务器上运行MSTest时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的构建服务器上有一些失败的SqlException:

We have some integration tests that are failing on our build server with a SqlException:

测试方法MY.MATreX.EngineTests.GeneralItems.LookupTest.listIVRsTest引发了异常:


System.Exception:失败:  MY.MATreX.Engine.Lookup.listPrompt()--->
System.Data.SqlClient.SqlException:用户登录失败'MYDOMAIN \W2K8TFS2 $
'

Test method MY.MATreX.EngineTests.GeneralItems.LookupTest.listIVRsTest threw exception:
System.Exception: Failed:  MY.MATreX.Engine.Lookup.listPrompt() ---> System.Data.SqlClient.SqlException: Login failed for user 'MYDOMAIN\W2K8TFS2$'

失败的用户帐户是我们的名称TFS服务器机器(也恰好托管TFS构建服务),后缀为美元符号。 此用户帐户来自哪里?

The failing user account is the name of our TFS server machine (which also happens to be hosting the TFS build service), suffixed with the dollar sign.  Where is this user account coming from?

构建服务正在"网络服务"下运行。 。帐户 应用程序层在我们为TFS环境配置的服务帐户下运行。 我希望测试在同一帐户下运行。 

The build service is running under the "Network Service" account.  The Application tier is running under a service account we provisioned for the TFS environment.  I would prefer that the tests run under that same account. 

mstest在构建服务运行时使用的用户帐户是否可以控制?

Is the user account that mstest uses when run by the build service something we can control?

谢谢。

推荐答案

 

Team Build运行时,它在Build Service帐户下运行。

构建服务进程生成的每个其他进程将使用相同的帐户。

如果你想要mste st.exe在不同的帐户下运行,您需要更改Build Service帐户。

似乎正在发生的事情是"网络服务"帐户没有权限在SQL数据库上执行测试。

您需要在数据库中提供"网络服务"帐户权限,或者使用具有相应权限的其他帐户。


这篇关于在构建服务器上运行MSTest时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆