转: Appium ---移动自动化测试
转自:http://www.cnblogs.com/nbkhic/p/3803830.html
什么是appium?
下面这段介绍来自于appium的官网。
Appium is an open-source tool you can use to automate mobile native, mobile web, and mobile hybrid applications on iOS and Android platforms. “Mobile native apps” are those written using the iOS or Android SDKs. “Mobile web apps” are web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome on Android). “Mobile hybrid apps” have a native wrapper around a “webview” – a native control that enables interaction with web content. Projects like Phonegap, for example, make it easy to build apps using web technologies that are then bundled into a native wrapper – these are hybrid apps.
Importantly, Appium is “cross-platform”: it allows you to write tests against multiple platforms (iOS, Android), using the same API. This enables a large or total amount of code reuse between iOS and Android testsuites.
我们可以从上面的介绍里获得这样的一些信息:
- appium是开源的移动端自动化测试框架;
 - appium可以测试原生的、混合的、以及移动端的web项目;
 - appium可以测试ios,android应用(当然了,还有firefox os);
 - appium是跨平台的,可以用在osx,windows以及linux桌面系统上;
 
appium的哲学
Appium was designed to meet mobile automation needs according to a certain philosophy. The key points of this philosophy can be stated as 4 requirements:
- You shouldn’t have to recompile your app or modify it in any way in order to automate it.
 - You shouldn’t be locked into a specific language or framework to write and run your tests.
 - A mobile automation framework shouldn’t reinvent the wheel when it comes to automation APIs.
 - A mobile automation framework should be open source, in spirit and practice as well as in name!
 
appium的设计哲学是这样的:
1. 不需要为了自动化而且重新编译或修改测试app;
2. 不应该让移动端自动化测试限定在某种语言和某个具体的框架;也就是说任何人都可以使用自己最熟悉最顺手的语言以及框架来做移动端自动化测试;
3. 不要为了移动端的自动化测试而重新发明轮子,重新写一套惊天动地的api;也就是说webdriver协议里的api已经够好了,拿来改进一下就可以了;
4. 移动端自动化测试应该是开源的;
appium的技术架构
- OS: Apple’s UIAutomation
 - Android 4.2+: Google’s UiAutomator
 - Android 2.3+: Google’s Instrumentation. (Instrumentation support is provided by bundling a separate project, Selendroid)
 
appium的设计思想
We meet requirement #2 by wrapping the vendor-provided frameworks in one API, theWebDriver API. WebDriver (aka “Selenium WebDriver”) specifies a client-server protocol (known as the JSON Wire Protocol). Given this client-server architecture, a client written in any language can be used to send the appropriate HTTP requests to the server. There are already clients written in every popular programming language. This also means that you’re free to use whatever test runner and test framework you want; the client libraries are simply HTTP clients and can be mixed into your code any way you please. In other words, Appium & WebDriver clients are not technically “test frameworks” – they are “automation libraries”. You can manage your test environment any way you like!
We meet requirement #3 in the same way: WebDriver has become the de facto standard for automating web browsers, and is a W3C Working Draft. Why do something totally different for mobile? Instead we have extended the protocol with extra API methods useful for mobile automation.
It should be obvious that requirement #4 is a given – you’re reading this because Appium is open source.
首先,为了能够实现哲学里描述的第2条,也就是不应该让移动端自动化测试限定在某种语言和某个具体的框架;也就是说任何人都可以使用自己最熟悉最顺手的语言以及框架来做移动端自动化测试;appium选择了client-server的设计模式。只要client能够发送http请求给server,那么的话client用什么语言来实现都是可以的,这就是appium及webdriver如何做到支持多语言的;
其次,为了能够实现不要为了移动端的自动化测试而重新发明轮子,重新写一套惊天动地的api;也就是说webdriver协议里的api已经够好了,拿来改进一下就可以了;这个思想,appium扩展了webdriver的协议,没有自己重新去实现一套。这样的好处是以前的webdriver api能够直接被继承过来,以前的webdriver各种语言的binding都可以拿来就用,省去了为每种语言开发一个client的工作量;
最后appium当然是开源的,这也实现了哲学思想里的最后一点。
转: Appium ---移动自动化测试的更多相关文章
- TIB自动化测试快讯 - Appium手机自动化测试学习资料精选
		
TIB自动化测试快讯 - Appium手机自动化测试学习资料精选 Appium+Android+Javahttp://automationqa.com/forum.php?mod=viewthre ...
 - Appium移动自动化测试(四)--one demo
		
继续更新. -------------------------------------------- 第四节 安装Appium Client Appium Client是对webdriver原生ap ...
 - Appium移动自动化测试(四)--one demo(转)
		
