现在的位置: 首页 > 综合 > 正文

IOS自动化测试学习笔记

2018年04月19日 ⁄ 综合 ⁄ 共 1259字 ⁄ 字号 评论关闭

IOS 

第一讲

一 自备能力

1、熟悉js脚本(必须)

2、会常用的linux命令(必须)

3、英文能力(必须)

4、熟悉java(必须)

5、会一点点shell和python

6、会一些oc和IOS开发

二必备硬件

1、mac(必须)

2、iphone或者ipad(必须)

三 软件环境

1、Mac OS X 10.8.x 以上(必须)

2、开发者证书+密钥 (或者企业级证书)

3、Xcode5.0以上(必须)

4、python2.5-2.7版本(系统自带)

5、TuneUp(必须)  

https://github.com/alexvollmer/tuneup_js 
 

写出来的脚本需要通过TuneUp来封装

6、FruitStrap(必须) 

安装app

7、淘宝Athrun&&InstrumentDriver

8、subLime(一种文本编辑器)

第二讲

一 启动instruments

1,Xcode-Open Developer Tools - instruments 

2,双击-右键-open developer tools

UIATarget.localTarget().delay(2)

com +Shift +h 可使simulator回到桌面

pwd :显示当前目录

https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004652-CH1-SW1

二、UIAutomation介绍

1、AutoMating UI Testing

2、Writing Test Script(JS)

3、Accessing Manipulating UI Elements  (by label)

4、Displaying the Element Hierachy

selium8种识别UI控件的方法

by path  by tag by label by text by id 

第三讲

一、 App编译的各种版本

1、Debug版本

2、Release

3、存放路径

build-products-

4、App . ipa文件

二、被测app部署到IOS设备

1、用工具部署App的原因:签名一致

2、FruitStrap

3、命令:./FruitStrap -b <appPath>

https://github.com/ghughes/fruitstrap

cat  README.md

xcode-window -organizer- 设备id

第四讲Monkey

一网上通用方法

1,MonkeyTalk(FoneMonkey)

需要被测App源代码

http://huaban.com/pins/56994829/

2,优点:算法优良、部署方便、稳定性高

缺点:需要源代码,实际工作中局限性大

二Monkey小工具编写源码分析

1、不需要被测App源码

2、启动Instruments

3、模拟器和真机分辨率判断函数

4、随机生成坐标函数

5、事件函数

抱歉!评论已关闭.