Appium测试ios环境搭建
2015-01-28 19:23
716 查看
1.环境要求:
用Appium测试ios应用必须在Mac系统下;
可测试.ipa或.app文件,用真机测试应用必须带开发者证书签名;不能用appstore下载的应用,因为下载的都是带release证书签名的应用。
2.安装:我是用.dmg包安装的,下载后双击打开,把Appium图标拖到Application即可;
3.检测环境依赖:
Appium是用node.js开发的,依赖node。检测方式:打开Appium右上角的听诊器图标自动检测,需要安装的输入y回车自动安装
需要注意的是如果没有Android测试环境,检测程序会报错,其实不用管他,如果你是个处女座患者,看着一行红色提示很不爽,可以修改检测程序,修改方法见下一篇博客
4.编译被测应用:
xcodebuild -target [appname] -sdk iphonesimulator(抄自《ios测试指南》)5.开始测试:
1)启动Appium.app,点击IOS按钮,勾选“App Path”,选择被测应用。勾选“Force Device”设置模拟器;
2)点击“launch”启动服务;
3)点击放大镜按钮启动录制程序;
4)点击“Record”,进行各种业务操作,录制程序下方会自动生成脚本;
5)将脚本复制到IDE中,修改脚本,加入延时和条件判断等,运行脚本进行测试(appium没有“回放”按钮,也不能保存录制的脚本)。
测试脚本可以用Java、PHP、nodejs、Python、ruby等语言编写官方的ios测试说明:
IOS
Make sure Instruments.app is not openIf you’re running the simulator, make sure your actual device is notplugged in
Make sure the accessibility helper is turned off in your Settings app
Make sure the app is compiled for the version of the simulator that’s beingrun
Make sure the app is compiled for the simulator (or real device) asappropriate (e.g., in debug mode for the simulator), or you might geta
posix spawnerror.
If you’ve ever run Appium with sudo, you might need to
sudo rm/tmp/instruments_sockand try again as not-sudo.
If this is the first time you’ve run Appium, make sure to authorize the useof Instruments. Usually a box will pop up that you enter your password into. If you’re running Appium from source, you can simply run
sudo grunt authorizefrom
the main repo to avoid getting this popup. If you’re running from npm,run
sudo authorize_iosinstead. You need to do this every time you installa new version of Xcode, as well.
If you see
iOS Simulator failed to install the application.and thepaths are correct, try restarting the computer.
相关文章推荐
- appium-iOS设备的自动化测试环境搭建
- Robot + Appium 搭建 iOS 自动化测试环境
- Appium 1.6.3 在Xcode 8, iOS 10.2(模拟器)测试环境搭建 经验总结
- 基于Xcode8.3.2及iOS10.3.2的Appium1.6.5测试环境搭建
- Appium+robotframwork+python 在mac上测试ios应用——1.环境搭建
- mac+Appium+java+IOS 自动化测试环境搭建
- MAC 搭建自动化测试环境(基于Appium+python+ios/android+unnitest+HTMLTestRunner)(一)
- appium自动化测试环境搭建和demo测试(python版本)
- appium+java+ios自动化环境的搭建部分代码,资料的搜集与整合。
- appium测试android环境搭建(win7)
- appium ios环境搭建——iOS开发环境搭建
- Appium测试环境搭建(Windows下)
- IOS-Appium 自动化测试——环境配置及模拟器、真机跑测试
- appium ios环境搭建——Appium概述
- Xcode6+iPhone6 搭建iOS开发真机测试环境
- Android 全自动js脚本测试 Appium教程——appium环境搭建(一)
- Appium -java - windows7 环境搭建 真机测试
- 【iOS开发-92】在mac上如何搭建apache+php+mysql环境用于ios网络测试?
- Appium - Android windows测试环境搭建
- Appium - Android windows测试环境搭建