Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2008 Visual Studio单元测试无法启动_Visual Studio 2008_Unit Testing - Fatal编程技术网

Visual studio 2008 Visual Studio单元测试无法启动

Visual studio 2008 Visual Studio单元测试无法启动,visual-studio-2008,unit-testing,Visual Studio 2008,Unit Testing,在Visual Studio 2008 Team Test中,在调试模式下启动测试时出现问题,出现以下错误: “未能将测试运行排队”{user@machinename}“:对象引用未设置为对象的实例。” 我在谷歌上搜索错误,但没有找到乐趣。我甚至不明白它的意思,因为它太简短了。有人见过这个吗 请注意,如果我没有调试,并且无论我运行的测试是什么,我都会得到相同的错误,那么我可以很好地运行测试 谢谢, 斯瓦蒂 预计到达时间: 作为VisualStudioTeamTest的新手,我不知道有比我看到的更

在Visual Studio 2008 Team Test中,在调试模式下启动测试时出现问题,出现以下错误:

“未能将测试运行排队”{user@machinename}“:对象引用未设置为对象的实例。”

我在谷歌上搜索错误,但没有找到乐趣。我甚至不明白它的意思,因为它太简短了。有人见过这个吗

请注意,如果我没有调试,并且无论我运行的测试是什么,我都会得到相同的错误,那么我可以很好地运行测试

谢谢,

斯瓦蒂

预计到达时间:

作为VisualStudioTeamTest的新手,我不知道有比我看到的更好的异常日志。不管怎样,这是:

<Exception>
System.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage.
ShowToolWindow [T](T&amp; toolWindow, String errorMessage, Boolean show)

at Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage.
OpenTestResultsToolWindow()

at Microsoft.VisualStudio.TestTools.TestCaseManagement.SolutionIntegrationManager.
DebugTarget(DebugInfo debugInfo, Boolean prepareEnvironment)

at Microsoft.VisualStudio.TestTools.TestManagement.DebugProcessLauncher.Launch(
String  exeFileName, String args, String workingDir, 
EventHandler processExitedHandler, Process&amp; process)

at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.StartProcess(
TestRun run)

at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.RestartProcess(
TestRun run)

at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.PrepareProcess(
TestRun run)

at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.
InitializeController(TestRun run)

at Microsoft.VisualStudio.TestTools.TestManagement.ControllerProxy.QueueTestRunWorker(
Object state)
</Exception>

System.NullReferenceException:对象引用未设置为对象的实例。
位于Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage。
ShowToolWindow[T](T&;toolWindow,字符串错误消息,布尔显示)
位于Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage。
OpenTestResultsToolWindow()
位于Microsoft.VisualStudio.TestTools.TestCaseManagement.SolutionIntegrationManager。
DebugTarget(DebugInfo-DebugInfo、Boolean prepareEnvironment)
位于Microsoft.VisualStudio.TestTools.TestManagement.DebugProcessLauncher.Launch(
字符串文件名、字符串参数、字符串工作目录、,
EventHandler processExitedHandler、流程和流程)
位于Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.StartProcess(
测试(运行)
位于Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.RestartProcess(
测试(运行)
位于Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.PrepareProcess(
测试(运行)
位于Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy。
InitializeControl(测试运行)
位于Microsoft.VisualStudio.TestTools.TestManagement.ControllerProxy.QueueTestRunWorker(
对象状态)

这是一个很长的机会,但我收到了一条类似的错误消息,结果是我的单元测试在configuration manager中被设置为目标“x86”

一旦我把它改为“任何CPU”的目标,一切都很好

您可以考虑查看您的单元测试项目设置为目标。

< P>您可能遇到使用VS 2008测试引擎时计算机名称中的小写字符引起的(已知)错误;有关它的一些信息,请参阅。我们花了几个星期的时间在我的一个项目上弄清楚了这一点,但在我能找到的任何地方的文档中都很难找到它

问题出现在VS测试引擎中,如果计算机名包含任何小写字母,则会出现此问题。测试引擎在运行时将计算机名转换为所有大写字母,这会导致内部字符串比较失败,并导致与您描述的内容类似的错误消息


您可能有或可能没有相同的问题,但如果您的计算机名有任何小写字母,请尝试将名称更改为全大写版本,然后查看发生了什么情况……

您可以发布异常的完整堆栈跟踪吗?此错误没有用。您需要检查TT的日志。我从未使用过TT,只通过TFS中的签入规则执行CI。每当我遇到此类错误时,我都可以查看构建日志以了解所有详细信息。不确定TT中类似的是什么。