LoginSignup
34
32

More than 5 years have passed since last update.

Appium環境をOSXに構築する

Last updated at Posted at 2014-11-21

環境

ソフトウェア バージョン
OS X Mavericks 10.9.4
Appium 1.3.0
Homebrew 0.9.5
node.js 0.10.32

Appiumをインストールする前に

Homebrewをインストール

インストール
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew -v
# Homebrew 0.9.5
パッケージツリーを更新
$ brew update

node.jsをインストール

既存のnode.jsをアンインストール

以下のコマンドに反応した場合は既にインストール済みなので、アンインストールしておく

インストール済みチェック
$ node -v
# v0.10.29
アンインストール
$ brew uninstall node

あわせて関連ファイルも削除
参考: https://gist.github.com/nicerobot/2697848

関連ファイルの削除
$ curl -ks https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh | bash

上記コマンドで削除できなかった場合は、直接ファイルを指定して削除する

関連ファイルの削除(手動)
$ rm -rf /usr/local/lib/node \
/usr/local/lib/node_modules \
/var/db/receipts/org.nodejs.*

インストール

インストールは以下のコマンドを実行

インストール
$ brew install node
$ node -v
# v0.10.32

Appiumの環境を構築する

Appiumをインストール

すでにインストール済みの場合はアンインストールしておく

アンインストール
$ appium -v
# 1.2.4
$ npm uninstall -g appium

インストールは以下のコマンドを実行

インストール
$ npm install -g appium
$ appium -v
# 1.3.0

Appiumの実行環境をチェック

appium-doctorを使用して、Appiumの実行環境をチェックする

$ appium-doctor

出力されるメッセージに合わせて環境を整える
最終的に以下のログが表示されればAppiumの環境構築はすべて完了

Running iOS Checks
✔ Xcode is installed at /Applications/Xcode.app/Contents/Developer
✔ Xcode Command Line Tools are installed.
✔ DevToolsSecurity is enabled.
✔ The Authorization DB is set up properly.
✔ Node binary found at /usr/local/bin/node
✔ iOS Checks were successful.

Running Android Checks
✔ ANDROID_HOME is set to "/Applications/android-sdk-macosx"
✔ JAVA_HOME is set to "/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home."
✔ ADB exists at /Applications/android-sdk-macosx/platform-tools/adb
✔ Android exists at /Applications/android-sdk-macosx/tools/android
✔ Emulator exists at /Applications/android-sdk-macosx/tools/emulator
✔ Android Checks were successful.

✔ All Checks were successful
34
32
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
34
32