一个.CS中的多个编码UI测试方法? [英] Multiple Coded UI Test Methods in one .CS?

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

问题描述

到目前为止,我为每个测试创建了一个单独的.cs文件,然后将它们分组为有序测试,以测试整个功能。我知道我可以停止记录并为每一步生成代码并将其放在一个.cs文件中。虽然我已经完成了这个,但是无论如何都需要
才能在另一个测试中使用这些单独的录音吗?

So far, I've created a singular .cs file for every test and then grouped them into ordered tests to test 1 piece of functionality as a whole. I know I can stop recording and generate code for each step and have it in one .cs file. Once I've done that though, is there anyway to use those individual recordings in another test?

 

 

public
class
OpenIE

{

public class OpenIE
{

 

 

public
OpenIE()

{}

public OpenIE()
{}

[

 

TestMethod ]

public
void
OpenBrowser()

{
这个 。UIMap.OpenIE8();

//要为此测试生成代码,请从快捷菜单中选择
" Generate Code for Coded UI Test"并选择其中一个菜单项。

//有关生成的
代码的详细信息,请参阅 http:// go.microsoft.com/fwlink/?LinkId=179463
$
}

TestMethod]
public void OpenBrowser()
{
this.UIMap.OpenIE8();
// To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items.
// For more information on generated code, see http://go.microsoft.com/fwlink/?LinkId=179463
}

 

 

例如...

我上面的测试工作完美,如果我想添加名为
的现有录音 这个 。UIMap.NavtoRiverURL();类NavToRiver中的
如何访问其他测试方法并将它们从1 .cs文件中一起运行?

For Example...
I have the test above working perfectly, if I wanted to add the existing recording named this.UIMap.NavtoRiverURL(); in the class NavToRiver how would access the other test method and run them together out of 1 .cs file?

 

推荐答案

您正在使用有序测试,因此您只需添加此项你想要的方法。

You are using ordered test, so you just need to add this method in place you want.

实际上,我不明白你的问题。请说清楚。

Actually, I don't understand your question. Pls make it clear.


这篇关于一个.CS中的多个编码UI测试方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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