栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

stf环境安装(ios&android)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

stf环境安装(ios&android)

stf项目地址

https://github.com/mrx1203/stf
https://github.com/mrx1203/WebDriverAgent

第一步:安装版本为8.9.1的node

使用nvm控制node版本

brew install nvm
nvm install 8.9.1

安装nvm的时候以下文字记得粘贴到~/.bash_profile里面去

指定默认版本为v8.9.1

nvm alias default 8.9.1
第二步:环境准备

brew install usbmuxd

brew link usbmuxd

brew install libimobiledevice --HEAD (这个可能会出现更新不到最新版本所以需要加head)

brew install ideviceinstaller

brew install carthage

brew install socat

其中usbmuxd,libimobiledevice我是采用源码安装的,源码安装地址:https://github.com/libimobiledevice,像libsbmuxd,libplist,libimobiledevice-glue都可以在里面源码安装,源码安装有一个好处,用brew安装libimobiledevice后,idevicesscreenshot无法截屏ios14以上的手机,源码安装是完全没问题的,大概是brew里的源还没有跟新,用–HEAD安装也没用(这个问题研究了好久)

openssl源码安装地址:https://github.com/openssl/openssl,openssl文件挺大,编译起来挺费劲

./config
make
sudo make install

安装stf依赖

brew install graphicsmagick zeromq protobuf yasm pkg-config
检查是否缺少依赖
stf doctor
问题1

brew装包失败,问题如下

解决办法:换bottle源

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
问题2

npm安装phantomjs失败

解决办法:
自行将报错中的https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-macosx.zip下载到对应的/var/folders/y6/yq_j426j10d994q42mfy9p380000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip,重新npm install phantomjs-prebuilt@2.1.16

问题3

bower install 安装出错

解决办法:设置git使用git://协议代替https://协议

git config --global url."git://".insteadOf https://
问题4

npm install sharp时在libvips模块出错

解决办法:

npm config get cache

查看自己的cache地址,我的是/Users/admin/.npm
将下不来的libvips的zip包放在/Users/admin/.npm/_libvips文件夹下面,重新install

开启服务

./stf local
ios远端开启服务:
stf ios-provider --name <你的名字> --connect-sub tcp://<远端ip>:7250 --connect-push tcp://<远端ip>:7270 --storage-url http://<远端ip> --public-ip <本机ip> --heartbeat-interval 20000 --wda-path /Users/admin/WebDriverAgent/ --wda-port 8100
android远端开启服务:
./stf provider --name <你的名字> --min-port 7400 —-max-port 7700 --connect-sub tcp://<远端ip>:7114 --connect-push tcp://<远端ip>:7116 --group-timeout 20000 --public-ip <本机ip> --storage-url http://<远端ip>:7100/ --vnc-initial-size 600x800

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/703704.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号