全新Mac安装STF全记录

STF 介绍

STF是一个移动设备群控方案的开源实现,原名是 OpenSTF,由 CyberAgent, HeadSpin 以及其他贡献者等支持。后来就由device farm接手了,并改名为 @devicefarmer/stf

安装环境

  • 硬件: Mac Air M1芯片
  • 操作系统版本:Mac Ventura

安装步骤

使用app store 安装xcode

安装brew

访问 https://brew.sh/ 安装,即

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

安装npm

先安装nvm,然后安装node 8.9.1版本

brew install nvm
nvm install 8.9.1
brew install python3

安装stf

按照 https://github.com/DeviceFarm... 提供的指引安装,

brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config cmake
npm install -g @devicefarmer/stf --python=python2.7

最开始是执行以下命令安装@devicefarmer/stf的,

npm install -g @devicefarmer/stf

但是报错了

Python executable "python" is v3.9.6, which is not supported by gyp

后面经过排查,有人说要加--python=python2.7参数

安装Android SDK

按照之前的文章Unix/Linux环境下 安装android sdk步骤 执行即可

运行

rethinkdb &
stf local

然后访问

http://127.0.0.1:7100/

就能看到登录页面了

输入:

登录后就看到设备了

碰到的其他问题

xcode-select: error

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

解决办法:

1. 安装 Xcode
2. 执行 sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

碰到npmERR!

npmERR! fatal: unable to access 'https://github.com/fintechx/swagger-node-runner.git/': LibreSSL SSL_read: error:02FFF03C:system library:func(4095):Operation timed out, errno 60

解决办法也很简单,重试多次。

作者:namedlock原文地址:https://segmentfault.com/a/1190000043396545

%s 个评论

要回复文章请先登录注册