GitHub Actions CI/CD with BrowserStack Load Testing
Integrate BrowserStack Load Testing into GitHub Actions workflows to run load tests in your CI/CD pipelines.
Overview
You can add BrowserStack Load Testing to your GitHub Actions workflows so that every run of your CI/CD pipeline can trigger a load test.
Prerequisites
Make sure you have the following before you start:
- A BrowserStack account with access to Load Testing.
- A GitHub repository where you can define workflows.
- GitHub secrets for your BrowserStack credentials. You can find the credentials on your account’s profile page:
-
BROWSERSTACK_USERNAME: Your BrowserStack username. -
BROWSERSTACK_ACCESS_KEY: Your BrowserStack access key.
-
You can define these secrets at the repository level or organization level.
GitHub Actions workflow
Use the following GitHub Actions workflow to download the BrowserStack CLI, run a sample Playwright-based load test, and upload JUnit XML reports as an artifact:
Result
When this workflow runs, it:
- Downloads the BrowserStack CLI for the current runner OS and architecture.
- Fetches the BrowserStack Playwright load-testing sample project.
- Starts a BrowserStack Load Testing run using your BrowserStack credentials.
- Uploads the generated JUnit XML reports as workflow artifacts.
Notes
- ANSI color formatting is supported by default in GitHub Actions logs.
- JUnit reports are uploaded as artifacts so you can download and inspect them.
- The workflow works on Linux, macOS, and Windows runners.
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!