Skip to main content
🚀 See how 20+ AI Agents can make your QA faster and smarter. Join 10k+ QAs at global leadership summit! Register Now
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

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:

  1. Open the integration page: Configure GitLab integration.
  2. 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.
  3. Enter the token in the form and select Submit. Form showing token field and Submit button for GitLab integration
  4. Review the token scopes and remove any you do not need to follow least‑privilege practices.
  5. 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:

  1. Go to the Test listing to view failed test cases.
  2. Hover over the failed test name. Test listing page showing a failed test with action icons visible after hover
  3. Select the rerun icon.
    Failed test row with the rerun icon highlighted
    Configure rerun modal displaying rerun options for the selected failed test

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

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle