How to run android application on Sauce labs

Sauce labs – Cloud-based platform for automated testing of web and mobile applications. Access web browsers, mobile emulators and simulators, and real mobile devices.

Let’s see how to run an android apk using sauce lab.

Step 1 : Create your sauce lab account. Here do not use @ in your username.
Step 2 : Login into the Sauce lab account and get your access key. You can get it from account information.
Step 3 : Install Curl on your system. It will help you to upload your android or iOS file on the Sauce system.
For windows —
Step 4: Open a terminal and give the path where curl is downloaded
Step 5 : First command to upload the file on sauce lab :

Step 6 : Once the file is uploaded check if it is successfully uploaded to your sauce lab account

Step 7 : Open IDE, I am using Eclipse and add selenium and testng jar files in your project.
Step 8 : To get the desired capabilities, select your requirement and get the capabilities using this link –
Step 9 : Below is my code.

Step 10: Once the above step is done, you can execute the test and it will be visible in your sauce lab account.