New Functionality Added to Appium Client-Side Execution on Bitbar Cloud

Bitbar Appium Broker - testdroid_multiSessionWait

As Appium is a popular framework for cross-platform app testing, many platforms provide the Appium Server-Side execution to help improve test efficiency. But  Appium Client-Side execution also plays a critical role for many teams to validate Appium tests for specific reasons. And what makes Bitbar Cloud stand out is that our platform is one of few mobile device testing clouds that has support for Appium Client-Side execution. And we’ve taken its capabilities further – testdroid_multiSessionWait is now available.

Simply put, your Appium Client-Side test execution can be stopped and new tests will start without having to ask for a new broker session. The support for this functionality is enabled by default and there can be up to a minute break between the stoppage of the first test and the commerce of the second one during the same broker session. This timeout duration is configurable by the testdroid_multiSessionWait Appium capability. Details are explained in our online docs.

Get started with successful Appium mobile app testing with the help of this  free guide

Here’s an example (Python) of what should be done in the test. Note that the testdroid_multiSessionWait is required for supporting multiple sessions in one test run.

def setUp(self):
    self.appium_url = ''
    self.desired_capabilities_cloud = {}
    self.desired_capabilities_cloud['testdroid_apiKey'] = testdroid_apiKey
    self.desired_capabilities_cloud['testdroid_target'] = 'safari'
    self.desired_capabilities_cloud['testdroid_multiSessionWait'] = 40

    self.driver = webdriver.Remote(self.appium_url, self.desired_capabilities_cloud)
    # some test steps before quitting the session

    # restart a new session

    # some test steps before quitting the session

And the related sample execution log is from our Safari Python sample on Github.

Here the test ended first time at “09:57:22 Quitting” and then the test restarted again (In real scenario the second run would probably do other stuff than the same thing again and again).

testSample (testdroid_safari.TestdroidSafari) ... Searching available iOS device... 
Found device 'Apple iPad Air A1474 10.2 ( trial device )'

Starting Appium test using device 'Apple iPad Air A1474 10.2 ( trial device )'

09:53:02: Will save screenshots at: /tmp/screens
09:53:02: WebDriver request initiated. Waiting for response, this typically takes 2-3 mins
09:56:58: Loading page
09:57:02: Taking screenshot: 1_home_screen.png
09:57:05: Switching to landscape
09:57:08: Taking screenshot: 2_home_landscape.png
09:57:11: Switching to portrait
09:57:13: Taking screenshot: 3_home_portrait.png
09:57:16: Finding button with text 'Click for answer'
09:57:16: Looking for xpath //button[contains(., "Click for answer")]
09:57:18: Clicking on button
09:57:18: Taking screenshot: 4_answer.png
09:57:21: Check answer text
09:57:21: Verify button changed color
09:57:22: Quitting
09:57:22: WebDriver request initiated. Waiting for response, this typically takes 2-3 mins
09:57:37: Loading page
09:57:39: Taking screenshot: 5_home_screen.png
09:57:42: Switching to landscape
09:57:44: Taking screenshot: 6_home_landscape.png
09:57:48: Switching to portrait
09:57:51: Taking screenshot: 7_home_portrait.png
09:57:54: Finding button with text 'Click for answer'
09:57:54: Looking for xpath //button[contains(., "Click for answer")]
09:57:55: Clicking on button
09:57:55: Taking screenshot: 8_answer.png
09:57:58: Check answer text
09:57:59: Verify button changed color
09:57:59: Quitting

The Beginner’s Guide of Using Appium for Mobile App Testing

Learn all the basics about Appium, how to set it up and how to use it for mobile app testing.