BrowserStack IntegrationBrowserStack Integration to Execute Mobile App Automation Scripts for iOS Devices

BrowserStack Integration to Execute Mobile App Automation Scripts for iOS Devices

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

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 the App Automate option.
    BrowserStack Products menu with App Testing and App Automate options highlighted
  • In the Getting Started page, click the Access Key dropdown arrow to view the registered username and password, as shown. Click the copy icon to copy the username and password.
    BrowserStack dashboard with Access Key tab and masked User Name, Access Key fields numbered for steps

Integrating algoQA with BrowserStack

Launching your app in the selected device

Perform the following:

  1. In the Dashboard page, click the Upload icon to upload the IPA file for iOS.
  2. In the popup window, click the copy icon to copy the AppKey for the uploaded app.

Configuring the ApplicationSettings.xml file in the algoQA-generated script folder

Perform the following:

  1. Navigate to the algoQA Platform by entering https://algoshack.com/ and sign in with the appropriate credentials.
  2. In the Scenario List screen, click the Generate button. Follow the onscreen instructions to generate the scripts.
  3. After generating the Python Appium scripts, navigate to the script downloaded folder to open the ApplicationSettings.xml file. For example, you can find the ApplicationSettings.xml file in an algoQA-generated script folder for mobile automation available at
    C:/Users/apple/Downloads/AlgoAFScript_202412190928871000/features/temp -f pretty "/Users/apple/Downloads/AlgoAFScript_202412190928871000/features"
    
  4. In the ApplicationSettings.xml file, update the following as shown in the example table:
    FieldDescription
    deviceNameiphone 14
    automationNameXCUITest
    PlatformNameiOS
    PlatformVersion16
    Username<username>
    Access key<accesskey>
    BrowserStackAppKey<BrowserStackAppkey>
    Testing EnvironmentBrowserStack
    AutomationTypeIOSApp
    ApplicationSettings XML file with iOS device fields and BrowserStack username and access key
  5. Navigate back to the pom.xml directory and open Terminal in the same directory.
  6. Run the following command to execute the Python Appium script:
    If you choose to execute Java Appium scripts, run the 'mvn test' command.
    

Triggering the build in BrowserStack

Perform the following:

  1. Make sure the .ipa file is uploaded. When the build is triggered after running the command for the algoQA-generated scripts in the command prompt, scripts are executed in BrowserStack.
  2. The system captures the recording of the steps. You can download the video or view the video.

Make sure to create the test scenario from the same app uploaded in algoQA.