CodedUITest UIMapDesigner.vb不保留所做的更改! [英] CodedUITest UIMapDesigner.vb does not retain changes made !
问题描述
我正在使用vs 2010 beta 2 ultimate来创建编码ui测试。
我记录了一个测试并对UIMap.Designer.vb文件进行了更改以参数化我自己的数据从编码的UI测试文件传递。
这是一个示例
Dim username As String = TestContext.DataRow(" LDAP")
Dim serialno As String = TestContext.DataRow(" SERIALNO")
Dim filecode As String = TestContext.DataRow(" FILECODE")
Me.UIMap.CreateNewEquipment(username,serialno,filecode)
我在UIMapDesigner.vb中收到它像 -
Public Sub CreateNewEquipment(ByVal username As String,ByVal serialno As String,ByVal filecode As String)
然后我对文本文件等进行必要的更改以使用传递的参数值。
我保存/构建并执行。
测试运行完美。
当我现在记录另一个测试(功能)并回到UIMap.Design时出现问题。 er.vb.
我发现我所做的所有更改都被删除并恢复到默认状态,就像我开始编辑之前一样!!!
如何保存更改通过添加新的编码ui测试,它们不会被覆盖?
谢谢
++ SG ++
Saurabh,
不应更改UIMap.Designer.vb。您所做的任何自定义都应该在UIMap.vb中。
在上面的示例中,数据驱动可以直接在CodedUITest.vb中完成。
请参阅MSDN中记录的示例http://msdn.microsoft.com/en-us/library/ee624082(VS.100)。 aspx
我们自动参数化Recorded方法中的所有常量,您可以在名为< Recorded method name> Params的类中从Coded UI Test访问它们。
/>马修。
Hi,
I am using vs 2010 beta 2 ultimate for creating coded ui tests.
I recorded a test and made changes to the UIMap.Designer.vb file to parameterize my own data which is passed from the coded UI test file.
Here is an example
Dim username As String = TestContext.DataRow("LDAP")
Dim serialno As String = TestContext.DataRow("SERIALNO")
Dim filecode As String = TestContext.DataRow("FILECODE")
Me.UIMap.CreateNewEquipment(username, serialno, filecode)
I receive it in UIMapDesigner.vb like --
Public Sub CreateNewEquipment(ByVal username As String, ByVal serialno As String, ByVal filecode As String)
I then make the necessary changes for text fileds etc to use the passed param values.
I save/build and execute.
The tests run perfect.
The problem comes when I now record another test (functionality) and go back to the UIMap.Designer.vb.
I find that all the changes I had done are removed and back to default like before I started the editing!!!
How can i save the changes made so that they dont get overwritten by adding new coded ui tests?
Thanks
++SG++
Saurabh,
UIMap.Designer.vb should not be changed. Any customizations you make should be in UIMap.vb.
In your example above the data-driving can be done directly in CodedUITest.vb.
See an example documented in MSDN http://msdn.microsoft.com/en-us/library/ee624082(VS.100).aspx
We automatically parametrize all constants in a Recorded Method and you can access them from the Coded UI Test in a class named <Recorded method name>Params.
Mathew.
这篇关于CodedUITest UIMapDesigner.vb不保留所做的更改!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!