Running Appium tests in Browserstack Cloud

Some important points

  1. Register with Browserstack
  2. You will get Account Key to run automated tests on real devices
  3. Send commands to cloud server (Hub running in Selenium grid)
  4. You can access the video recordings of tests as well
  5. You will have to upload the apps to Browserstack server
  6. If you are accessing resources through local network, you will need to create a tunnel to Browserstack servers as well by running local binary.

You can refer for more details - In the Same way, we can run appium tests in other cloud providers like Saucelabs as well. Below code demonstrates how you can run appium tests in Browserstack cloud.
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.util.concurrent.TimeUnit;

 * Created by Sagar on 10-07-2016.
public class BrowserStackTest {
    AndroidDriver driver;
    public void test1() throws Exception{
        String userName = "USERNAME";
         String accessKey = "ACCESS_KEY";

             DesiredCapabilities caps = new DesiredCapabilities();

            caps.setCapability("device", "Samsung Galaxy S10 Plus");
            caps.setCapability("os_version", "10.0");
            caps.setCapability("project", "BS Project");
            caps.setCapability("build", "BS Build");
            caps.setCapability("name", "BS  Test");
            caps.setCapability("app", "bs://app-url");

            AndroidDriver driver = new AndroidDriver(new URL("https://"+userName+":"+accessKey+""), caps);

            driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);



}catch (Exception ex) {

}finally {



Youtube | Facebook | Twitter | Website Home | Online Grocery Shopping Brisbane