โš™๏ธConfiguration Page

The Mobile configuration page for automation testing is utilized for managing:

  1. Default Configuration

  2. Add Mobile App Details

  3. ADD DEVICE (ONLY FOR SERVER & CLIENT EXECUTION)

  4. Integrate External Tools into our System

  5. Cloud server setup

  6. Cleanup Reports

  7. Rename/Delete Test Component

  8. Move Your Test Scripts

  9. Add Your Locator For Mobile Element Identification

  10. Set up tag For Automatic Mobile Element creation

  11. Database Details

The behavior of mobile configuration is exactly similar to the web configuration page.

โš™๏ธConfiguration Page

Defeualt Configuration

Run at *

Run at field is used to set the default execution platform. Currently, it shows three values: a. Server: This value can be used when infrastructure is hosted on-premise. b. Client: This value is used when execution happens on a local mobile. c. SauceLabs: We can also run the test script on a different cloud server, such as Sauce Labs."

Platform*

In the Platform section, we can select the default platform as either Android or iOS

ADD MOBILE APP DETAILS

The 'ADD MOBILE APP DETAILS' section is used for adding environment details and uploading the application APK or IPA file corresponding to each environment. To add a new environment, click on the 'Add' button. A new row will be added; enter the environment name and upload the application file for Android and iOS in their respective platform sections. Finally, click the 'Save' button.

In the case of the default platform being set to 'Server,' it is required to download the APK file onto the server. After selecting the radio button for the desired environment, the 'Choose File' option will be displayed. Using this option, you need to upload the application file. Please note that this activity is specifically designed for the 'Server' execution mode

To delete an environment, select the radio button corresponding to the one you want to delete. Click on the 'Delete' button, followed by clicking the 'Save' button. This will remove the environment from the server.

ADD DEVICE (ONLY FOR SERVER & CLIENT EXECUTION)

The 'ADD DEVICE' section is only used when this solution is on-premises, or if you want to run test scripts on your local mobile device.

๐Ÿ“ฑConnect with local mobile

Cloud Server configuration example

We can execute our tests on a cloud server platform. On the configuration page, we can set up cloud details and add device information as an example.

{
  "hostname": "ondemand.eu-central-1.saucelabs.com",
  "port": 443,
  "baseUrl": "wd/hub",
  "user": "oauth-qabunchcreatorlo-11c38",
  "key": "mysecretkey",
  "maxInstances": 1,
  "Android": {
    "Emulator": {
      "appium:app": "storage:filename=mda-2.2.0-25.apk",
      "appium:deviceName": "Android GoogleAPI Emulator",
      "appium:platformVersion": "15.0"
    }
  },
  "iOS": {},
  "connectionRetryCount": 1
}

There may be cases where the Host name and other parameters are dynamic. In such cases, common test data can also be passed using an alias.

"hostname": "c.myServerName"

Sometimes, Appium does not launch the driver correctly. If this happens, we can increase the connectionRetryCount value so that, if the application is not launched properly, it will retry.

"connectionRetryCount": 5

If any additional device information is required, it can be directly added under the device section.

By default, when Appium does not receive any request within 60 seconds, the driver instance gets automatically closed. However, during testing, there might be cases where we need to wait longer. In such cases, the newCommandTimeout can be specified under the device section.

{
  "appium:app": "storage:filename=mda-2.2.0-25.apk",
  "appium:deviceName": "Android GoogleAPI Emulator",
  "appium:platformVersion": "15.0",
  "newCommandTimeout": 180
}

Last updated