一、简介

英文官网:appium官网

Appium跨平台、开源的自动化测试工具,支持iOSAndroid平台的原生的、基于移动浏览器、混合的应用。

原生应用:仅使用ios安卓标准SDK编写的应用

基于移动浏览器的应用:用移动平台的浏览器访问的应用(Appium支持IOS上的Safari和安卓上的Chrome或内嵌的“浏览器”应用)

混合应用:把基于一个WebView实现的所有功能包装成一个应用的应用,WebView是一个可以和网页各种元素交互的原生控件(译者注:因为所有的移动平台都会有浏览器,所以基于浏览器封装起来的应用就可以轻易做到跨平台了)。Phonegap这些项目可以很方便的把那些基于web技术实现的功能打封装成一个混合应用。

跨平台的意义:点击打开链接

appium不是一个新开发的框架,只是将现已有的框架进行集成,使其使用的范围更。

Appium的理念:

Appium was designed to meet mobile automation needsaccording to a philosophy outlined by the following four tenets:

  1. You shouldn’t have to recompile your app or modify it in any way in order to automate it.
  2. You shouldn’t be locked into a specific language or framework to write and run your tests.
  3. A mobile automation framework shouldn’t reinvent the wheel when it comes to automation APIs.
  4. A mobile automation framework should be open source, in spirit and practice as well as in name!

二、设计:

iOS的UIAutomation和android的Instrumentation及UIAutomator采用的这些工具都是标准的平台供应商提供的框架,所以在使用的时候就不需要将任何的框架编译到app中去。

三、架构

客户端/服务器端架构

Appium的核心是一个暴露了REST API的网络服务器。它接收客户端过来的连接,监听(客户端过来的)命令,在移动设备上运行命令,然后把代表命令运行结果的HTTP响应包发送回客户端。

四、会话:

客户端发起一个会话,发送一个包含所谓的“desired capabilities"JSON对象的Post/session的请求到服务器端。这样服务器端就会开启一个自动化会话并把会话ID发送回客户端以便往后的持续的命令传递。

五、Desired Capabilities:

Desired Capabilities是由客户端发送给Appium服务器端的用来告诉服务器去启动哪种我们想要的会话的一套键值对集合。当中也有一些键值对是用来在自动化的过程中修改服务器端的行为方式的。http://appium.io/slate/en/master/#caps.md

六、服务器:

Node.js编写,可以通过NPM进行编译和安装。

七、客户端:

There are client libraries (in Java, Ruby, PythonPHP,JavaScript, and C#) which support Appium’s extensions to the WebDriverprotocol. When using Appium, you want to use these client libraries instead ofyour regular WebDriver client

Appium.appAppium.exe
There exist GUI wrappers around the Appiumserver that can be downloaded. These come bundled with everything required torun the Appium server, so you don’t need to worry about Node. They also comewith an Inspector, which enables you to check out the hierarchy of your app.This can come in handy when writing tests.

八、appium 在android端工作流

1、client端也就是我们 testscript是我们的webdriver测试脚本。

2、中间是起的Appium的服务,Appium在服务端起了一个Server(4723端口),跟seleniumWebdriver测试框架类似, Appium⽀持标准的WebDriverJSONWireProtocol。在这里提供它提供了一套REST的接口,Appium Server接收web driver client标准rest请求,解析请求内容,调⽤用对应的框架响应操作。

3、appium server会把请求转发给中间件Bootstrap.jar ,它是用java写的,安装在手机上.Bootstrap监听4724端口并接收appium 的命令,最终通过调⽤用UiAutomator的命令来

实现。

4、最后Bootstrap将执行的结果返回给appiumserver。

5、appium server再将结果返回给appium client。

 
 

最新文章

  1. JAVA设计模式之模版方法模式
  2. [Eclipse配置] Eclipse代码中显示空白字符(空格,TAB和回车)的方法
  3. 总结Gerrit常用命令
  4. emmet使用 及 notepadd++ emmet的安装
  5. read 隐藏用户输入
  6. 电源管理之pmu驱动分析
  7. common头文件
  8. Python基础练习
  9. HDU 3954 Level up(线段树)
  10. Android开发工具综述,开发人员必备工具
  11. nginx加权轮询和ip_hash
  12. Java高新技术第一篇:类加载器详解
  13. python学习之路前端-jQuery
  14. vue入坑教程(一)
  15. 20175330 实验一 《Java开发环境的熟悉》实验报告
  16. 浅谈AC自动机
  17. .NET界面控件DevExpress发布v18.2.4|附下载
  18. Jq_select的操作
  19. Spring源码分析(十二)FactoryBean的使用
  20. Python库moviepy

热门文章

  1. 15.Subtree of Another Tree(判断一棵树是否为另一颗树的子树)
  2. 1.Tow Sum(两数和)
  3. HashMap 1.8的源码分析一
  4. linux中脚本权限问题以及win下使用telnet测试linux端口
  5. c语言定义指针类型需注意事项
  6. 树莓派编译安装 FFmpeg(添加 H.264 硬件编解码器支持)
  7. Mybatis学习笔记(一) —— mybatis介绍
  8. spring 配置properties 编码
  9. python练习六十八:字符串练习
  10. Murano Weekly Meeting 2015.08.11