问题描述
不确定使用哪个特定论坛,因为它与VS 2013.3上的CodedUI有关,也没有"Visual Studio单元测试"也不是"VS2010和VS2012中的测试工具";似乎合适.所以我只使用一般论坛.如果有错,请重定向我.
我们的麻烦是,当前我们的测试主要是好的,但是我们有一台使用VS2013 Ultimate的计算机在导航控制树时似乎在内部Microsoft.VisualStudio.TestTools.UITest.Extension代码中失败.测试失败,并出现NullRef异常 在最基本的步骤上,例如WaitForControlReady()或[...].TryFind().
从我的角度来看,堆栈中最重要的部分是
StackTrace:
在System.Reflection.RuntimeAssembly._nLoad(AssemblyName文件名,字符串codeBase,证据AssemblySecurity,RuntimeAssembly locationHint,StackCrawlMark& amp; Mark,IntPtr pPrivHostBinder,布尔throwOnFileNotFound,布尔自省,布尔 hibitSecurityChecks)
在System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly处(字符串名称,CultureInfo文化,版本版本,布尔型throwOnFileNotFound,StackCrawlMark& stackMark)
在System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture,StackCrawlMark& stackMark)
在System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet处(CultureInfo文化,Dictionary`2 localResourceSets,布尔tryParents,布尔createIfNotExists,StackCrawlMark& stackMark)
在System.Resources.ResourceManager.InternalGetResourceSet处(CultureInfo requestCulture,布尔值createIfNotExists,布尔值tryParents,StackCrawlMark和stackMark)
在System.Resources.ResourceManager.InternalGetResourceSet处(CultureInfo文化,布尔型createIfNotExists,布尔型tryParents)
在System.Resources.ResourceManager.GetString(字符串名称,CultureInfo文化)
在Microsoft.VisualStudio.TestTools.UITest.Extension.Resources.Messages.get_ControlNotFoundWithQidOrCondition()
它更长,因此,如果您需要更多详细信息,请告诉我.
就在几分钟前,我在一个封闭的Connect项目中找到了这个确切的StackTrace,网址为https://connect.microsoft.com/VisualStudio/feedback/details/846439/ui-test-fails-with-nullreferenceexception-in- update-2-rc
但是,由于这是有关Update 2 RC的,并且已经关闭,所以我本以为Update 3 RTM不会发生这种情况.
任何想法在这里会出什么问题吗?可能是计算机本身还是Visual Studio安装程序,因为完全相同的代码不会在其他计算机上像这样失败,并且代码来自TFS存储库.
欢呼
Daniel
Hi,
not sure which specific forum to use as this is about CodedUI on VS 2013.3 and neither "Visual Studio Unit Testing" nor "Test tools in VS2010 and VS2012" seemed appropriate. So I just use the general forum. Please redirect me if wrong.
Our trouble is that currently our tests are mainly fine but we have one machine using VS2013 Ultimate that seems to fail in internal Microsoft.VisualStudio.TestTools.UITest.Extension code when navigating the control tree. The tests fail with a NullRef exception on the most basic steps like WaitForControlReady() or [...].TryFind().
From my perspective the most significant part of the stack is
StackTrace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at Microsoft.VisualStudio.TestTools.UITest.Extension.Resources.Messages.get_ControlNotFoundWithQidOrCondition()
It is longer, so let me know if you need more detail.
Just a couple of minutes ago I found this exact StackTrace in a closed Connect item at https://connect.microsoft.com/VisualStudio/feedback/details/846439/ui-test-fails-with-nullreferenceexception-in-update-2-rc
But since this was about Update 2 RC and is closed I would have thought it should not happen with Update 3 RTM.
Any ideas what could go wrong here? It might as well be the machine itself or Visual Studio setup as the exact same code does not fail like this on other machines, with the code coming from a TFS repo.
Cheers
Daniel
这篇关于CodedUI测试基本失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!