ReferenceRunners
Regions and concurrency
Where Endform runs your tests, how runner regions are selected, and how parallel execution and concurrency limits work.
Endform runs your Playwright tests on isolated remote machines in AWS and fans them out in parallel automatically. This page covers where runners execute, how to choose a region, and how to control how many tests run at the same time.
Regions
Endform operates remote runners in two AWS regions:
| Config value | AWS region | Location |
|---|---|---|
"eu" | eu-north-1 | Stockholm, Sweden |
"us" | us-east-1 | Northern Virginia, United States |
Automatic region selection
When region is not set in endform.config.ts, Endform selects a region automatically based on where the CLI starts the run:
- Runs started from North America or South America use
"us"(us-east-1). - Runs started from all other continents use
"eu"(eu-north-1).
When the target region offers the requested browser, Endform stays in that region and selects the closest available Playwright version. If the target region (whether automatic or set via region) does not offer the requested browser, Endform falls back to the other region automatically.
Choosing a region
Set region in endform.config.ts to place runners closest to your application under test and its database:
import { defineEndformConfig } from "endform";
export default defineEndformConfig({
region: "eu",
});Matching the region to your application keeps every browser navigation, asset load, and API request in the same region while only the initial test upload crosses regions. This is especially useful when CI runs in the United States (such as GitHub Actions) against a staging or preview app hosted in Europe.
Default concurrency
Endform ignores Playwright's local workers setting and scales execution across remote machines automatically based on your Playwright fullyParallel configuration:
fullyParallel: false(Playwright default): Each spec file runs in parallel on its own remote machine, while tests inside the same file run sequentially.fullyParallel: true: Each test case runs in parallel on its own remote machine.
Each suite run fans out across its execution batches automatically, so tests run concurrently instead of waiting on a fixed local worker pool. See Fully parallel testing for making a suite safe to run at full parallelism.
Limiting concurrency
When a staging server, shared database, local dev server, or rate-limited third-party API cannot absorb full parallel load, configure concurrentTestLimits in endform.config.ts.
Each rule has three fields:
| Field | Values | Purpose |
|---|---|---|
scope | "within-suite-run", "across-all-runs" | Limits concurrency within one run, or shares one global cap across every concurrent run in your organization. |
label | Omitted, tag:@name, project:name, lock:name | Selects which tests the rule applies to. Omit label to cap every test in the run. |
limit | Positive integer | Maximum number of matching tests allowed to run at the same time. |
You can combine broad guardrails with narrow limits for specific bottlenecks:
import { defineEndformConfig } from "endform";
export default defineEndformConfig({
concurrentTestLimits: [
{ scope: "within-suite-run", limit: 30 },
{ scope: "within-suite-run", label: "tag:@payments", limit: 2 },
{ scope: "across-all-runs", label: "project:staging", limit: 40 },
],
});Stacking multiple limits
Multiple rules combine with AND semantics: a test starts only when every rule matching that test has available capacity. In the example above, a @payments test in the staging project starts only when the run is below 30 concurrent tests, fewer than 2 @payments tests are running in that run, and fewer than 40 staging tests are running across the organization.
When fullyParallel is false, a tag: rule applies to the entire spec file batch whenever any test in that file has the tag, so untagged tests in the same file wait for a slot alongside it.
Playwright test locks
Playwright's native test locks work across Endform's remote machines automatically. Any tests sharing a lock (for example, test.describe.configure({ lock: "payments" })) default to limit: 1 within a suite run (scope: "within-suite-run"), even when fullyParallel is enabled.
Add a lock:<name> rule in concurrentTestLimits to raise that limit or share the lock across concurrent runs:
import { defineEndformConfig } from "endform";
export default defineEndformConfig({
concurrentTestLimits: [
{ scope: "across-all-runs", label: "lock:payments", limit: 2 },
],
});Queueing and billing
When concurrent runs reach an across-all-runs cap, Endform queues waiting runs and allocates shared capacity as earlier runs finish their matching tests and release their slots. Queued wait time is not billed.
For practical guidance on finding the right limits for staging servers, downstream APIs, and CI builds, see Optimize test load.
Related pages
Last updated