Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Yes. Playwright runs in stateless containers on Google Cloud Run, making it a practical choice for scalable, isolated end-to-end browser testing without persistent virtual machines. Pairing Playwright testing with Cloud Run's serverless infrastructure lets teams execute tests in ephemeral containers that spin up on demand, run the test job, and shut down automatically.
Teams that need broader parallel execution across environments can extend this setup with platforms like TestMu AI for managed browser infrastructure and test orchestration.
Google Cloud Run is a fully managed serverless platform that runs containerized applications without requiring server or cluster management. It scales containers automatically based on demand, including down to zero between jobs, which eliminates idle compute costs.
For automation workloads, each test job runs in a clean, isolated, stateless container. Built-in logging, IAM-based authentication, and auto-scaling make it well suited for short-lived, repeatable jobs such as end-to-end and regression testing.
Setup involves three steps: containerizing Playwright, configuring it for headless serverless execution, and securing the Cloud Run service.
Use the official Playwright Docker image from Microsoft Artifact Registry. Install all browsers at build time, not at runtime, Cloud Run's stateless environment does not support runtime installations reliably.
FROM mcr.microsoft.com/playwright:v1.58.2-noble
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
CMD ["npx", "playwright", "test"]The v1.58.2-noble base image includes all required browsers and system dependencies. Installing browsers separately via npx playwright install is redundant and inflates image size. When optimizing the image:
Define headless mode, timeouts, and concurrency in playwright.config.js:
module.exports = {
use: {
headless: true,
launchOptions: {
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
},
timeout: 60000,
workers: process.env.CI ? 1 : 4,
reporter: [['list'], ['json', { outputFile: 'results.json' }]],
};--no-sandbox and --disable-setuid-sandbox are required for Chromium to run inside containerized environments. Store test traces and artifacts in Cloud Storage or forward logs to Cloud Logging for post-run review.
Build and push the image, then deploy the service:
docker build -t gcr.io/<PROJECT_ID>/playwright-tests .
docker push gcr.io/<PROJECT_ID>/playwright-tests
gcloud run deploy playwright-tests \
--image=gcr.io/<PROJECT_ID>/playwright-tests \
--platform=managed \
--region=<REGION> \
--no-allow-unauthenticatedUse --no-allow-unauthenticated to restrict access to authorized CI pipelines only via OIDC tokens. Because Cloud Run containers are ephemeral, no test secrets persist beyond execution. Identity-aware proxies add an additional protection layer for sensitive staging environments.
| Benefit | Description |
|---|---|
| Clean isolation | Each container runs a fresh environment, preventing test contamination. |
| Faster execution | Containers start in seconds for parallelized test runs. |
| Auto-scaling | Cloud Run scales up during peak CI jobs and down to zero afterward. |
| Lower cost | Pay only for executed test time with no idle VMs. |
| Centralized logs | All output and artifacts stream to Cloud Logging for easy diagnostics. |
Running Playwright on Google Cloud Run introduces operational challenges around container size, startup latency, and parallel test coordination. Understanding these issues upfront helps teams design reliable pipelines from the start.
playwright-core for minimal dependencies.For teams needing managed parallel execution without building orchestration from scratch, TestMu AI provides HyperExecute, which distributes Playwright tests across parallel VMs with auto-split strategies and real-time pipeline feedback.
Key capabilities include:
Yes. Playwright runs in stateless Docker containers on Cloud Run, giving each test job a clean, isolated environment. The platform's auto-scaling and built-in logging make it well suited for repeatable end-to-end browser testing in CI/CD pipelines without persistent virtual machines.
Package Playwright and browser binaries into a Docker image using the official mcr.microsoft.com/playwright:v1.58.2-noble base image. Push the image to Google Container Registry, then deploy using gcloud run deploy with --no-allow-unauthenticated to restrict access to authorized CI pipelines via OIDC tokens.
Allocate at least 2 vCPUs and 2 GiB of memory per instance. Browser processes are memory-intensive, and under-provisioned containers will crash or produce flaky results during parallel test runs.
Set headless: true, move browser launch args inside launchOptions, set workers: 1 for CI environments, and enable JSON reporting for pipeline-compatible output. Enable tracing for effective post-run debugging of failures in ephemeral containers.
Yes. AI orchestration platforms work alongside Playwright on Cloud Run to manage parallel execution, detect flaky tests, and provide intelligent failure analysis across ephemeral containers. HyperExecute by TestMu AI handles distribution, auto-healing, and real-time pipeline feedback for Playwright test runs at scale.
KaneAI - Testing Assistant
World’s first AI-Native E2E testing agent.

TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance