Mobile Testing – SoliteraTA

SoliteraTA

Mobile Testing

System Configuration #

  1. Installation of java (JDK) – 
    1. Download and install the JDK 1.8 from – Java Downloads | Oracle
    2. Specify the path to your JDK version in the JAVA_HOME environment variable. To do this, open the Control Panel, search for “environment variables”, in the subsequent dialog, click Environment Variables, and then set the variable value:
      • JAVA_HOME       C:\Program Files\Java\jdk-11
  1. Install Nodejs and NPM fromDownload | Node.js (nodejs.org)
  2. Install Appium – 
    1. Run the below command on Command Prompt
      1. npm -g install appium@x.y.z
  3. Install Android Studio from the below link

Android Studio download archives  |  Android Developers

*Remarks –

  1. Please accept the terms and condition of Android Studio and download the below pack

Android Studio Electric Eel | 2022.1.1 Patch 1 January 31, 2023

  1. After Installation Android Studio, Install Android SDK from Configure > SDK Manager and set the path to ‘environments variables’ > ‘System Variables’ as below
    1. ANDROID_HOME –    C:\Users\<User-Name> \AppData\Local\Android\Sdk
      1. <User-Name> – Please replace this word as per your user’s name 
    2. Note – Please check the ANDROID_HOME is updated or not by Command prompt, the Command is below –
      1. echo %ANDROID_HOME% 

Check If you find the same path as given in environments variable then path is set, otherwise you have to re-start you PC.

  1. Add some path into your environment’s variables –
    1. User Variables for <User_Name>
      1. Click on path, add new path and paste it   %USERPROFILE%\AppData\Local\Android\sdk\platform-tools
    2. System Variable 
      • Click on path, add new path and paste it  
        C:\Program Files\Android\Android Studio\bin
  2. Setup the appium drivers:
    •  run the command to install the driver:
      • “appium driver install uiautomator2”
    • Run command to check installed driver:
      • “appium driver list”

Note- Check after running the above command “appium driver list”, If you see this uiautomator2 version then you have successfully installed the driver for execution:

” √ Listing available drivers – uiautomator2@x.y.z [installed (npm)]”

If uiautomator2 is not installed, then run this command to install the uiautomator2

 “appium driver install uiautomator2”

Mobile Phone Configuration #

  1. Open Developer Mode – 
    • Go to your mobile phone setting
    • Click on About phone 
    • Tap 5 times on Build Version until the Developer mode enabled
  2. Enable USB Debugging and others –
    • Go to Developer mode settings
    • Enable USB Debugging
    • Enable Install via USB [enable if exists]
    • Enable USB Debugging (Security settings) [enable if exists]
  3. Connect to USB and check if it is connected with ADB
    • Connect to USB and allow File Transfer/ Android Auto
    • And run command – adb devices

Note:-

  1.  Above id of the device is used as UDID to connect with the same device.
  2.  If adb devices do not appear in the command prompt, please recheck if all the environment variable paths are correctly created or not , if all the paths are correctly created then please restart your system and check the command again.

How to find App_package_name and App_main_activity_name ?

Please connect your device to USB and open the app to find the activity and package name. After doing this, please run a command in Command Prompt.

For Mac/Linux:

adb shell dumpsys window | grep -E 'mCurrentFocus'

For Windows:

adb shell dumpsys window | find "mCurrentFocus"

How to get UDID ?

 Run “adb devices” command in command prompt.

 While installing Android studio, which version should be chosen, like standard or custom ?

 We can choose any of them but preferences is for standard

Which SDK tools are mandatory to install in Android Studio for automating scripts using SoliteraTA tool ?

 These must be installed-

  • Android SDK Build-tools
  • Android SDK Platform-Tools
  • Intel x86 Emulator Accelerator (HAXM installer)

Application File Configuration #

Application file format

<environment>
  <config>
    <name>Configuration_Name</name>
    <type>mobile_application</type>
    <platform_name>Android</platform_name>
    <app_installer_path>Apk_File_Location</app_installer_path>
    <app_package_name>App_Package_Name</app_package_name>
    <app_main_activity_name>App_Activity_Name</app_main_activity_name>
    <grant_permissions>true</grant_permissions>
    <reset_app>true</reset_app>
  </config>
</environment>

Last tested and working version of these supported application are-

  • appium(version-2.5.4)
  • uiautomator2(version- 3.2.0)
  • Android studio (Electric Eel | 2022.1.1 Patch 1 January 31, 2023)

Solitera may collect certain information by automated means, such as cookies and web beacons, when a user visits our website. A “cookie” is a small piece of data that a website can send to your browser, which may then be stored on your system. learn more

Choose your Operating System