51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1799|回复: 1
打印 上一主题 下一主题

Coded UI Test在Windows Vista、2003和2008上需要Windows Automation API 3.0

[复制链接]
  • TA的每日心情
    无聊
    7 小时前
  • 签到天数: 528 天

    连续签到: 1 天

    [LV.9]测试副司令

    跳转到指定楼层
    1#
    发表于 2019-1-7 16:16:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    最近团队的Nightly run被迁移到装有Windows Vista的Build Agent上执行,98+%的自动化用例执行通过率,还是蛮不错的!但是发现有几个之前(在装有Win7的Build Agent)一直通过的测试用例,突然失败了!今天同事Juan分析了一下这几个失败的用例,它们全部是基于Coded UI Test的,错误的场景让人有点匪夷所思,比如:ListBox.SelectedItems返回Null,之前在Win 7上运行都是很稳定的,经过一段调试还是一头雾水!

    后来仔细观察,发现在执行这些失败用例的时候,系统总有个提示(可不要小瞧这提示,因为没有它,打死我我也不知道要去装下面的补丁。一开始就是忽略这个重要的提示,所以“杯具”了几个小时,呵呵!),要求去更新一下 Windows Automation API,地址连接如下:
    http://support.microsoft.com/kb/976779/

    于是就按照提示,下载更新了一下基于x86的Windows Vista Automation API。很灵,更新完毕一切OK!


    原来是在Vista和Windows 2003/2008等操作系统上,Coded UI Test的基石之一Windows Automation API版本比较就旧,需要更新到最新的Windows Automation API 3.0,而在Win7则不用。Windows Automation API包括了最新的Microsoft Active Accessiblity和Microsoft UI Automation。如果大家不是很了解这两项技术,下面是从MSDN上摘取的一段简介,言简意赅的对它们进行了解释:


    " The Windows Automation API consists of two technologies—Microsoft Active Accessibility and Microsoft UI Automation. Microsoft Active Accessibility is the legacy accessibility technology that was introduced as a platform add-in for Windows 95, while Microsoft UI Automation is a newer, more capable technology that overcomes the limitations inherent in Microsoft Active Accessibility. "


    " Although Microsoft Active Accessibility and UI Automation are two different technologies, the basic design principles are similar. The purpose of both technologies is to expose rich information about the UI elements used in Windows applications. Developers of accessibility tools can use this information to create software that makes applications running on Windows more accessible to people with vision, hearing, or motion disabilities. "


    " Both Microsoft Active Accessibility and UI Automation expose the UI object model as a hierarchical tree, rooted at the desktop. Microsoft Active Accessibility represents individual UI elements as accessible objects, and UI Automation represents them as automation elements. Both refer to the accessibility tool or software automation program as the client. However, Microsoft Active Accessibility refers to the application or control offering the UI for accessibility as the server, while UI Automation refers to this as the provider."


    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-18 17:31 , Processed in 0.060097 second(s), 22 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表