Installing Mobile Testing Requirements

This guide helps you to setup the environment for testing mobile applications using useMango.

Prerequisites

Certain prerequisites are to be fulfilled before starting the test environment. This section helps you to install and prepare them. The prerequisites are:

  • Java
  • Android Studio
  • Appium
  • useMango
  • Ruby Devkit
  • MSYS2
  • Ruby Gems

Java

Java is needed for Android Studio and Appium to work. Follow the below steps to install Java.

  1. Download and install Java Development Kit (JDK). While installing note the directory where it is installed.
  2. Setup below environment variables.
    Variable Example Value
    JAVA_HOME C:\Program Files\Java\jdk-11.0.16
    ANDROID_HOME C:\Users\<user-name>\AppData\Local\Android\Sdk
    Path %JAVA_HOME%\bin

Android Studio

Android Studio is needed to create and run Android Virtual Devices (AVD). Follow the below steps to install Android Studio.

  1. Download and install Android Studio in C:\tools\google\android folder. (Create the required folders if not present)
  2. Complete the setup until SDK is installed.
  3. Start Android Studio.
  4. Open Android Virtual Device Manager.
  5. Create the default device offered by the AVD Manager. Tip: The default device created could be Pixel_3a_API_30_x86.

Appium

Appium is needed to run the tests on the Android Virtual Device. Follow the below steps to install Appium.

  1. Download and install Appium Desktop in C:\tools\jsfoundation\appium folder. (Create the required folders if not present)

useMango

useMango is required to test mobile applications. Follow the below steps to install useMango.

  1. Download and install.
  2. Open useMango.
  3. Open at least one project for all the Ruby Gems to get installed automatically.
  4. Close useMango.

Ruby Devkit

Devkit is required to install Ruby Gems required to test mobile apps. Follow the below steps to install Ruby Devkit.

  1. Download Ruby DevKit 4.5.0-20100819-1536 version from Ruby Download Archives.
  2. Extract it to a folder. (File will be a .exe file)
    • Tip: Extract to C:\Users\<username>\AppData\Roaming\useMango\Ruby\devkit directory. Replace <user-name> with your name as found in the directory structure.
  3. Open command prompt.
  4. Change directory to where devkit exists.
    • cd "%appdata%\useMango\Ruby\devkit"
  5. Execute below command as shown below:
    • "%appdata%\useMango\Ruby\<latest-ruby-folder>\bin\ruby" dk.rb init
    • Tip: Replace <latest-ruby-folder> with the latest ruby folder name(something like ruby-3.0.4).
  6. Open the newly created file config.yml in an editor.
  7. Add below lines after the comments (lines starting with # symbol is commented). Content of config
    • Tip: Replace <username> with your name as found in the directory structure.
  8. Go to Command Prompt window to execute below command:
    • "%appdata%\useMango\Ruby\<latest-ruby-folder>\bin\ruby" dk.rb install
  9. Close the Command Prompt window.
  10. Append Ruby Dev Kit paths to the environmental variable PATH for the specific user.
    • C:\Users\<username>\AppData\Roaming\useMango\Ruby\devkit\bin
    • C:\Users\<username>\AppData\Roaming\useMango\Ruby\devkit\mingw\bin

MSYS2

MSYS2 is required to install Ruby Gems required to test mobile apps. Follow the below steps to install MSYS2.

  1. Open Command Prompt.
  2. Download MSYS2 from here
  3. Install MSYS2 and Open it
    • Execute this command in the msys2 shell pacman -Syu

Ruby Gems

Additional Ruby Gems are required to test mobile apps. Follow the below steps to install Ruby Gems.

  1. Open Command Prompt and change directory as shown below.
    • cd C:\Users\<username>\AppData\Roaming\useMango\Ruby\<latest-ruby-version>\bin
    • gem install rake
    • ridk install
    • gem install appium_lib:11.2.0
    • gem uninstall eventmachine
    • gem install eventmachine --platform ruby