【问题标题】:How to Include Testing tools in Visual Studio 2013 Community如何在 Visual Studio 2013 社区中包含测试工具
【发布时间】:2015-03-13 04:01:34
【问题描述】:

我已经在我的 PC 中安装了 Visual Studio 2013 Community Edition,并使用 Visual C# 创建了一个新项目 ---> 测试 ----> 单元测试项目,如下所示。

但我的问题是我想添加编码 UI 测试而不是单元测试项目。谁能帮我安装 Visual Studio 2013 Community Edition 的测试工具。

【问题讨论】:

  • 您是否通过工具 -> 扩展和更新添加了编码的 UI 扩展?
  • 不知道在哪里可以查到。 @RagtimeWilly
  • 在 Visual Studio 中,从工具菜单中选择扩展和更新。然后从左侧导航中选择 Online 并搜索 Coded UI。
  • 通过查看此链接:visualstudiogallery.msdn.microsoft.com/… 看来它可能仅适用于 Visual Studio 的高级版或终极版。
  • 好的,谢谢。它建议我 Ranorex-自动化测试.....,Ax - 测试自动化平台,M - eux 测试。哪一个会是最好的。 @RagtimeWilly

标签: c# visual-studio-2013 configuration coded-ui-tests


【解决方案1】:

Coded UI Plugin 仅适用于 Visual Studio 的高级版或终极版。

【讨论】:

    【解决方案2】:

    看看 TestStack White (http://docs.teststack.net/White/GettingStarted.html) 作为 Coded UI 的替代方案。因为 Coded UI 仅在 Visual Studio 的 Premium+ 版本中可用。

    白色的示例代码:

        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();
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-06
      • 2015-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多