# Setup emulators on Android Studio for automation in SimplifyQA

Using Android emulators in Android Studio allows testers to execute automated test cases without needing a physical device. This setup ensures that applications are tested across different device configurations, screen sizes, and OS versions.&#x20;

Below are the steps to configure an emulator and integrate it with SimplifyQA for automation.

### Prerequisites

Before setting up the emulator, ensure the following:

* **Android Studio is installed** on your system.
* **Android SDK and Virtual Device Manager** are configured.
* **QAWizard is stopped** to prevent execution conflicts.

### Launching the Virtual Device in Android Studio

1. Open Android Studio and navigate to the home screen.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2FXB4a7mCVSu5fBtfRWLuM%2FHomepage.png?alt=media&#x26;token=a41569ff-33f6-4a1f-8def-78aa7b98529d" alt=""><figcaption></figcaption></figure>

2. Click on the "**More Actions"** dropdown and select "**Virtual Device Manager"**.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2FMHQbiDWnYFHxzRbfJvXL%2FVirtual%20device%20manager.png?alt=media&#x26;token=58f39236-b0c4-4781-b963-340085035381" alt=""><figcaption></figcaption></figure>

3. By default, a virtual device will be available in the list.
4. Click on the **three-dot menu** next to the listed device and select "**Cold Boot"** (preferred) or directly click on the "**Run"** icon.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2F9D8jDmN4LH20alka7R3A%2Fcold%20boot.png?alt=media&#x26;token=1f9e426e-222b-4307-b36a-ee0795308fb1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2Fd9OnF07tbQm18AY65aUZ%2Frun%20icon.png?alt=media&#x26;token=30e9fce3-a75a-4e4c-a5bf-0f7c5e887146" alt=""><figcaption></figcaption></figure>

5. The emulator will launch and be ready for testing.

### Connecting the Emulator with SimplifyQA

1. Once the emulator is running, **open the SimplifyQA application**.
2. Click on the **Connect Devices** icon.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2F0rqZ6SxrDwnaxCCjNsUl%2Fconnect%20devices%20icon.png?alt=media&#x26;token=0ddefa70-8cf0-4753-86e5-e059f07f16b8" alt=""><figcaption></figcaption></figure>

2. Switch to the **Virtual Device** tab.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2F6RJRRVBPXdS7xDqauijR%2Fvirtual%20device%20tab.png?alt=media&#x26;token=083dc5d6-173e-4240-9ceb-1023ab7514a2" alt=""><figcaption></figcaption></figure>

3. The emulator name should now be listed under the available devices.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2FLgfSHsDeBTtvTrKojvhl%2Femulator.png?alt=media&#x26;token=9a529583-27cb-4e7e-b1bc-25b232e8f2a6" alt=""><figcaption></figcaption></figure>

### Adding a New Emulator in Android Studio

If you need to test on different devices, follow these steps:

1. Navigate to "**More Actions** → **Virtual Device Manager"**.
2. Click on the **"+"** icon to add a new emulator.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2FRUntxjcGshafvO5XlByy%2Fadd%20icon.png?alt=media&#x26;token=96c33dd6-31c0-4d10-bbe6-2df156b298b3" alt=""><figcaption></figcaption></figure>

3. From the left panel, choose the **device type** (Phone or Tablet). \
   Example: Select Phone for mobile testing.
4. Select the desired **device model** and click **Next**.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2FwROKC5i1MvBxVCKwRy4w%2Fnext%20button.png?alt=media&#x26;token=52e5c638-5a3c-435b-844a-d34b2641abdb" alt=""><figcaption></figcaption></figure>

5. If required, **download additional system images or packages** (confirm the popup)

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2Fpm6GSjeVwf818uuNiaZc%2Ffinish.png?alt=media&#x26;token=dfe24551-8ad3-48d1-b1d1-9865c9ccf5bc" alt=""><figcaption></figcaption></figure>

6. Once the download is complete, click **Finish**.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2FLgmI6sGKVKKEvkqLMqoE%2Fclick%20finish.png?alt=media&#x26;token=8f6fc7c9-a8e5-4f95-a582-a56dfc58ec29" alt=""><figcaption></figcaption></figure>

6. The new emulator will now be listed in the Device Manager and available for automation in SimplifyQA.

<figure><img src="https://2640723101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMxErCxeVwmOt7GY9s22U%2Fuploads%2FrqDqVuw5fkV6bg57XwWB%2Fnew%20device%20added.png?alt=media&#x26;token=74192a0e-9bb6-4b57-91d7-3f97b766d321" alt=""><figcaption></figcaption></figure>

By setting up emulators correctly, teams can efficiently perform automated testing across multiple Android devices, ensuring application stability and compatibility.

### Frequently Asked Questions (FAQs)

<details>

<summary>My emulator is not showing up in SimplifyQA. What should I do?</summary>

If the emulator is not listed under **Virtual Devices** in SimplifyQA:

* Ensure that the emulator is running in Android Studio.
* Restart the SimplifyQA application and click on Connect Devices again.
* Make sure QAWizard is stopped before launching the emulator.
* Check if the ADB (Android Debug Bridge) is enabled and running correctly.

</details>

<details>

<summary>Can I test different screen sizes and Android versions using emulators?</summary>

Yes, you can add multiple emulators with different screen sizes and OS versions in Virtual Device Manager. This helps in testing application compatibility across different Android devices.

</details>
