编码的UI测试-UI Map [英] Coded UI Tests -UI Map
问题描述
我正在使用Coded UI 用于测试自动化和使用VSTS 2010.
我需要一些澄清。
我录制了一个登录脚本,并且有一个UI Map.cs& UI Map Designer.cs与此文件关联。当我录制新的编码UI测试时,
它完全是在编写旧的Designer.cs文件。
我们是否需要创建一个新的"编码的UI测试图文件" 对于我们创建的每个测试?
我还需要一些关于断言的澄清
我记录并生成了测试生成器中的代码,如果我想再次插入断言点,我是否需要打开我的应用程序并创建断言?
添加断言后,我是否需要再次生成代码 或者这些断言是否会自动添加到已记录的文件
Srini
UIMap.Designer.cs是从UIMap.uitest(xml)生成的,每次录制新动作时都会重新生成/断言和您可能做出的任何更改都将被覆盖。建议将要更改的方法复制到UIMap.cs文件中的
部分UIMap类,并在那里进行必要的更改。
要添加断言,您可以看看这个博客:
http://blogs.msdn.com/mathew_aniyan/archive/2009/01/29/ui-control-locator.aspx
这些链接也很有用:
http ://blogs.msdn.com/b/mathew_aniyan/
http://blogs.msdn.com/b/mathew_aniyan/archive/2010/02/11/content-index -for-coded-ui-test.aspx
问候,
的Pankaj
I am working on Coded UI for Test Automation and using VSTS 2010.
I need some clarifications.
I recorded one Login Script and there is a UI Map.cs & UI Map Designer.cs associated with this file. When I recorded a new Coded UI Test,
it was over writing the old Designer.cs file . Do we need to create a new “Coded UI Test Map file” for each test that we create?
Also I need some clarification regarding the Assertions
I recorded and generated the code from the Test Builder and if I want to insert the assertion points again do I need to open my application and create Assertions?
After adding the assertions, Do I need to generate the code again or will these assertions automatically add to the already recorded file
Srini
Hi,
The UIMap.Designer.cs is generated from the UIMap.uitest(xml) and it is regenerated every time you record a new action/assertion and any changes you might have made will be overwritten. It is advisable to copy the methods that you intend to change to the partial UIMap class in the UIMap.cs file and make the necessary changes there.
For adding assertions you can have a look at this blog:
http://blogs.msdn.com/mathew_aniyan/archive/2009/01/29/ui-control-locator.aspx
These links are also helpful:
http://blogs.msdn.com/b/mathew_aniyan/
http://blogs.msdn.com/b/mathew_aniyan/archive/2010/02/11/content-index-for-coded-ui-test.aspx
Regards,
Pankaj
这篇关于编码的UI测试-UI Map的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!