编码的UI测试在本地虚拟机中成功执行,但在测试环境中执行时发生错误 [英] Coded UI Test executed sucessfully in local virtual machine but error occured while executing in Test Environment

查看:102
本文介绍了编码的UI测试在本地虚拟机中成功执行,但在测试环境中执行时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用VS2010创建了自定义自动化测试脚本(编码UI测试),它在我的本地虚拟机中工作正常但是当我尝试在测试环境中执行这些测试脚本时,它会输出错误,指出COMException错误测试环境的事件日志
日志名称:应用程序来源:VSTTExecution日期:12/6/2010 3:51:40 AM事件ID:0任务类别:无级别:错误关键词:经典用户:N / A计算机:计算机名称描述:事件描述无法找到来自源VSTTExecution的ID 0。
引发此事件的组件未安装在本地计算机上或安装已损坏。您可以在本地计算机上安装或修复该组件。如果事件源自另一台计算机,则显示信息必须与事件一起保存
。事件中包含以下信息:(devenv.exe,PID 2232,Thread 42)OutOfProcessStrategy.ProcessMonitorThread:代理进程意外关闭;将尝试重新启动消息资源,但在字符串/消息表中找不到消息
事件Xml:<事件xmlns =" http://schemas.microsoft.com/win/2004/08 /活动/事件"> <系统> < Provider Name =" VSTTExecution" /> < EventID Qualifiers =" 0"> 0< / EventID> <等级大于2< /平> <任务大于0< /任务> <关键词> 0x80000000000000< /关键词>
< TimeCreated SystemTime =" 2010-12-06T11:51:40.000000000Z" /> < EventRecordID> 4687< / EventRecordID> <渠道>用途< /渠道> <计算机与GT;< /计算机与GT; <安全/> < /系统> < EVENTDATA> < Data>(devenv.exe,PID 2232,Thread 42)OutOfProcessStrategy.ProcessMonitorThread:
代理进程意外关闭;将尝试重新启动< / Data> < / EVENTDATA> < / Event>

I have created Custom automated Test script (Coded UI Test ) using VS2010 it work fine in my local Virtual Machine but when i tried to execute those Test Scripts in Test Environment it encountred error stating COMException error Eventlog of Test Environment Log Name: Application Source: VSTTExecution Date: 12/6/2010 3:51:40 AM Event ID: 0 Task Category: None Level: Error Keywords: Classic User: N/A Computer: Compter name Description: The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: (devenv.exe, PID 2232, Thread 42) OutOfProcessStrategy.ProcessMonitorThread: Agent process was shut down unexpectedly; will attempt to restart the message resource is present but the message is not found in the string/message table Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="VSTTExecution" /> <EventID Qualifiers="0">0</EventID> <Level>2</Level> <Task>0</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2010-12-06T11:51:40.000000000Z" /> <EventRecordID>4687</EventRecordID> <Channel>Application</Channel> <Computer></Computer> <Security /> </System> <EventData> <Data>(devenv.exe, PID 2232, Thread 42) OutOfProcessStrategy.ProcessMonitorThread: Agent process was shut down unexpectedly; will attempt to restart</Data> </EventData> </Event>

推荐答案

错误堆栈Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId,Object&pvarResKeys,Int32 cResKeys,Int32 nMaxDepth)Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String
queryId,Int32 depth,Boolean singleQueryId,Boolean throwException)Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId,Int32 Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String
queryId,Int32 maxDepth,Int32&timeLeft)Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex,IPlaybackContext context)Microsoft.VisualStudio.TestTools .UITesting.Playback.MapAndThrowComException(COMException innerException,
IPlaybackContext context)Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException e xception,IPlaybackContext context)Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception,String
queryId)Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId,Int32 maxDepth,Int32&timeLeft)Microsoft。 VisualStudio.TestTools.UITesting.SearchHelper.GetUITestControlRecursive(Boolean useCache,Boolean alwaysSearch,
ISearchArgument searchArg,IList`1 windowTitles,Int32&timeLeft)Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache,ISearchArgument searchArg)Microsoft .VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument
searchArg)Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find()Microsoft.VisualStudio.TestTools。 UITesting.UITestControl.GetProperty(String propertyName)Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlControl.get_InnerText()
C:\ Users \ ccoles \Desktop \CWS中的CWS.CWS.TC0_ValidLogging()Scripts\CWS \CWS \CWS \CWS.cs:第49行
Error Stack Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth) Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String queryId, Int32 depth, Boolean singleQueryId, Boolean throwException) Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId, Int32 depth) Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft) Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context) Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context) Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context) Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String queryId) Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft) Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetUITestControlRecursive(Boolean useCache, Boolean alwaysSearch, ISearchArgument searchArg, IList`1 windowTitles, Int32& timeLeft) Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg) Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg) Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal() Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find() Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName) Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlControl.get_InnerText() CWS.CWS.TC0_ValidLogging() in C:\Users\ccoles\Desktop\CWS Scripts\CWS\CWS\CWS\CWS.cs: line 49


这篇关于编码的UI测试在本地虚拟机中成功执行,但在测试环境中执行时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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