BrowserStack Integration to Execute Mobile App Automation Scripts for Android Devices

Modified on Fri, 24 Jan at 2:04 PM

Applies to Mobile App Automation using Java Appium frameworks for Android devices.


TABLE OF CONTENTS

1. Overview

2. Prerequisites 

3. Integrating algoQA with BrowserStack

3.1 Launching your app in the selected device

3.2 Configuring Application Settings file in the algoQA script generated folder

3.3 Triggering the build in BrowserStack

1. Overview

This article provides you the instructions on how to integrate algoQA with BrowserStack for performing mobile test automation for Android devices. It includes prerequisites, configuring the necessary files, running the tests, and monitoring the results. 

2. Prerequisites 

  • Make sure you have installed appropriate versions of  Java, Maven and Appium. Maven environment variables are set and  Maven bin is added to the system path.
  • Make sure you sign up to perform mobile test automation in BrowserStack.
  • In the Dashboard page, click Products >App Testing and then select App Automate option as shown:
  • In the Getting Started page, click  Access Key drop down arrow to view the register username and password as shown. click copy icon to copy username and password.

3. Integrating algoQA with BrowserStack

3.1 Launching your app in the selected device

Perform the following:

  1. In the Dashboard Page, click the Upload icon to upload the APK file for Android, as shown:
  2. Click copy icon to copy the AppKey from the uploaded App.

3.2 Configuring Application Settings file in the algoQA script generated folder

Perform the following:  

  1. Navigate to algoQA Platform by entering https://algoshack.com/ and Sign in with appropriate credentials.
  2. In the Main Canvas, click Generate Script button.  Follow the onscreen  instructions to generate the scripts.
  3. After generating the algoQA scripts, navigate to the script downloaded folder to open Application Settings File.  For example, 
    you can find Applications.XML file in an algoQA script generated folder for mobile automation available at  
    Path:
    C:\Users\Admin\Downloads\ScriptGeneration_202412240520726000\AlgoAFScript_202412240520726000\src\test\java for Java Appium
  4. In the Applications Settings file, update the following details manually as shown in the example table:
    You can find the Username, Access Key, App ID or Key from the prerequisites steps. Name of the device, Platform Name and version depends whether you are using Android or iOS.

    Field Details 
    deviceNameSamsung Galaxy S22 Ultra
    PlatformNameAndroid 
    PlatformVersion12
    Usernameparimalapraveen_o3Jn6F 
    Access keyvugsVEtsyZcVsGnvF1cy 
    BrowserStackAppKey bs://29a86e8aa2574c0b42cd9f3efd75c96efc165554 
    Testing Environment Browserstack
    AutomationType AndroidApp
    AutomationNameuiautomator2
  5. Navigate back to pom.xml directory and open 'Command Prompt' in the same directory.
  6. Run the following command to execute the script. The script folder may vary depending on where you have generated the scripts.
    If you choose to execute scripts for Java Appium, then run 'mvn test' command.

3.3 Triggering the build in BrowserStack

Perform the following:

  1. Make sure APK file is uploaded. When the build is triggered after running the command for the algoQA generated scripts in command prompt, scripts are executed in the BrowserStack.
  2. The System captures the recording of the steps. You can download the video or view the video, as shown:
Note: If you don't have an existing APK file, then you can use the sample file from the BrowserStack. Ensure to create the test scenario from the same app uploaded. 










Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article