Run a Requestly collection as a load test from the CLI
Point the BrowserStack CLI at a Requestly API collection to run it as a load test on managed infrastructure, with no load script to write.
If you already have an API collection in Requestly, you can load-test it directly from the BrowserStack CLI, without writing a k6, JMeter, or Gatling script. You point the CLI at your collection by ID, and BrowserStack fetches it, converts it to a runnable load script, and runs it on managed infrastructure. This guide covers API load tests that use a Requestly collection as the source.
Prerequisites
Before you start, make sure you have the following:
- The BrowserStack Load Testing CLI, installed and authenticated, with
browserstack-clion your PATH. - A BrowserStack login linked to a Requestly account. If you don’t have one, sign up on the Requestly website. Your account links to your BrowserStack login on first use.
- A Requestly project that contains the collection you want to run.
- A Load Testing project to report results into.
Run a Requestly collection
Follow these steps to point the CLI at a Requestly collection and run it as a load test.
Find your Requestly project and collection IDs
- Open your collection in the Requestly dashboard.
- Copy the project ID and the collection ID from the page URL. Both are UUIDs, for example
550e8400-e29b-41d4-a716-446655440000.
You need both IDs. The collection ID alone is not enough.
Configure browserstack-load.yml
Add the Requestly fields to your browserstack-load.yml file. A Requestly test has no files block, because there’s no local script to upload.
The following fields configure a Requestly test:
| Field | Required | Description |
|---|---|---|
testType: requestly |
Yes | Tells the CLI the test is sourced from a Requestly collection. |
requestlyProjectId |
Yes | The Requestly project that owns the collection. |
requestlyCollectionId |
Yes | The collection to convert and run. |
Both IDs must be set in the config file. The CLI doesn’t accept them as command-line flags.
Run the test
Run the test from the directory that contains your browserstack-load.yml file:
When the configuration is valid, the CLI prints a banner that confirms the source:
BrowserStack then fetches your collection, converts it to a load script, and runs it on managed infrastructure.
Verify the test ran
- The run banner shows
Framework: Requestlyand aSource:line that names your collection and project IDs. - The test appears in the Load Testing dashboard and moves to Running once virtual users are provisioned.
Provisioning can take 1 to 2 minutes after the run starts. If the collection or your Requestly link can’t be resolved, the test surfaces the error in the run status. Check that your BrowserStack login is linked to the Requestly account that owns the collection.
Common issues
If a run fails to start, match the CLI message against the following:
| Error | Cause and fix |
|---|---|
'requestlyProjectId' is required when 'requestlyCollectionId' is set |
You supplied a collection ID but no project ID. Add requestlyProjectId. Both IDs are required. |
'files' and 'requestlyCollectionId' are mutually exclusive |
Your config has both a files block and a Requestly collection. A Requestly test has no local script, so remove the files block. |
Hybrid test rejected |
Combining a script-based test with a Requestly collection in the same run isn’t supported in this release. Run them as separate tests. |
Requestly account or collection not found |
Your BrowserStack login isn’t linked to a Requestly account, or the IDs are wrong. Sign in once on the Requestly website to link your account, then re-copy the IDs from the collection URL. |
What’s next
- Configure load parameters: Set virtual users, load zones, ramp profiles, and thresholds.
-
Run from CI/CD: Wire
browserstack-cli load runinto your pipeline.
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!