LambdaTest Out Of Box IntegrationLambdaTest Integration to Execute Mobile App Automation Scripts for iOS Devices

LambdaTest Integration to Execute Mobile App Automation Scripts for iOS Devices

This article provides instructions on how to integrate algoQA with LambdaTest 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 an appropriate licensed version (Native App trial version) to perform mobile test automation in LambdaTest.

  • Upon obtaining the license, log in with your credentials and navigate to the Dashboard page, click the icon in the top-right corner to view the access key. Your username will be displayed alongside the registered username. For example, if your registered username is John Davis, it will appear as "John Davis" in place of 'username'.

    LambdaTest Connection Details popup with Hub, Username and Access Key fields, Access Key icon highlighted
  • Alternatively, you can access the Username and Access key by clicking the key icon available on the left pane and copy the username and access key by clicking the copy icon.

    Credential popup showing Username and Access Key fields with copy icons highlighted
  • You must fetch the APP ID details.

    To access LambdaTestAppKey in LambdaTest, click the settings icon next to the uploaded IPA file after navigating to the App testing screen.

    Uploaded Apps list with settings gear icon highlighted next to proverbial_ios.ipa

    The Settings window appears where you can find the LambdaTestAppKey.

    App Settings dialog with App Id field highlighted and copy icon, Save Changes button
  • You can find the device name and Platform version in the App Testing screenshot. This is the name of the chosen device in LambdaTest where the scripts will be executed. For more details, refer to step 5 screenshot in the next section.

Integrating algoQA with LambdaTest

Launching your app in the selected device

Navigate to App Testing from the left panel.

Click the iOS icon.

Click the Upload button to upload your respective IPA file, then select the required device brand and device.

Click the Start button to start the build.

You can launch your app in the selected device where you can perform your testing.

In this case, a sample app is considered.

LambdaTest App Testing page with iOS app upload and Start button highlighted by numbered steps

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
    UsernameParimala.bc
    Access keyHyDKmA3cf32RImwztkupVWUrZJFLFLWWyMRghDrUvNPSJXKymm
    LambdaTestAppKeylt://APP1016040971727694151489425
    Testing EnvironmentLambda
    AutomationTypeIOSApp
    ApplicationSettings XML file with deviceName, platformName, platformVersion and LT_ACCESS_KEY fields
  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:
    behave -f allure_behave.formatter:AllureFormatter -o /Users/apple/Downloads/AlgoAFScript_202412190928871000/features/temp -f pretty "/Users/apple/Downloads/AlgoAFScript_202412190928871000/features"
    
    If you choose to execute Java Appium scripts, run the 'mvn test' command.
    

Triggering the build in LambdaTest

Perform the following:

Navigate to App Automation from the left pane by selecting Automation.

LambdaTest sidebar with Automation menu item highlighted

Repeat the steps 5 and 6 from the previous section if the build is not triggered.

When the build is triggered, the system captures the live recording of the steps.

You can perform the following while live recording the steps in LambdaTest:

  • You can view your Network Logs, App Logs, and Device Logs.
  • You can also view XPaths for a particular UI element/control after selecting the UI Inspector feature.
  • With the device controls, you can change the keyboard language, the device orientation, put the device to sleep mode, and increase and decrease the volume.
  • For more information on the preceding topics, refer to the topic in LambdaTest - Realtime Native Mobile App Testing.

If you don't have an existing .ipa file for iOS devices, then you can use the sample file from LambdaTest here. Make sure to create the test scenario from the same app uploaded.