Windows Mobile Test Framework实现手机软件自动化测试的介绍

发表于:2008-1-31 14:27

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:王菊玲    来源:51Testing投稿

        摘要:本文就Windows Mobile Test Framework(WMTF)自动化测试做了比较详细的介绍,它介绍了WMTF的由来,获取,测试环境的搭建,以及如何创建软件自动化测试工程的AbstractionLayer,AreaLibrary,Test Suits和Test。特别是在WMTF实现自动化测试的过程中,图文并茂,操作步骤非常详细,图片说明非常具体。希望能够给Windows Mobile Test Framework初学者提供一点点的帮助。
        关键字:Windows Mobile Test Framework, 测试环境搭建,Abstraction Layer, Area Library, Test Suits and Test Cases的创建
一、 前言
        最近,公司领导参加了微软组织的一次培训,带来了一个叫Windows Mobile Test Framework的好东西,他看了之后特别感兴趣。回来之后,把这项光荣的任务交给我研究,计划在公司Mobile产品线上使用并且推广。
        以前,我从来没有接触过Mobile上面的任何东西,当然更加不知道Windows Mobile Test Framework是什么东西了。可领导安排我研究,是对我的信任和重视,我只能硬着头皮披甲上阵了。领导给我的时间不多,前后只有两个礼拜。在这一段时间里,我还需要做其他的事情,又加上家里母亲生病,需要我照顾,时间特别的紧张。我想通过网络寻找一些资料,可是对Windows Mobile Test Framework的介绍实在是非常非常的少。我记得只有在一位网友的博客里有关于Windows Mobile Test Framework的简单介绍,他还只是把Windows Mobile Test Framework自己带的帮助文件中的一个简单例子进行了翻译而已。
        功夫不负有心人,经过一段时间的研究,终于对Windows Mobile Test Framework有所体会了。发现有很多人问Windows Mobile Test Framework实现自动化测试的事情,我想把自己仅有的一点收获和大家分享。
二、 Windows Mobile Test Framework简介 
        对每一位不了解Windows Mobile Test Framework的朋友来说,肯定会问这样一个问题,“Windows Mobile Test Framework是什么东西呀?”。当然,我自己也不例外。
        Windows Mobile Test Framework,是微软内部使用的实现软件自动化测试的框架,它是构建自动化测试程序的框架,是一个可以供测试工程师编写调试运行测试脚本的编译环境和运行环境。
        Windows Mobile Test Framework,它随着Windows Mobile 6 SDK的发布而公开发布出来了。
三、 Windows Mobile Test Framework的获取 
        知道了Windows Mobile Test Framework是什么之后,也许大家会马上关心这样一个问题,“我从哪里去拿Windows Mobile Test Framework呢?”。
        Windows Mobile Test Framework它不是微软对外公开的独立产品,它是随着Windows Mobile6 SDK的发布而发布的,拿到它其实非常的简单。
http://www.microsoft.com/downloads/details.aspx?FamilyId=06111A3A-A651-4745-88EF-3D48091A390B&displaylang=en
        下载Windows Mobile 6 Professional and Standard Software Development Kits Refresh。Windows Mobile6 SDK有两个版本,一个是Professional版本,一个是Standard版本。它们之间的区别,我不想在这里说明了,请大家自己尝试一下就明白了。
        这里,我拿Professional版本举例子,从微软网站下载Windows Mobile 6 Professional SDK Refresh.msi之后,双击它进行运行安装。比如把它安装在
        C:\Program Files的目录下面,我们可以看到这样一个目录C:\Program Files\Windows Mobile 6 SDK\Tools\Windows Mobile Test Framework,同时在这个目录下面,我们还会看到一个Windows Mobile Test Framework.zip文件。
        Windows Mobile Test Framework.Zip就是微软公司开发的Windows Mobile Test Framework软件自动化测试的框架。我们可以把它拷贝到其他目录,并且解压进行使用。
四、 Windows Mobile Test Framework安装前的准备
        我们了解Windows Mobile Test Framework目的是为了应用。如何搭建Windows Mobile Test Framework的测试环境,这个问题就自然而然地出来了。
        在使用Windows Mobile Test Framework编写自动化测试脚本之前,我们需要安装以下几个软件:
        Visual Studio5.0 以上版本;
        Visual Studio SP1包, 如VS80sp1-KB926601-X86-ENU.exe;
        NETFCF框架,如NETCFSetupv2 sp2.msi;
        Activesync4.5
        需要特别说明的是,如果机器上没有安装以上之些工具,Windows Mobile6 SDK是安装不上的,请大家注意一下。
五、 Windows Mobile Test Framework自动化测试的实现
        如何使用Windows Mobile Test Framework进行自动化测试,这个问题非常大,也是必然的一个问题。它非常难以回答,可是这是每个想使用Windows Mobile Test Framework进行自动化测试的朋友想要知道答案的问题。目前因我自身能力有限,只能回答一些比较粗浅,入门级别的问题,衷心地希望能够给徘徊在Windows Mobile Test Framework门口的朋友一点点的启示。

1. Windows Mobile Test Framework的层次
        Windows Mobile Test Framework分六个层次,从上到下依次是TestCases and Suites, Area Libraries, UIAL, MobilityToolKit, DATK, Logging和Utiles.Net层次。以下这个图是Windows Mobile Test Framework帮助文档中自己带的一个层次结构图,相信大家会看得比较清楚。

    
q

        TestCases and Suites层和Area Libraries层的功能是由测试工程师自己来完成的;换句话说,如果使用Windows Mobile Test Framework编写自动化测试脚本,就是在这两个层进行的。
        UIAL层,主要是由微软提供的工具帮助生成脚本。
        MobilityToolKit层,DATK层以及Logging, Utils.Net层是Windows Mobile Test Framework自己提供的,这三层是Windows Mobile Test Framework的核心。
2. Windows Mobile Test Framework测试环境搭建 
        在创建自动化测试工程之前,先搭建一下Windows Mobile Test Framework的测试环境,我们使用设备模拟器来进行讲述。
        第一步,运行ActiveSync软件,打开File菜单,选择Connection Settings菜单选项,进入Connection Settings窗口,把“Allow Connections to one of the following”的下拉列表框设置成”DMA”后,按”OK”按钮保存。请看下图:
           qq

版权声明:51Testing软件测试网及相关内容提供者拥有51testing.com内容的全部版权,未经明确的书面许可,任何人或单位不得对本网站内容复制、转载或进行镜像。51testing软件测试网欢迎与业内同行进行有益的合作和交流,如果有任何有关内容方面的合作事宜,请联系我们

《2023软件测试行业现状调查报告》独家发布~

精彩评论

  • kasad
    2009-3-04 10:11:18

    输入命令行rapistart \test\rcmlsnap命令抓取手机模拟器上面的屏幕产生的两个文件在哪里?

  • lisaliu312
    2008-7-25 17:50:12

    请问执行rctocs报错怎么回事儿?

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号