Rerun tests on Jenkins
Learn how to rerun failed tests by integrating Jenkins with BrowserStack so you can quickly validate fixes.
BrowserStack Test Reporting & Analytics lets you rerun failed tests directly from the dashboard after you integrate Jenkins. This removes the need to manually trigger Jenkins builds.
Before you proceed, make sure you have completed the main setup to rerun failed tests: Rerun failed tests with Test Reporting & Analytics.
Configure Jenkins integration for job triggers
Follow these steps to configure your Jenkins integration. Each user who wants to trigger reruns must do this:
- Open the BrowserStack Jenkins integration page: BrowserStack Jenkins integration.
- Install or update the BrowserStack Jenkins plugin (version 1.2.7 or later):
- In Jenkins, go to: Manage Jenkins > Manage Plugins > Available
- Search for browserstack-integration
- Click Install (or Upgrade) and restart Jenkins if prompted
- Generate an API token:
- In Jenkins, click your username (top right) > Configure
- Under API Token, click Add new token, enter a name, then click Generate
- In the BrowserStack integration form, enter your Jenkins Username and API Token so BrowserStack can trigger jobs.
- Click Submit to save. You can now rerun failed tests from the Test Reporting & Analytics dashboard.

Trigger reruns
After you configure Jenkins, trigger reruns of failed tests:
- Go to the Test listing to view failed tests.
- Hover over a test name to display action icons on the right (near the duration).
- Click the rerun icon to open the rerun options modal.

We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!