【问题标题】:Is it possible to use coded UI testing as just UI automation?是否可以将编码的 UI 测试用作 UI 自动化?
【发布时间】:2015-10-25 23:53:24
【问题描述】:

最近我在 Visual Studio 2013 中进行了很多编码 UI 测试。然后我想知道:是否可以编写编码 UI 测试,而不是测试应用程序的稳定性/安全性/正确行为,但是只需单击 Windows UI 即可执行重复操作?

我确信还有其他不那么迂回的方法可以在 Windows UI 上自动执行操作,但我不知道从哪里开始寻找。我可以就查找内容获得一些建议吗?

【问题讨论】:

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


【解决方案1】:

您可以使用 MSTEST.exe 执行编码的 UI 脚本。最重要的是,您可以创建控制台应用程序,只需单击批处理触发器即可直接执行测试用例。

请参阅下面控制台应用程序中主要方法的示例代码

 static void Main(string[] args)
        {
            Playback.Initialize();
            CodedUITests.CodedUITTest test = new CodedUITests.CodedUITTest();
            test.Testmethod1();
            Playback.Cleanup();
        }

详情请参考http://chamindac.blogspot.in/2014/03/execute-coded-ui-test-with-console.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-07
    • 1970-01-01
    • 2012-01-17
    • 2020-09-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多