codeD UI测试与多个UIMap.Designer.cs? [英] Coded UI Testing with more than one UIMap.Designer.cs?

查看:820
本文介绍了codeD UI测试与多个UIMap.Designer.cs?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始与codeD UI测试。到目前为止好,但我对文件UIMap.uitest的一个问题。由于我要创建许多测试场景,意味着许多CS文件。更多的文件我也有,越大UIMap.uitest是,因为它使再生code所有的时间。我的问题是,它可能有/创建每个UIMap.uitest为每个CS文件,分别?
我使用VS2010。

I started with Coded UI Tests. So far so good, but I have one concern about the file UIMap.uitest. Since I have to create many test scenarios, means many cs files. The more files I have, the bigger the UIMap.uitest is, because it keeps regenerating the code all the time. My question is that it's possible to have/create each UIMap.uitest for each cs file, respectively? I am using VS2010.

感谢

推荐答案

是的。寻找的多个UI映射的信息。一般的方法是用鼠标右键单击在解决方案资源管理器中,添加一个新的项目即是一个codeD UI测试图(添加=>新项目=>的Visual C#项目(或可能VB)=>测试=> codeD UI测试图)。命名地图,然后点击确定后正常codeD UI对话应该允许出现新的项目记录和生成。有人建议建立在Solution Explorer中的文件夹包含所有UI地图。记录和产生$ C $℃后,所生成的方法的调用将需要手动添加到试验方法。此外,这些新的UI地图将需要被实例化。这个微软博客有一些细节http://blogs.msdn.com/b/anutthara/archive/2010/02/10/walkthrough-using-multiple-$c$cd-ui-maps-in-test-automation.aspx

Yes. Look for information on "multiple ui maps". The general approach is to right-click in solution explorer, add a new item that is a "Coded UI test map" (Add => New item => Visual C# items (or possibly VB) => Test => Coded UI test map). After naming the map and clicking OK the normal Coded UI dialogues should appear allowing recording and generating of new items. Some people recommend creating a folder in solution explorer to contain all the UI maps. After recording and generating code, calls of the generated methods will need to be added manually to the test methods. Additionally, these new UI maps will need to be instantiated. This Microsoft blog has some more details http://blogs.msdn.com/b/anutthara/archive/2010/02/10/walkthrough-using-multiple-coded-ui-maps-in-test-automation.aspx

在使用多个UI映射不要在源文件中未右击并选择生成code为codeD UI测试。如果你做那么code将被添加到默认的UImap.uitest的文件,如果需要的话,并没有警告,它是这样产生的。 (参见<一个href=\"http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3378897-choosing-the-uimap-when-recording-tests\">http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3378897-choosing-the-uimap-when-recording-tests )

When using multiple UI maps DO NOT right click in the source files and select the "Generate code for Coded UI test". If you do then the code will be added to the default "UImap.uitest" file, creating one if needed and with no warning that it is doing so. (See also http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3378897-choosing-the-uimap-when-recording-tests )

我还没有发现移动从一个UI映射文件到另一个项目,除了通过编辑XML源的任何方式,并且是复杂的。

I have not found any way of moving items from one UI map file to another except by editing their XML sources and that is complicated.

这篇关于codeD UI测试与多个UIMap.Designer.cs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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