Appium移动自动化测试(四)--one demo 2015-06-15 20:41 by 虫师, 40514 阅读, 34 评论, 收藏, 编辑 继续更新. ------------------- ...
 - Appium移动自动化测试(三)--安装Android模拟器(转)
		
Appium移动自动化测试(三)--安装Android模拟器 2015-06-08 10:33 by 虫师, 30828 阅读, 9 评论, 收藏, 编辑 当Android SDK安装完成之后,并不意 ...
 - Appium移动自动化测试(二)--安装Android开发环境(转)
		
Appium移动自动化测试(二)--安装Android开发环境 2015-06-04 17:30 by 虫师, 35299 阅读, 23 评论, 收藏, 编辑 继续Appium环境的搭建. 第二节 ...
 - Appium移动自动化测试(一)--安装Appium(转)
		
Appium移动自动化测试(一)--安装Appium 2015-05-30 17:48 by 虫师, 70668 阅读, 13 评论, 收藏, 编辑 Appium 自动化测试是很早之前就想学习和研究的 ...
 - 手机自动化测试:搭建appium手机自动化测试开发环境
		
手机自动化测试:搭建appium手机自动化测试开发环境 poptest是国内唯一一家培养测试开发工程师的培训机构,以学员能胜任自动化测试,性能测试,测试工具开发等工作为目标.如果对课程感兴趣,请大 ...
 - RF+Appium框架自动化测试系列一之(Mac下Appium环境搭建)万事开头难
		
消失了3个月,有一段时间没来园子更新博客了,各位看官见谅哈哈,消失是因为刚换了工作环境没外网,好多笔记没能及时的记录分享,以后有时间慢慢补上吧,这段时间主要接触了移动端app的自动化测试,公司为了快速 ...
 - mac上搭建appium+IOS自动化测试环境(一)
		
阅读须知 由于OS X系统最近才开始接触,所以有些东西也不是很清楚,这里只提供方法不提供原理,能解释清楚的我也会尽量解释.可能也有一些地方说的不严谨或有错的,还望大家指点一二. 实验环境 操作系统: ...
 - 初次尝试使用jenkins+python+appium构建自动化测试
		
初次尝试使用jenkins+python+appium构建自动化测试 因为刚刚尝试使用jenkins+python+appium尝试,只是一个Demo需要很多完善,先记录一下今天的成果,再接再厉 第一 ...
 
随机推荐
- 关于js拖拽功能,拖拽元素的position:fixed;left:0;right:0;样式引起左右拖动元素会出现落后鼠标移动距离的问题
			
被拖拽元素的样式如果为:position:fixed;left:0;right:0;(当时是为了让fixed定位的元素水平居中加的left:0;right:0;避免js动态计算定位的麻烦)时左右拖动会 ...
 - Appium+python自动化10-AVD 模拟器【转载】
			
前言 有些小伙伴没android手机,这时候可以在电脑上开个模拟器玩玩 一.模拟器配置 1.双击启动AVD Manager,进入配置界面
 - [BZOJ1821][JSOI2010]Group 部落划分 Group  最小生成树 贪心
			
1821: [JSOI2010]Group 部落划分 Group Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 2943 Solved: 1390[S ...
 - json model 互转
			
1.json转model TestModel tm = new TestModel();JavaScriptSerializer js = new JavaScriptSerializer();tm ...
 - (26)C#WebService
			
一.创建webservice 二.发布webservice 1.正式发布 (1)配置IIS 自己在局域网用的话,只需1,2,3 三步 1:网站的名称,将来IIS里有多个网站时可以方便区分 2:文件的本 ...
 - (7)oracle数据类型
			
字符型 char 定长 最大2000字符 例如 char(20) 表示定长20 不够的补空格 定长查询速度快 varchar2 变长 最大4000字符 省空间 clob 字符型大对象 最大 ...
 - springMVC笔记:jsp页面获取后台数据记录列表
			
1.读取数据库中的记录List<HashMap<String,String>> attributes; 2.Controller构造Model如下: @RequestMappi ...
 - 四. Java继承和多态7. Java static关键字
			
static 修饰符能够与变量.方法一起使用,表示是“静态”的. 静态变量和静态方法能够通过类名来访问,不需要创建一个类的对象来访问该类的静态成员,所以static修饰的成员又称作类变量和类方法.静态 ...
 - C语言基础之运算符优先级
			
1.运算符的优先级表 运算符的优先级(从高到低) 优先级 描述 运算符 1 括号 ().[] 2 正负号 +.- 3 自增自减,非 ++.--.! 4 乘除,取余 *./.% 5 加减 +.- 6 移 ...
 - VisualStudio Shell简介 — 集成插件
			
Visual Studio Shell只是提供了一个内核,我们还需要在其基础上补充功能,从而实现我们自己的IDE.Visual Studio Shell的插件开发和Visual Studio插件开发是 ...