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
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.
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.
Parameter Name: any
Parameter Value: Application File (.ipa/.apk)
Example using Curl:
curl -s --user email@example.com:pas$w0rd -F myAppFile=@"/Users/username/Documents/BitbarIOSSample.ipa" "http://appium.testdroid.com/upload"
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.
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‘.
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)
Add ‘testdroid_’ Desired Capabilities in addition to these Capabilities.
4. Point the WebDriver to http://appium.testdroid.com/wd/hub
5. Run the TestScript
6. Get results from Web UI
and Appium.log from the Web UI
More detailed information about Appium setup can be found here.
Learn all the basics about Appium, how to set it up and how to use it for mobile app testing.Download