Connect and get help from 7,000+ developers on our Discord community.
Ask the Community
Azure Pipelines CI/CD with BrowserStack Load Testing
Integrate BrowserStack Load Testing into Azure Pipelines
Overview
You can add BrowserStack Load Testing to your Azure Pipelines so that every run of your CI/CD workflow can trigger a load test.
Prerequisites
Make sure you have the following before you start:
- A BrowserStack account with access to Load Testing.
- An Azure DevOps project with a pipeline that you can edit.
- Secure pipeline variables in Azure DevOps for your BrowserStack credentials. You can copy these credentials from your account profile page.
-
BROWSERSTACK_USERNAME: Your BrowserStack username. -
BROWSERSTACK_ACCESS_KEY: Your BrowserStack access key.
-
Azure pipeline script
Use the following Azure Pipelines YAML script to download the BrowserStack CLI, run a sample Playwright-based load test, and publish JUnit XML reports:
Result
When this pipeline runs, it:
- Downloads the BrowserStack CLI for the current agent OS and architecture.
- Fetches the BrowserStack Playwright load-testing sample project.
- Starts a BrowserStack Load Testing run using your BrowserStack credentials.
- Publishes JUnit XML reports, even if some tests fail.
Notes
- Separate steps handle Unix agents and Windows agents by using
conditiononAgent.OS. - The
PublishTestResults@2task publishes JUnit XML results so that you can see load-test outcomes in Azure Pipelines. - ANSI formatting in CLI output works by default in Azure Pipelines logs.
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!