Cloud Computing and Data Centers

Cloudflare launches Worker Previews to isolate independent testing environments for each code branch

Cloudflare has launched Worker Previews, a service that creates an isolated runtime environment for each Git branch that mirrors production, with an independent URL, configuration, state, and monitoring tools. The service enables testing application changes, including Durable Objects and Containers, before they reach production, while some limitations remain regarding multi-Worker applications and asynchronous tasks.

2026-09-22
4 min read
3 views
certi.news Editorial Team
Cloudflare launches Worker Previews to isolate independent testing environments for each code branch

Cloudflare has launched Worker Previews to provide an independent runtime environment for each Git branch, allowing code changes to be tested in conditions closer to production without affecting the traffic, configuration, or state specific to the live version. The service is now available to Workers users.

Each preview receives a stable URL for the branch that updates with every new push, in addition to separate configurations, variables, secrets, and bindings. Developers can send requests to the preview from the terminal, continuous integration systems, or a browser, then inspect logs, errors, metrics, and execution traces through Workers Observability tools.

An independent environment that goes beyond merely providing a version URL

Cloudflare explains that Worker Previews differ from the previous Version URLs. The latter point to a specific uploaded version and may use production resources, whereas Worker Previews create an isolated environment for each branch, with the ability to run hundreds of previews in parallel within a single dashboard. This makes it possible to test API endpoints, user interface changes, and login flows in an actual runtime context instead of merely inspecting code or relying on a shared staging environment.

When the command npx wrangler preview is run, Cloudflare creates the preview version based on a base configuration specified by the developer in the Wrangler file. Specific preview settings can be modified, such as directing the preview to a test database or API key, without changing production settings or those of other previews. Preview URLs can also be served through a custom domain, while Cloudflare Access can be used to protect them and restrict access.

Isolating state and sensitive resources

The isolation extends to stateful resources. Each preview has its own Durable Objects space and independent Containers application, preventing state changes, sessions, migrations, or failed schema changes from reaching production or other branches. Cloudflare links this behavior to the code branch context: ctx.exports resolves to the production space when running in production and to the appropriate preview space when running within a test branch.

In practice, this makes it possible to compare different configurations of the same application, such as testing cold and warm startup performance, while keeping the results of each experiment confined to its environment. Browser Run can also be used to open the preview URL in a headless browser, execute login flows, and capture screenshots or replayable sessions, then link what the user saw to the recorded execution traces and errors.

What changes in practice?

Worker Previews provide a feedback loop before production for each branch: deploy the change, run it, monitor it, fix the issue, and then retest before merging. Cloudflare says this supports what it calls the agent development lifecycle, in which a software agent can implement, inspect, and review the results of a change within the branch's own scope, with the possibility of human reviewer intervention when needed.

Cloudflare used the service internally to test CloudflareOS and Gatekeepers, particularly flows combining OAuth, permissions, approvals, and application state. The company also cited experiences from Supermemory and Ramp involving the testing of Workers changes and reviewing merge requests from mobile devices.

Announced limitations and next steps

Previews do not currently isolate the entire request chain in multi-Worker applications; a service binding from a preview may invoke the production version of the linked Worker. Previews can also send messages to Queues but cannot consume them yet, and isolating Workflow execution requires a separate configuration. Cloudflare is working to support these paths, in addition to providing long-lived previews for staging, QA, and continuous developer environments.

certi.news reading: The core value of the announcement is not the creation of another testing link, but moving isolation to the level of configuration, state, and monitoring. This reduces the risks of testing changes that affect stateful resources, but it does not eliminate the need to design the testing environment carefully, particularly when the service relies on multiple Workers, queues and messages, or long-running flows. Therefore, Worker Previews appear more complete than previewing a single version, while some parts of the application remain outside the full isolation model in the current release.

News source
Cloudflare Blog
Open original source ↗
c
Author

certi.news Editorial Team

In the same category

You may also like

View all news