Testing with Android Studio and XCode

  1. The first step is to download AndroidStudio from the official website.
  2. Install an application.
  3. Launch the installed application.
  4. Click “More Actions”
  1. Click on “Virtual Device Manager”
  1. To create a new device click “Create Virtual Device”
  1. Choose the appropriate one from the list of all available devices and finish the process of setting up.
  2. Launch the emulator
  1. After Android installation emulator is ready to be used.

Additional steps for native apps:

  1. Launch the emulator and download the application from the Play Market or download it from third-party resources
  2. Run the downloaded application and open Logсat
  3. Clear logs on the left
  4. Enter the command in the search engine .android.intent.action.MAIN.
  5. 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 version
  • platformVersion – version of the Android that is installed on the device
  • udid – Unique Device Identifier. Emulator-5554 is default UDID for an Android device.
  • appPackage – App package name
  • appActivity – 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
XML
Copy

Launching iOS simulator

  1. Download xcode.
  2. Install it
  3. Click on Xcode on toolbar
  1. Click on “Open developer tool” and there choose simulator
  1. Click on “File” and choose “Open simulator”. Choose iOS version and proper device. Click on that device.
  1. 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.

  1. Download and install it.
  2. Launch it
  1. Set up connecting in the config file in Testlum:
XML
Copy

Where 4723 – a port number that can be changed.

  1. Click on “Edit configuration”.
  1. 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
  1. Click “Save and Restart”
  2. 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

  • Now save your changes Save As Preset and your saved config will show up in Preset
  • 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.

  1. Choose the latest release download it and unzip it.
  2. Go to the Appium server. Right-click on it, choose “Show package content”
  3. Open “Contents”
  4. Open “Resources”
  5. Open “App”
  6. Open “Node modules”
  7. Open “Appium”
  8. Open “Node modules”
  9. 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.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard