Setting up Appium on macOS Big Sur

Arun M
2 min readFeb 25, 2021

--

Supported Version and Prerequisites

This article will help you in getting started with appium automation on macOS. Following versions can be configured on your macOS (11.2.1)

# nvm — v0.35.1
#node — v15.9.0
#appium — 1.20.2
#xcode — 12.4

Prerequisite :

# Apple ID
# Users Account with admin privileges
#Java Installed

1.Install Node and NPM using NVM

i) Install node version manager from the below link :
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash

ii)Check nvm version using command nvm — version
iii) Enter command nvm ls-remote to list all the node versions available in nvm
iv) Enter command nvm install [version.number] eg : v0.1.27 to install any available node version for nvm
v) Check node and npm installed properly using below commands
node -v
npm -v

2. Install Appium Server from npm command line

i)Enter command npm install -g appium
ii) Check your appium version using command appium -v

3. Install Android Studio for Android

i) Install android studio from here https://developer.android.com/studio

4. Install xcode from AppStore

5. Setup environment variables on mac machine

i) Set default shell as bash in System Preferences -> Users & Groups -> <your_username>
ii) Right Click on <user_name> goto Advanced Options-> Select login shell as bin/bash

iii) Enter command cd ~/
iv) Enter command open -e .bash_profile
v) Set JAVA_HOME, ANDROID_HOME path in bash_profile file (Example given below)
vi) Enter command source .bash_profile

Sample .bash_profile file:
export NVM_DIR=”/Users/testuser/.nvm”
[ -s “$NVM_DIR/nvm.sh” ] && \. “$NVM_DIR/nvm.sh” # This loads nvm
export ANDROID_HOME=/Users/testuser/Library/Android/sdk
export PATH=~/Users/testuser/Library/Android/sdk/platform-tools:/Users/testuser/.nvm/versions/node/v15.9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
export JAVA_HOME=$(/usr/libexec/java_home)

Finally, test all your setup using appium-doctor

i) Install appium doctor using command npm install -g appium-doctor
ii) Test your setup using appium-doctor

Happy Learning !!! Comment below if you have any queries.

--

--

Arun M
Arun M

Written by Arun M

Passionate Tester. Quality Engineering. Interested in Technology and Sports.

No responses yet