编码的ui [英] Coded ui

查看:97
本文介绍了编码的ui的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在数据源中添加数据行。如果我只想执行特定的数据行。如何在数据源属性中添加它。

How can i add Data row in Datasource .If i want to execute only a specific data row. how to add that in datasource attributes.

目前我们可以添加以下属性。

currently we are able to add the below attributes.

[DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase",TFS URL, Test case IDDataAccessMethod.Sequential), TestMethod,]

如何添加数据行。

推荐答案

嗨朋友,

欢迎来到MSDN论坛。

Welcome to MSDN forum.

根据该属性,您已从TFS添加了测试ID,要在代码中添加数据行,您可以将测试代码与以下内容类似:

According to the attribute, you've added test id from TFS, to add data row in your code, you could have test code to be similar to:

[DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", 
            "http://TFSServerName:8080/tfs/CollectionName;TeamProject", 
            "TestCaseId", DataAccessMethod.Sequential), TestMethod] 
        public void CodedUITestMethod1() 
        { 
            this.UIMap.EnterUserNameinuserNameeditBoxParams.UINameEditText = TestContext.DataRow["UserName"].ToString(); 
            this.UIMap.EnterUserNameinuserNameeditBox(); 
            this.UIMap.EnterDomainindomaineditBoxParams.UIEmailEditText = TestContext.DataRow["Domain"].ToString(); 
            this.UIMap.EnterDomainindomaineditBox(); 
        }

希望这会有所帮助。

祝你好运,

Fletch


这篇关于编码的ui的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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