Launching the "Coded UI Test Builder" without creating a new Coded UI Test

Kirk Broadhurst picture Kirk Broadhurst · Jun 7, 2011 · Viewed 9.7k times · Source

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.

Answer

Dave Neeley picture Dave Neeley · Jun 7, 2011

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