How to setup android emulator
What do we need?
Introduction into appium
How to run Webdriver IO tests on android emulator
First, we need to download and install Android Studio. Then go through Android Studio setup.
Let's create a first emulator
Click on the plus button or create a new device and select pixel 4 as an emulator.
Select Pixel 4 device
Select any version of Android but it should be with Google APIs at the end like on the screenshot.
Add the following Java Path in zshrc file
The Java Development Kit is a distribution of Java technology by Oracle Corporation. It implements the Java Language Specification and the Java Virtual Machine Specification and provides the Standard Edition of the Java Application Programming Interface.
Appium is an open-source project and ecosystem of related software, designed to facilitate UI automation of many app platforms, including mobile (iOS, Android, Tizen), browser (Chrome, Firefox, Safari), desktop (macOS, Windows), TV (Roku, tvOS, Android TV, Samsung), and more!
1. npm install -g appium@next
2. appium driver install xcuitest
3. appium driver install uiautomator2
4. Start appium:
appium —relaxed-security —base-path /wd/hub
emulator -avd Native_API_33 -writable-system -noaudio -no-cache -no-snapshot-save
127.0.0.1 localhost
::1 ip6-localhost
10.0.2.2 home.tc.loc
10.0.2.2 api.tc.loc
127.0.0.1 home.tc.loc
127.0.0.1 api.tc.loc
1. adb root
2. adb remount
3. adb push /Users/user/Desktop/andHost /etc/hosts
Navigate to WDIO project and find any test then copy the command and run it via terminal.
Each test has a description with a command but additional commands can be found in package.json
We're excited to have you join as our new Automation QA wizard 🧙♂️. Your skills will make a big impact on our mobile project. Let's make this journey as fun and successful as possible!