...
Once all these components are installed , and you set some environment variables and then , your system is ready for test case executions.
...
In order to test mobile applications on emulator or physical device, you need to use Android command line tools. The command line tools can be downloaded using the following simple steps.
To install Android command line tools:
- Open the URL: https://developer.android.com/studio/index.html
- Scroll down to bottom.
- In the Get just the command line tools section, download the latest version of SDK tools package for Windows.
- Once downloaded, unzip the file and go to tools > lib.
- Copy AVD Manager.exe and SDK Manager.exe and place it where you have unzipped the original set up file (if not present).
- Launch SDK Manager.
- In the Tools section, select Android SDK Tools and Android SDK Platform-tools.
- Select required Android APIs (if you want to create emulators).
Note: Appium supports API level 17 and above. - In the Extras section, select Intel x86 Emulator Accelerator (HAXM Installer) and Google USB Driver.
Note: If it is not compatible with Windows, install it separately. Click the Install xx packages... button.
Expand title View Image
...
- Download the Intel® HAXM and unzip the downloaded file.
- Double-click the intelhaxm-android file.
This opens Intel® Hardware Accelerated Execution Manager Setup wizard. - Click Next.
Here you can define how much system memory (RAM) you want to reserve for Intel® HAXM. By default, 2.00 GB is reserved. - Change the reserved memory, if required and click Next.
- Click Install.
Post After successful installation, open the Command Prompt window and run the command; sc query intelhaxm.
If State is shown as running, Intel® HAXM is running properly.Expand title View Image Note - When creating emulators, ensure that you have selected CPU/ABI as Intel x86 for superior performance of emulator through Intel® HAXM.
- If you are facing any issues when installing or using Intel® HAXM, click here for troubleshooting.
Creating Android Virtual
...
Devices (AVDs)/Emulators
An Android Virtual Device (AVD) manager allows you defining to define characteristics of Android devices you want to simulate in the Android Emulator. The AVD Manager helps you to create and manage Android Virtual Devices. The AVD Manager comes bundled with some predefined hardware profiles, such as Nexus phone devices and you can define and import hardware profiles as per the requirements. The AVD Manager allows you to manage all your AVDs in one place.
...
To set Environment Variables:-
- From desktop, right-click the Computer icon.
- Select Properties from the context menu.
- In the left pane, click Advanced System Settings.
- On the System Properties window, click Environment Variables.
- In the User Variables section, create new variable as ANDROID_HOME and set its path where you have unzipped the Android command line tools and then click OK.
Note: The Android_Home path should not contain any white spaces. - If Java_Home is not already set, double-click the JAVA_HOME variable, type the path to JRE/JDK and then click OK.
- In the System Variables section, select the PATH variable and type the path to 'Platform-tools' from the folder where command line tools are saved.
For example: D:\Android\platform-tools; - Click OK.
...