Rerun tests on GitLab
Learn how to rerun failed tests by integrating GitLab CI/CD with BrowserStack so you can quickly validate fixes.
BrowserStack Test Reporting & Analytics lets you rerun failed tests directly from the dashboard after you integrate GitLab. This removes the need to manually trigger pipelines.
Before you proceed, make sure you have completed the main setup to rerun failed tests: Rerun failed tests with Test Reporting & Analytics.
Configure GitLab integration to enable pipeline triggers
Follow these steps to configure the GitLab integration for rerun triggers. Each user who wants to use reruns must complete this setup:
- Open the integration page: Configure GitLab integration.
- Create a GitLab personal access token (PAT): In GitLab, go to User > Preferences > Access Tokens > Add new token. Set an expiry date and select only the minimal scope (recommended: api) required for triggering pipelines. For details, see GitLab docs on personal access tokens.
- Enter the token in the form and select Submit.
- Review the token scopes and remove any you do not need to follow least‑privilege practices.
- In your target repository
.gitlab-ci.yml, ensure a job can be triggered.
Trigger reruns
After you complete the CI configuration, trigger reruns of failed test cases:
- Go to the Test listing to view failed test cases.
- Hover over the failed test name.
- Select the rerun icon.

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!