Appium @ Testdroid Cloud

Bitbar, the mobile devops company. Logo, large

appiumMobile_345x180

Moving from your localhost to Testdroid Cloud

If you have been using Appium at your localhost on a real device, switching to Testdroid Cloud is fairly easy. All you need to do is make two changes in your TestScript. If you haven’t been, heres a little introduction how Appium works. You start Appium Server instance on you machine while specifying a connected device’s UDID.

$ appium –port 4723 -U

Next, you instigate your TestScript implementing the Selenium  WebDriver connecting to the Appium Server at http://localhost:4723/wd/hub

Screen Shot 2014-03-10 at 11.17.18

Note that one Appium instance handles only one test session at a time. If you want to test your Android application on multiple devices, you can connect multiple Android devices to your machine, start multiple Appium instances on different ports with different UDIDs, and instigate multiple TestScripts pointing to different ports. Unfortunately however, you cannot do the same for iOS. This is because Appium uses native Instrumentation to communicate with the device, and Instrumentation allows only one device at a time.

At Testdroid Cloud however, you can use over 300+ different Android and iOS devices simultaneously. That’s an awesome platform for testing.

Screen Shot 2014-03-10 at 11.14.25

If you have been using Appium at your localhost on a real device, switching to Testdroid Cloud is fairly easy. All you need to do is make two changes in your TestScript.

→ Change the Remote WebDriver address from ‘localhost:port’ and point it to Testdroid Cloud.
→ Add ‘testdroid_’ Desired Capabilities in addition to the existing Desired Capabilities in your TestScript.

Running your first Appium test on Testdroid Cloud

1. Upload your application (.apk or .ipa) to Testdroid Cloud, or host it yourself a on public URI.

You can use a plain HTTP address like ‘http://domain.com/files/myApp.ipa’ for us to download your application from, or you can upload the application to Testdroid Cloud via command line.

Upload Request:

POST: http://appium.testdroid.com/upload
Authentication: Basic-Auth
Multipart: True
Parameter Name: any
Parameter Value: Application File (.ipa/.apk)

Example using Curl:

curl -s --user username@example.com:pas$w0rd -F myAppFile=@"/Users/username/Documents/BitbarIOSSample.ipa" "http://appium.testdroid.com/upload"

Response:

You’ll receive a JSON in response to the upload request with a Session-ID pointing to your uploaded application on Testdroid Cloud. Save the Session-ID for later use.

“myFile”: “4e31cede-5741-484c-b58d-8a6d04bc03d5/BitbarIOSSample.ipa“.

2. Select a device

Log into cloud.testdroid.com, select a device you want to run your test on, and copy its name. For example ‘iPhone 5c 7.0.4 A1532‘.

Untitled presentation (1)

3. Add the ‘testdroid_’ Desired Capabilities.

In addition to the standard Desired Capabalities you have in your TestScript (for example, the minimum required Caps for iOS are shown in the figure below)

Untitled presentation (6)

Add ‘testdroid_’ Desired Capabilities in addition to these Capabilities.

Blog diagrams (1)

4. Point the WebDriver to http://appium.testdroid.com/wd/hub

Untitled presentation (4)

5. Run the TestScript

6. Get results from Web UI

Untitled presentation (5)

and Appium.log from the Web UI

More detailed information about Appium setup can be found here.


Improve the ROI with the Help of Mobile Test Automation

Learn major cost drivers in mobile testing and how to leverage test automation to improve the ROI.

Download

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close