Install Environment on macOS
Table of contents
π² β Optional
β β Required
π β Pick One
βΉοΈ β Information
General
Homebrew
https://ngoanh2n.github.io/blog/env/homebrew
β Installation
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
π² Validation
brew --version
Java
JDK
https://ngoanh2n.github.io/blog/env/java#macos-jdk
β Installation
π Eclipse Temurin
brew install --cask temurin21
π Amazon Corretto
brew install --cask corretto21
Java Home
https://ngoanh2n.github.io/blog/env/java#macos-java-home
β Setting
π Latest Version
echo "export JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.zshrc
π Specific Version
echo "export JAVA_HOME=\$(/usr/libexec/java_home -v 17)" >> ~/.zshrc
π² Validation
echo $JAVA_HOME java --version
βΉοΈ Location
π Eclipse Temurin
/Library/Java/JavaVirtualMachines/temurin-XX.jdk
π Amazon Corretto
/Library/Java/JavaVirtualMachines/amazon-corretto-XX.jdk
Git
https://ngoanh2n.github.io/blog/env/git
β Installation
brew install git
π² Validation
git --version
IntelliJ IDEA
https://ngoanh2n.github.io/blog/env/intellij-idea
β Installation
- Visit https://www.jetbrains.com/idea/download/?section=mac
- Click
Download
atIntelliJ IDEA Community Edition
- Open
ideaIC-XXX.X.X.dmg
inDownloads
- Drag
IntelliJ IDEA CE
to theApplications
NodeJS
https://ngoanh2n.github.io/blog/env/nodejs#macos
π² Installation
brew install node@20
π² Validation
node --version npm --version
βΉοΈ Location
/usr/local/lib/node_modules
/usr/local/lib/node_modules/npm/node_modules
Allure Commandline
https://ngoanh2n.github.io/blog/env/allure-commandline
π² Installation
npm install --global allure-commandline
π² Validation
allure --version
βΉοΈ Location
/usr/local/lib/node_modules/allure-commandline
GitHub Desktop
https://ngoanh2n.github.io/blog/env/github-desktop
π² Installation
- Visit https://desktop.github.com
- Click
Download for macOS
- Open
GitHubDesktop-xxx.zip
inDownloads
- Move
GitHub Desktop
to theApplications
Advance
Xcode
IDE
https://ngoanh2n.github.io/blog/env/xcode#ide
β Installation
βΉοΈ Prerequisites
- macOS machine with version 10.15.4 or upper
- Minimum space requirement for Xcode download and installation
- An Apple ID
- Membership in the Apple Developer Program (For Real Devices)
- Visit https://xcodereleases.com
- Open
Xcode_XX.X.xip
- Move
Xcode
to theApplications
SDK
https://ngoanh2n.github.io/blog/env/xcode#sdk
β Installation
- Open
Xcode
- Select the platforms >
Download & Install
- Enter password to acquire admin privileges >
OK
- Open
Locations
Navigation route:Xcode
>Settings...
>Locations
Simulator
https://ngoanh2n.github.io/blog/env/xcode#simulator
β Installation
- Open
Xcode
- Open
Platforms
Navigation route:Xcode
>Settings...
>Platforms
- Open simulator picker: Add icon >
iOS...
- Select desired simulators >
Download & Install
- Open a siumlator
opem -a simulator
Android Studio
IDE
https://ngoanh2n.github.io/blog/env/android-studio#ide-macos
β Installation
- Visit https://developer.android.com/studio
- Click
Download Android Studio Xxx
- Select
I have read and agree with the above terms and conditions
- Click
Mac with Intel chip
orMac with Apple chip
- Open
android-studio-xxx.x.x-mac.dmg
inDownloads
- Drag
Android Studio
to theApplications
SDK
https://ngoanh2n.github.io/blog/env/android-studio#sdk
β Installation
π Setup Wizard
When opening for the first time after installed Android Studio.
- Open
Android Studio
Welcome
>Next
Install Type
>Next
Verify Settings
>Next
License Agreement
>Accept
licenses >Finish
![]()
Downloading Components
>Finish
π Download
When missing Android SDK Components. That means, you have NOT installed environment yet as above.
β SDK Manager
- Open
Android Studio
- Open
Settings
Navigation route:More Actions
>SDK Manager
β Settings
β SDK Platforms
β
Show Package Details
βAndroid XX.X
Β Β Β βAndroid SDK Platform XX
Β Β Β βSources for Android XX
β SDK Tools
β
Show Package Details
βAndroid SDK Build-Tools XX
Β Β Β βXX.0.0
βAndroid Emulator
βAndroid SDK Platform-Tools
Emulator
https://ngoanh2n.github.io/blog/env/android-studio#sdk
β Creating
β Virtual Device Manager
- Open
Android Studio
- Open
Device Manager
Navigation route:More Actions
>Virtual Device Manager
β Virtual Device Configuration
Create Virtual Device
- Select Device >
Next
- Download System Image: Click Download icon
- Agree License:
Accept
>Next
- Complete Requested Actions:
Finish
- Select System Image >
Next
- Verify Configuration >
Finish
- Verify Virtual Devices
Android Home
https://ngoanh2n.github.io/blog/env/android-studio#android-home-macos
β Setting
By default, SDK location is
/Users/{USER}/Library/Android/sdk
.
The environment variables that need to be set in the following:
ANDROID_HOME
- Tools:
- Platform Tools:
adb
- Build Tools:
apksigner
- Command-Line Tools:
avdmanager
,sdkmanager
,apkanalyzer
- Emulator:
emulator
,mksdcard
echo "export ANDROID_HOME=/Users/{USER}/Library/Android/sdk" >> ~/.zshrc echo "export PATH=\$PATH:\$ANDROID_HOME/platform-tools" >> ~/.zshrc echo "export PATH=\$PATH:\$ANDROID_HOME/build-tools/{API_LEVEL}" >> ~/.zshrc echo "export PATH=\$PATH:\$ANDROID_HOME/cmdline-tools/{CMD_TOOLS_VERSION}/bin" >> ~/.zshrc echo "export PATH=\$PATH:\$ANDROID_HOME/emulator" >> ~/.zshrc
β Replace
{USER}
by your current username
β Replace{API_LEVEL}
(E.g.34.0.0
)
β Replace{CMD_TOOLS_VERSION}
(E.g.13.0
)
π² Validation
source ~/.zshrc echo $ANDROID_HOME adb --version
Appium
Server
https://ngoanh2n.github.io/blog/env/appium#server
β Installation
npm install --global appium
π² Validation
appium --version
βΉοΈ Location
/Users/{USER}/.appium
Driver
https://ngoanh2n.github.io/blog/env/appium#driver-macos
β Installation
Suppose I want to setup environment on
macOS
machine for testingiOS app
,macOS app
andAndroid app
.
- iOS app
appium driver install xcuitest
- macOS app
appium driver install mac2
- Android app
appium driver install uiautomator2
Or refer to the Appium Ecosystemβs Drivers for installing appropriate drivers to your testing environment.
π² Validation
appium driver list --installed
π² Doctor
appium driver doctor xcuitest appium driver doctor mac2 appium driver doctor uiautomator2
βΉοΈ Location
/Users/{USER}/.appium/node_modules/appium-xcuitest-driver
/Users/{USER}/.appium/node_modules/appium-mac2-driver
/Users/{USER}/.appium/node_modules/appium-uiautomator2-driver
Plugin
https://ngoanh2n.github.io/blog/env/appium#plugin
π² Installation
π² Images
Plugin for image comparison and finding elements by image.
appium plugin install images
Usage
The plugin must be explicitly activated when launching the Appium server.
appium --use-plugins=images
π² Validation
appium plugin list --installed
βΉοΈ Location
/Users/{USER}/.appium/node_modules/@appium/images-plugin
Inspector
https://ngoanh2n.github.io/blog/env/appium#inspector
β Installation
Appium Inspector is released in two formats:
π Desktop application
- Visit https://github.com/appium/appium-inspector/releases
- Click
Appium-Inspector-mac-xxxx.x.x.dmg
- Open the
Appium-Inspector-mac-xxxx.x.x.dmg
inDownloads
- Drag
Appium Inspector
and drop toApplications
π Web application
Appium Inspector is hosted by Appium Pro. You can inspect your app on this site directly at https://inspector.appiumpro.com.