Testing with Android Studio and XCode
- The first step is to download AndroidStudio from the official website.
- Install an application.
- Launch the installed application.
- Click “More Actions”

- Click on “Virtual Device Manager”

- To create a new device click “Create Virtual Device”

- Choose the appropriate one from the list of all available devices and finish the process of setting up.
- Launch the emulator

- After Android installation emulator is ready to be used.
Additional steps for native apps:
- Launch the emulator and download the application from the Play Market or download it from third-party resources
- Run the downloaded application and open Logсat
- Clear logs on the left
- Enter the command in the search engine .android.intent.action.MAIN.
- Find in the logs the value cmp=com We need this value in the config file

About config:
deviceName
– field that represent the name of the emulator. It is setted up automatically by defaulted as the name of the device and API versionplatformVersion
– version of the Android that is installed on the deviceudid
– Unique Device Identifier. Emulator-5554 is default UDID for an Android device.appPackage
– App package nameappActivity
– app activity that found in 14 steps or if it does not work, then you can download the "apk info" application to the device and find an activity with the name MainActivity or HomeActivity
<deviceName>Pixel 5 API 31</deviceName>
<platformVersion>15.0</platformVersion>
<udid>emulator-5554</udid>
<appPackage>com.todoist</appPackage>
<appActivity>com.todoist/.alias.HomeActivityDefault</appActivity>
Launching iOS simulator
- Download xcode.
- Install it
- Click on Xcode on toolbar

- Click on “Open developer tool” and there choose simulator

- Click on “File” and choose “Open simulator”. Choose iOS version and proper device. Click on that device.

- After loading of the iOS. Simulator is ready to be used
To get UDID of the iOS simulator you need to go back to Xcode. On the tool bar choose “Window” and choose there “devices and simulators”

Click on the “simulators”, choose needed simulator and get its UDID

Simulator connection to Appium
To connect Testlum to the simulator you need to use additional software – appium server.
- Download and install it.
- Launch it

- Set up connecting in the config file in Testlum:
<connection>
<appiumServer>
<serverUrl>http://127.0.0.1:4723/</serverUrl>
</appiumServer>
</connection>
Where 4723 – a port number that can be changed.
- Click on “Edit configuration”.

- Provide path to Java and Android SDK (this folder can be found after installing Android Studio) if they are not declared as global home variables

- Click “Save and Restart”
- Run simulator and start Appium server - Android testing ready to use.

If there is a driver error when launching the emulator for a mobile browser, the following will help you
- You need to go to the site https://chromedriver.chromium.org/downloads and download your version of your Chrome driver in the emulator
- The downloaded Chrome driver needs to be thrown into this path

- Now save your changes
Save As Preset
and your saved config will show up inPreset

- Run the simulator and start the Appium server - Android testing ready to use.
For iOS testing, it is needed to download appium web driver agent.
- Choose the latest release download it and unzip it.
- Go to the Appium server. Right-click on it, choose “Show package content”
- Open “Contents”
- Open “Resources”
- Open “App”
- Open “Node modules”
- Open “Appium”
- Open “Node modules”
- Here delete all old files in appium-webdriveragent and paste new ones from that folder which was downloaded in the first step
To finish setting up just relaunch Appium server. Start Appium server, fill in the config and the iOS simulator is ready for the test.