简体   繁体   English

无法在VS 2008上运行单元测试

[英]Cannot run Unit test on VS 2008

For learning Test Project in VS2008 I followed a tutorial and created a new simple winform application in c#. 为了学习VS2008中的测试项目,我遵循了一个教程,并使用c#创建了一个新的简单winform应用程序。

I created one class and added a test project with the default created test. 我创建了一个类,并使用创建的默认测试添加了一个测试项目。 When I run the test (right click > Run selection) it is "Pending" forever and after aborted it's result is "Not Executed". 当我运行测试(右键单击>运行选择)时,它永远是“待处理”,中止后结果是“未执行”。

The result details are: 结果详细信息是:

"Failed to queue test run 'user@user-PC 2014-03-03 13:00:02': Test run 'user@user-PC 2014-03-03 13:00:02' cannot be executed on controller user-PC. No agents are marked online to execute test run." “无法将测试运行'user @ user-PC 2014-03-03 13:00:02'排队:无法在控制器用户-上执行测试运行'user @ user-PC 2014-03-03 13:00:02' PC。没有代理程序标记为在线以执行测试运行。”

(user-PC is my PC name) (用户PC是我的PC名称)

Does anyone have any idea what I'm missing here? 有人知道我在这里缺少什么吗?

Please kill the process 请终止进程

VSPerfMon.exe

and try executing the unit test cases again. 然后尝试再次执行单元测试用例。

I finally found it here . 我终于在这里找到

The solution is very simple: just change PC name (by registry) to an Uppercase name. 解决方案非常简单:只需将PC名称(通过注册表)更改为大写名称即可。

Magic, but it solve the problem! 魔术,但是解决了问题!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM