启动“编码的UI测试生成器”;无需创建新的编码UI测试 [英] Launching the "Coded UI Test Builder" without creating a new Coded UI Test

查看:66
本文介绍了启动“编码的UI测试生成器”;无需创建新的编码UI测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio中的编码的UI测试生成器应用程序在手写编码的UI测试时非常有用。它有一个检查器类型的工具,该工具显示选定控件的属性,这使得搜索控件非常简单。

The Coded UI Test Builder application in Visual Studio is very useful when hand-writing Coded UI Tests. It has an 'inspector' type tool that shows properties for a selected control, which makes searching for the control very simple.

目前,我唯一能够这样做的方法是通过添加新的编码的UI测试向导来启动此工具。这样可以正常运行,但是

At the moment the only way I am able to launch this tool is by going through the 'add new Coded UI Test' wizard. This launches fine, however it


  • 创建一个新的空编码UI测试

  • 在我关闭时接下来在Visual Studio中运行测试或开始调试

有人在不添加新的编码UI测试的情况下提供有关如何启动该工具的建议吗?关于使用手写的编码UI测试检查控件的其他建议?我正在WPF中工作,如果有什么不同。

Has anyone advice on how to launch the tool without adding a new Coded UI Test? Any other suggestions around inspecting controls with a hand-written Coded UI Test? I'm working in WPF if it makes any difference.

推荐答案

使用类似这样的类,右键单击测试方法内部应该为您提供为编码的UI测试生成代码->使用编码的UI测试生成器选项。它仍将最小化Visual Studio,但不应创建新的测试方法。还有一个键盘快捷键: CTRL + \ CTRL + C

With a class like this one, right clicking inside the test method should give you a "Generate Code for Coded UI Test" -> "Use Coded UI Test Builder" option. It will still minimize Visual Studio, but it shouldn't create a new test method. There is also a keyboard shortcut: CTRL+\, CTRL+C

[CodedUITest]
public class MyUITests
{
    public MyUITests()
    {
    }

    [TestMethod]
    public void StartMyTest()
    {
        //right click in here to get the context menu option
    }
}

这篇关于启动“编码的UI测试生成器”;无需创建新的编码UI测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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