Skip to end of metadata
Go to start of metadata

Plugin Information

View BrowserStack on the plugin site for more information.

This plugin allows you to integrate with BrowserStack.


  1. Manage your BrowserStack credentials globally or per build job.
  2. Set up and tear down BrowserStack Local for testing internal, dev or staging environments.
  3. Embed BrowserStack Automate or BrowserStack App Automate reports in your Jenkins job results.


  1. Minimum Jenkins version supported is 1.580.1.
  2. If you are using Java, we support all versions of Java up to Java 9
  3. For viewing BrowserStack Automate report in your Jenkins test results.
    1. Project must be a Java project.
    2. Project must be built with maven and use either TestNG or JUnit for testing.
    3. Jenkin's JUnit plugin must be installed.

Configuring tests

This step is required for viewing the BrowserStack Automate Report in your Jenkins job results. Currently, JUnit and TestNG maven based projects are supported. Add the following dependencies to your pom.xml file:


Add the following repositories to your pom.xml file:



Add the following plugin to your pom.xml file:


You must define the maven properties, jdk.source.version and to match the Java versions of your project.

Following environment variables are set by this Jenkins plugin:


You can use these environment variables to set DesiredCapabilities in your test. For e.g:

String username = System.getenv("BROWSERSTACK_USER");
String accessKey = System.getenv("BROWSERSTACK_ACCESSKEY");
String browserstackLocal = System.getenv("BROWSERSTACK_LOCAL");
String browserstackLocalIdentifier = System.getenv("BROWSERSTACK_LOCAL_IDENTIFIER");

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("os", "Windows");
capabilities.setCapability("browser", "chrome");
capabilities.setCapability("browserstack.local", browserstackLocal);
capabilities.setCapability("browserstack.localIdentifier", browserstackLocalIdentifier);
driver = new RemoteWebDriver(new URL("https://" + username + ":" + accessKey + ""), capabilities);

Global Configuration

BrowserStack Credentials

To configure BrowserStack credentials globally follow these steps,

  1. Go to Manage Jenkins > Configure System.
  2. Under the BrowserStack section click on the Add button next to BrowserStack Credentials.
    1. In the global section there is an additional option, that if checked allows the plugin to collect anonymous usage data.
  3. Enter your BrowserStack username and access key which you can find on your BrowserStack Account Settings page. 
  4. Save your changes.

Job Configuration

Create a new Jenkins job or edit the configuration of an existing one. Before you can edit/add job configuration you will need to ensure that you have the necessary privileges on your Jenkins instance to add/modify jobs.

BrowserStack Credentials

  1. Under the Build Environment section check the box next to BrowserStack.
  2. If you have previously saved any global credentials these will be automatically selected.
  3. If you have not previously saved any global credentials or wish to override credentials for this job you can do so by clicking on Add.
  4. The BrowserStack Credentials screen will show up again where you can enter your BrowserStack username and access key.

BrowserStack Local

BrowserStack Local Testing allows you to test your private and internal servers, alongside public URLs, using the BrowserStack cloud, which has support for firewalls, proxies and Active Directory. The plugin is responsible for downloading the binary for the platform that the build job is running on and starting and tearing down the secure tunnel.

BrowserStack Local can only be configured per job and not via the global configuration.

To enable BrowserStack Local follow these steps,

  1. Under the Build Environment section check the box next to BrowserStack Local.
  2. If the binary is externally downloaded then set the path to the binary in the config path, BrowserStack Local Path.
  3. Downloading the binary is not necessary and if this option is left empty the plugin will automatically download the binary. This is recommended especially if you are using Jenkin's in master-slave configurations, since the plugin will download the appropriate binary for the build agent OS.
  4. You can set additional options for the binary in the BrowserStack Local Options.

Embedded Test Reports

To have BrowserStack Automate reports show up right next to the JUnit/TestNG reports in Jenkins you must follow these steps,

  1. Click on Add post-build Action under the Post-build Actions section.
  2. Click on Additional test report features.
  3. Check the box next to Embed BrowserStack Report.

DONE! This will ensure that once the build runs, the BrowserStack Automate report will show up right next to the stack trace of a failed unit test.

Note: Although stable, this plugin is a work in progress. Please send issues or feedback to

App Automate support

With the plugin version 1.1.0 rollout we have added support for App Automate in Jenkins plugin. In addition to all the above configurations, you will now be able to add a build step to configure and upload your app on the BrowserStack servers. Refer to the App Automate Jenkins document for details on configuring your test suite for automation app testing. Visit App Automate Get Started document for more details on getting started with the automation app testing on BrowserStack.

About BrowserStack

BrowserStack is the industry’s most reliable cloud web and mobile testing platform, used by more than 2 million developers across 135 countries. We empower teams to speed up release cycles and deploy websites and mobile applications that work seamlessly on any user interface.

Users can choose from more than 1,200 on-demand real mobile devices, browsers and operating systems and rely on a secure, stable and scalable infrastructure to support thousands of concurrent manual and automated tests.

More than 25,000 global companies rely on BrowserStack, including industry-leaders like Microsoft, ING, Mastercard, Dow Jones, Garmin, National Geographic, Volvo, NRK, HubSpot, Walt Disney and AngularJS, to name a few.  With offices in San Francisco, Mumbai and Dublin, BrowserStack is privately held and backed by Accel. Learn more at:

Change Log

Version 1.1.0 (May 09 2018)

  • App Automate support.
  • Version upgrades for automate-testassist and automate-maven-plugin to 1.0.0-SNAPSHOT to fix critical bugs.
    • Support for Java 9 in automate-maven-plugin
    • Fixes for bug in capturing report when using @Parameters or @Dataprovider annotations in JUnit or TestNG

Version 1.0.7 (Nov 03 2016)

  • Fixed security bug.

Version 1.0.3 (Jul 29 2016)

  • Minor fix to analytics.

Version 1.0.2 (Jul 14 2016)

  • Fixed broken url in pom.xml for plugin wiki.

Version 1.0.1 (Jul 13 2016)

  • Fixed typos and pom.xml.

Version 1.0.0 (Jul 12 2016)

  • Initial release of plugin.


  1. Embedded Test Reports

    I am trying to get embedded test reports inside Jenkins job with TestNG/Maven tests but can't even find this magic "Additional test report features" item under the Post-build Actions section. The list with available post-build actions starts with "Aggregate downstream test results" instead, Maybe I need to use some additional plugin to see it or maybe it is impossible to get embedded test results from Browserstack because of TestNG?

  2. Please make this plugin compatible with the credentials-binding-plugin so that we can use the browserstack credentials type in our Jenkinsfile pipeline flow.

  3. Hi Rob Bast

    I have the same issue

    How make this plugin compatible with the credentials-binding-plugin so that we can use the browserstack credentials type in our Jenkinsfile pipeline flow?