Install Environment on Windows
Table of contents
π² β Optional
β β Required
π β Pick One
βΉοΈ β Information
General
Chocolatey
https://ngoanh2n.github.io/blog/env/chocolatey
β Installation
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
β Allow Confirmation
choco feature enable --name allowGlobalConfirmation
Open
Windows PowerShell
with administrator privileges
π² Validation
choco --version
βΉοΈ Location
C:\ProgramData\chocolatey
Java
JDK
https://ngoanh2n.github.io/blog/env/java#windows-jdk
β Installation
π Eclipse Temurin
choco install temurin21
π Amazon Corretto
choco install corretto21jdk
Open
Command Prompt
with administrator privileges
Java Home
https://ngoanh2n.github.io/blog/env/java#windows-java-home
β Setting
setx /m JAVA_HOME "{LOCATION}" & refreshenv setx /m PATH "%PATH%;%JAVA_HOME%\bin" & refreshenv
β Open
Command Prompt
with administrator privileges
β Replace{LOCATION}
by your installation directory
π² Validation
echo %JAVA_HOME% java --version
βΉοΈ Location
π Eclipse Temurin
C:\Program Files\Eclipse Adoptium\jdk-XX-hotspot
π Amazon Corretto
C:\Program Files\Amazon Corretto\jdkXX
Git
https://ngoanh2n.github.io/blog/env/git
β Installation
choco install git
Open
Command Prompt
with administrator privileges
π² Validation
git --version
IntelliJ IDEA
https://ngoanh2n.github.io/blog/env/intellij-idea
β Installation
π Chocolatey
choco install intellijidea-community
Open
Command Prompt
with administrator privilegesπ Setup Wizard
- Visit https://www.jetbrains.com/idea/download/?section=windows
- Click
Download
atIntelliJ IDEA Community Edition
section- Open
ideaIC-XXX.X.X.exe
inDownloads
- Do installation procedures of Setup Wizard
NodeJS
https://ngoanh2n.github.io/blog/env/nodejs#windows
π² Installation
π Chocolatey
choco install nodejs-lts
β Path Setting
setx /m PATH "%PATH%;C:\Program Files\nodejs" & refreshenv setx /m PATH "%PATH%;C:\{USER}\AppData\Roaming\npm" & refreshenv
β Open
Command Prompt
with administrator privileges
β Replace{USER}
by your current usernameπ Setup Wizard
- Visit https://nodejs.org/en/download
- Click
Windows Installer
- Open the
node-v20.xx.x-xxx.msi
inDownloads
- Do installation procedures of Setup Wizard
π² Validation
node --version npm --version
βΉοΈ Location
C:\Program Files\nodejs
C:\Program Files\nodejs\node_modules\npm
NPM Packages
C:\{USER}\AppData\Roaming\npm
Allure Commandline
https://ngoanh2n.github.io/blog/env/allure-commandline
π² Installation
npm install --global allure-commandline
π² Validation
allure --version
βΉοΈ Location
C:\Users\{USER}\AppData\Roaming\npm\node_modules\allure-commandline
GitHub Desktop
https://ngoanh2n.github.io/blog/env/github-desktop
π² Installation
π Chocolatey
choco install github-desktop
Open
Command Prompt
with administrator privilegesπ Setup Wizard
- Visit https://desktop.github.com
- Click
Download for Windows
- Open
GitHubDesktopSetup-xxx.exe
inDownloads
- Do installation procedures of Setup Wizard
Advance
Android Studio
IDE
https://ngoanh2n.github.io/blog/env/android-studio#ide-windows
β Installation
π Chocolatey
choco install androidstudio
Open
Command Prompt
with administrator privilegesπ Setup Wizard
- Visit https://developer.android.com/studio
- Click
Download Android Studio Xxx
- Check
I have read and agree with the above terms and conditions
- Click
Download Android Studio Xxx | xxxx.x.x for Windows
- Open
android-studio-xxx.x.x-windows.exe
inDownloads
- Do installation procedures of Setup Wizard
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-windows
β Setting
By default, SDK location is
C:\Users\{USER}\AppData\Local\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
setx /m ANDROID_HOME "C:\Users\{USER}\AppData\Local\sdk" & refreshenv setx /m PATH "%PATH%;%ANDROID_HOME%\platform-tools" & refreshenv setx /m PATH "%PATH%;%ANDROID_HOME%\build-tools\{API_LEVEL}" & refreshenv setx /m PATH "%PATH%;%ANDROID_HOME%\cmdline-tools\{CMD_TOOLS_VERSION}\bin" & refreshenv setx /m PATH "%PATH%;%ANDROID_HOME%\emulator" & refreshenv
β Open
Command Prompt
with administrator privileges
β Replace{USER}
by your current username
β Replace{API_LEVEL}
(E.g.34.0.0
)
β Replace{CMD_TOOLS_VERSION}
(E.g.13.0
)
π² Validation
echo %ANDROID_HOME% adb --version
Appium
Server
https://ngoanh2n.github.io/blog/env/appium#server
β Installation
npm install --global appium
π² Validation
appium --version
βΉοΈ Location
C:\Users\{USER}\AppData\Roaming\npm\node_modules\appium
Driver
https://ngoanh2n.github.io/blog/env/appium#driver-windows
β Installation
Suppose I want to setup environment on
Windows
machine for testingAndroid app
andWindows app
.
- Android app
appium driver install uiautomator2
- Windows app
appium driver install --source=npm appium-windows-driver
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 uiautomator2 appium driver doctor windows
βΉοΈ Location
C:\Users\{USER}\.appium\node_modules\appium-uiautomator2-driver
C:\Users\{USER}\.appium\node_modules\appium-windows-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
C:\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-windows-xxxx.x.x-xxx.exe
- Open
Appium-Inspector-windows-xxxx.x.x-xxx.exe
inDownloads
- Do installation procedures of Setup Wizard
π Web application
Appium Inspector is hosted by Appium Pro. You can inspect your app on this site directly at https://inspector.appiumpro.com.