Launching the “Coded UI Test Builder” without creating a new Coded UI Test

痴心易碎 提交于 2019-12-21 05:06:00

问题


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.

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

  • creates a new empty coded UI test
  • closes down when I next run a test or start debugging in Visual Studio

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.


回答1:


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
    }
}



回答2:


  1. You can open Visual Studio command prompt
  2. execute "codedUITestBuilder.exe /standalone"



回答3:


You can also right click the UIMap.uitest file in Solution Explorer and select "Edit with Coded UI Test Builder" No need for a Coded UI Test this way




回答4:


Right click inside [TestMethod] and you will get the option for Edit with coded ui test builder.Click on that you can get test builder. If you right click outside of [TestMethod] than "Edit with coded ui test builder" option will not come




回答5:


You can open coded UI builder by right clicking in between the Test Method or scripts and click on "Edit with coded ui test builder".



来源:https://stackoverflow.com/questions/6260522/launching-the-coded-ui-test-builder-without-creating-a-new-coded-ui-test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!