How can I run selenium tests on browserstack.com? How can I run selenium tests on browserstack.com? selenium selenium

How can I run selenium tests on browserstack.com?


BrowserStack.com now supports selenium testing end to end under the name Automate. There is a documentation to help you get started with sample code of quite a few programming languages. As with other products, tunnel and several other features are already integrated.

Full disclosure: I work for BrowserStack.com.


I don't think it's possible at this time...

Their localhost testing doc gives an example of how their command line works:

Command line interface

java -jar BrowserStackTunnel.jar TI3PnSeogaDEcwSyiSzm localhost,3000,0

In my experience with selenium, that doesn't leave any way of launching the selenium test.

Here's an example of how I call a selenium test:

java -Dpfile="../properties/ff-test.properties" -jar ../runselenium.jar ca.myorg.tests.HappyPathTest 

I just received an email from them that promised full support for selenium sometime next month (May, 2013):

We are working on implementing full scale automated testing including Selenium and expect it to be released sometime next month. We will notify you personally once done.

Hope this helps.


Currently it is really easy to run automatic tasks on Selenium. Browserstack created really nice documentation (which covers different languages). For instance here is the way how you need to do this for C#. So all you need is to modify a little bit your selenium tests, get your API-key (if you will subscribe to a this service it will be already on the page) and select OS/Browser/Device you want your tests to be done.

using System;using OpenQA.Selenium;using OpenQA.Selenium.Remote;namespace SeleniumTest {  class Program {    static void Main(string[] args) {      IWebDriver driver;      DesiredCapabilities capability = DesiredCapabilities.Firefox();      capability.SetCapability("browserstack.user", "USER_ID");      capability.SetCapability("browserstack.key", "API_KEY");      driver = new RemoteWebDriver(        new Uri("http://hub.browserstack.com/wd/hub/"), capability      );      driver.Navigate().GoToUrl("http://www.google.com/ncr");      Console.WriteLine(driver.Title);      IWebElement query = driver.FindElement(By.Name("q"));      query.SendKeys("Salvador Dali");      query.Submit();      Console.WriteLine(driver.Title);      driver.Quit();    }  }}

As you see, everything is almost the same as your selenium test. You can also create screenshots from selenium as well as with their screenshot API