简体   繁体   中英

How to Include Testing tools in Visual Studio 2013 Community

I have installed Visual Studio 2013 Community Edition in my PC and i created a new project using Visual C# ---> Test ----> Unit Test Project as show bellow.

在此处输入图片说明

But My problem is I want to add Codded UI testing instead of Unit Test Project. Can any one help me how to install testing tools for Visual Studio 2013 Community Edition.

编码的UI插件仅适用于Visual Studio的高级版或旗舰版。

Have a look at TestStack White ( http://docs.teststack.net/White/GettingStarted.html ) as an alternative for Coded UI. Since Coded UI is only available in Premium+ versions of Visual Studio.

Example code for White:

    public void Notepad() {
        Application app = Application.Launch("notepad.exe");
        Window window = app.GetWindow("Untitled - Notepad");

        // Change text
        var box = window.Get(SearchCriteria.ByClassName("Edit"));
        Keyboard.Instance.Send("test", box);

        // Save
        window.MenuBar.MenuItem("File", "Save As...").Click();
        var filename = window.Get(SearchCriteria.ByClassName("Edit"));
        Keyboard.Instance.Send(DateTime.Now.ToString("yyyyMMddHHmmssffff") + "test.txt", filename);
        window.Get(SearchCriteria.ByText("Save")).Click();

        app.Kill();
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM