CUITests录制和播放期间出错 [英] Errors during CUITests recording and playback

查看:90
本文介绍了CUITests录制和播放期间出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我开始使用CUIT I遇到一些错误。其中一些我解决但有些仍然坚持…


 


< strong style =""> 错误1:无法执行测试:


开始测试结果中返回的以下错误MSG没有执行启动


 


错误MSG:


错误调用测试类的初始化方法TESTS.BaseTest:System.Runtime.InteropServices.COMException:错误HRESULT E_FAIL已从
a调用返回到COM组件。


错误堆栈跟踪:


Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IRPFPlayback.SetSkipStepEventName(String skipStepEventName)


Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.InitPlayback()


Microsoft.VisualStudio.TestTools.UITesting.Playback.Initialize()


 


错误2:无屏幕记录


 


错误   08.08.2011 15:34:29 当显示受Office信息权限管理
(IRM)保护的内容时,无法创建视频录制。
首先关闭所有包含受IRM保护的内容的窗口,然后重试。    Video Recorder  PC-VSD-01


 


在没有此错误的情况下测试运行没有任何改变。我甚至不知道受IRM保护的内容是什么。


< p style ="margin:0cm 42.55pt 0pt">  


错误3:编码的UI测试生成器赢了’ t记录:


将光标放在编码的UI测试方法中并按CTRL + ^,CTRL + C启动记录器弹出错误消息框:


 


无法生成代码,因为源代码文件中的光标不在方法中。将光标放在您想要
的方法中插入生成的代码。


 


光标肯定在方法内!


我的工作是重启VS2010…

解决方案

第一期


不确定实际原因,还需要更多信息


有些疑问:


a。您是否已编写自动化库继承[TestClass]类型类而不是[CodedUITest]类型类


b。您的活动窗口是否被某些应用程序锁定/阻止以更高的凭据运行?


如果你能提供一些日志会更好。


 


第二期:


 视频录制在任何DRM窗口打开时都不会录制(例如任何受DRM保护的文档);您必须先关闭该窗口才能运行测试


 


第三期:


这是一个已知问题,我们正在解决它在我们将来的版本中。要解决方法,您应该在测试版中单击一次启动"编码的UI测试"构建器之前的文本


 


 


谢谢


Aditya


 


 


 


 


Since I started with CUIT I run into some errors. Some of them I solved but some still persist …

 

Error 1: Can not execute tests:

Starting tests the Following error MSGs returned in the result without the executon started

 

Error MSG:

Error calling Initialization method for test class TESTS.BaseTest: System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

Error Stack trace:

Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IRPFPlayback.SetSkipStepEventName(String skipStepEventName)

Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.InitPlayback()

Microsoft.VisualStudio.TestTools.UITesting.Playback.Initialize()

 

Error 2: No Screenrecording

After the test is finished I found this additionally to my test result without screen recording.

 

Error   08.08.2011 15:34:29  You cannot create a video recording when there is content displayed that is protected by Office Information Rights Management (IRM). First close any windows that contain IRM-protected content, then try again.    Video Recorder  PC-VSD-01

 

There is nothing changed to test runs without this error. Also I do not even know what the IRM-protected content could be.

 

Error 3: Coded UI Test Builder won’t record:

Putting my cursor in a Coded UI Test Method and hiting CTRL+^, CTRL+C to start the recorder a Error Message Box pops up:

 

The code could not be generated because the cursor in the source code file is not located within a method. Place the cursor in the method where you want to insert the generated code.

 

The cursor is definitely within a method!

My work around is restarting VS2010 …

解决方案

First Issue

Not sure about the actual reason, will need some more information there

Some doubts:

a. Have you written your automation libraries inheriting a [TestClass] type class not [CodedUITest] type class

b. Is your active window is locked / blocked by some application which is running with higher credentials ?

It will be better if you can provide  some logs.

 

Second issue:

 Video recording doesn't record when any DRM window is opened ( e.g. Any document which is DRM protected); You must close that window first before running your tests

 

Third Issue:

This is a known issue, and we are addressing it in our future releases. To workaround , you should click once inside the test context before launching the Coded UI Test builder

 

 

Thanks

Aditya

 

 

 

 


这篇关于CUITests录制和播放期间出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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