当前位置:网站首页>Appium自动化测试基础 — 12.APPium自动化测试框架介绍
Appium自动化测试基础 — 12.APPium自动化测试框架介绍
2022-06-30 09:35:00 【测试-八戒】
我们前面说的Android环境搭建和adb命令都是为移动端自动化测试环境搭建做准备的。
1、主流的移动端⾃动化⼯具
(1)Robotium
- ⽀持语⾔:Java
- 仅⽀持Android系统
- 不⽀持跨应⽤
(2)Macaca
- ⽀持语⾔:Java,Python,Node.js
- ⽀持Android和iOS系统
- ⽀持跨应⽤
(3)Appium
- ⽀持语⾔:Java,C#,Python,php,perl,ruby,Node.js
- ⽀持Android和iOS系统
- ⽀持跨应⽤
2、⾃动化测试⼯具选择的关注点
- 是否⽀持native,webview。
- 是否⽀持获取toast。
- 是否⽀持跨应⽤。
说明
(1)native:表示APP原生页面。
- 使用Android/IOS支持的语言编写页面。
Android是Java语言。
IOS 是Object-C语言。 - 优点:页面打开速度快。
- 缺点:更新复杂。
当你修改了原生页面,需要重新发布的话,就需要重新发布到应用市场上,无论app修改了什么,哪怕是一点点原生页面,都需要重新发布。需要应用市场平台审核,审核需要一定时间。
在用户方面,更新需要用户升级或重新下载app。
(2)webview:简单理解就是app中的H5页面。
- 使用前端技术编写的页面。
- 优点:更新方便。
进行修改,不需要重新发布应用市场,webview页面在我们自己的服务端就可以自行更新。 - 缺点:打开速度慢,需要加载页面的很多元素,如js,css等。
(3)toast:就是页面中的一个标签。
toast的样子
比如我在Android虚拟机中打开文件管理器,点击返回按钮会有一行提示“再次点击即可退出。”,如下图:

这个样式的提示就叫toast。
toast并不是弹窗,在页面中弹窗你不操作的话会一直存在,而toast默认时间就自动消失了。
补充
- 我们现在大部分的app页面,都是由
native页面和webview页面混合组成的,既有原生页面,也有H5页面。 - 在app中区分原生页面还是H5页面的基础办法(不一定准确),打开原生页面是没有进度条的,打开H5的页面是有进度条的。
3、APPium简介
- 官⽹:www.appium.io,由SauceLab公司开发。
- Appium是由
nodejs的express框架写的Http Server,Appium使⽤WebDriver的json wire协议(该协议可支持多语言),来驱动Apple系统的UIAutomation库、Android系统的UIAutomator框架。
Appium对IOS系统的支持得益于Dan Cuellar’s对于IOS自动化的研究。
Appium也集成了Selendroid,来支持老android版本。 - Appium支持Selenium WebDriver支持的所有语言,如
Java、Object-C、JavaScript、Php、Python、Ruby、C#、Clojure,或者Perl语言,更可以使用Selenium WebDriver的API。Appium支持任何一种测试框架。如果只使用Apple的UIAutomation,我们只能用javascript来编写测试用例,而且只能用Instruction来运行测试用例。同样,如果只使用Google的UIAutomation,我们就只能用java来编写测试用例。Appium实现了真正的跨平台自动化测试。 - Appium 是一个自动化测试开源、跨平台工具。它允许测试人员在不同的平台(iOS,Android)使用同一套API来写自动化测试脚本,这样大大增加了 iOS 和 Android 测试套件间代码的复用性。
支持 iOS 平台和 Android 平台上的原生应用,web 应用和混合应用。
所谓的“移动原生应用”是指那些用 iOS 或者 Android SDK 编写的应用。
所谓的“移动 web 应用”是指使用移动浏览器访问的应用(Appium 支持 iOS 上的 Safari 和 Android 上的 Chrome)。
所谓的“混合应用”是指原生代码封装网页视图——原生代码和 web 内容交互。
比如,像 Phonegap,可以帮助开发者使用网页技术开发应用,然后用原生代码封装,这些就是混合应用。 - Appium使用的供应商提供的框架:
IOS 9.3及以上:苹果的XCUITest
IOS 9.3及更低版本:苹果的UIAutomation
Android 4.2+:谷歌的UiAutomator/UiAutomator 2
Android 2.3+:谷歌的Instrumentation(Instrumentation由单独的项目Selendroid提供支持)
Windows:微软的WinAppDriver
重点:配套学习资料和视频教学
那么在这里我也精心准备了上述大纲的详细资料在下方链接如下


边栏推荐
猜你喜欢

MySQL internal component structure

Properties of string

Numpy (time date and time increment)

【Ubuntu-redis安装】

CentOS MySQL installation details

Follow the wechat oauth2.0 access scheme

Financial private cloud infrastructure scheme evaluation (Architecture and storage)

GPT (improving language understanding generative pre training) paper notes

布隆过滤器

Mysq database remote connection error, remote connection is not allowed
随机推荐
Difference between bow and cbow
3. integrate eslint and prettier
Slf4j: failed to load class "org.slf4j.impl.staticloggerbinder"
Task summary in NLP
Machine learning note 9: prediction model optimization (to prevent under fitting and over fitting problems)
【Ubuntu-MySQL8安装与主从复制】
近期学习遇到的比较问题
DataTableToModelList实体类
Torch learning summary
MySQL index and data storage structure foundation
OCX child thread cannot trigger event event (forward)
[new book recommendation] DeNO web development
Plan the IT technology route for the new year? Let's learn about Gartner infrastructure hype cycle
Self service terminal handwritten Chinese character recognition input method library tjfink introduction
utils 协程
Numpy (constant)
Clickhouse installation (quick start)
Recommend a very easy-to-use network communication framework HP socket
Enum demo
Redis docker master-slave mode and sentinel