Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When Playwright works locally but fails or appears stuck in Azure Pipelines, make the CI environment explicit and put a firm time limit on the run. Install the browser binaries and Linux dependencies, start with one worker, set Playwright’s globalTimeout below the Azure job timeout, and inspect logs and traces to identify whether the problem is a test, browser launch, network access, or the agent itself.

Start with a bounded, reproducible Azure pipeline

Playwright tests depend on browser binaries and operating-system libraries as well as your Node packages. A clean Azure agent may not have the browser version or dependencies your local machine already has. Install them during the pipeline run, then run the tests with CI=true. Playwright’s CI guidance recommends one worker in CI to favor stability and reproducibility; add parallelism only after confirming the agent can handle it.

This baseline uses Ubuntu, Node.js 22, npm, JUnit output, a 50-minute Playwright run limit, and a 60-minute Azure job limit. Adjust the Node version and report paths to match your project. The global limit is deliberately shorter than the job limit so Playwright can stop and report before Azure terminates the job.

trigger:
- main

pool:
  vmImage: ubuntu-latest

jobs:
- job: PlaywrightTests
  timeoutInMinutes: 60
  steps:
  - task: UseNode@1
    inputs:
      version: '22'
    displayName: Install Node.js

  - script: npm ci
    displayName: Install dependencies

  - script: npx playwright install --with-deps
    displayName: Install Playwright browsers and Linux dependencies

  - script: npx playwright test
    displayName: Run Playwright tests
    env:
      CI: 'true'

  - task: PublishTestResults@2
    displayName: Publish test results
    condition: succeededOrFailed()
    inputs:
      searchFolder: test-results
      testResultsFormat: JUnit
      testResultsFiles: e2e-junit-results.xml

For JUnit publishing, configure the Playwright reporter to create the file at the path Azure searches. Add or merge this into playwright.config.ts:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: [
    ['list'],
    ['junit', { outputFile: 'test-results/e2e-junit-results.xml' }],
  ],
  workers: process.env.CI ? 1 : undefined,
  globalTimeout: 50 * 60 * 1000,
  use: {
    trace: 'retain-on-failure',
  },
});

The condition: succeededOrFailed() setting lets the publishing task run after a test failure, so results are not discarded just because the test step failed. If your project already defines a reporter or use settings, merge these values rather than replacing the existing configuration.

Tell a timeout from a genuine hang

“The pipeline is hanging” can describe several different failures. First identify the last completed phase and whether the task log is still advancing. A red test with an assertion message is not the same problem as a browser that cannot launch or a job that stops producing output.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
What you see Likely phase First thing to check
Install step fails Dependencies or browser setup npm ci output and completion of npx playwright install --with-deps
Browser launch error before a test runs Browser binary, Linux library, or agent compatibility Install logs and whether the selected agent environment matches the project
Navigation fails or waits on a URL Application readiness or network reachability Agent access to the target URL, DNS, proxy, firewall, and service credentials
One test ends with a timeout Test, action, or navigation timeout The failing test step and the applicable Playwright timeout setting
Tests finish but the job continues Teardown, artifact transfer, or report publication Final task logs, trace/report handling, and remaining pipeline steps
No new task output for a long time Paused code or stalled process/infrastructure Debug pauses, the last log line, and whether the process is still progressing

A Playwright test has a documented default timeout of 30 seconds. That is distinct from action and navigation timeouts and from globalTimeout, which limits the entire test run. Increasing an individual test timeout will not help if the whole pipeline is stuck in installation, blocked on a pause, or unable to reach the application.

Set timeout limits that work together

Playwright’s test-run global timeout is not bounded by default. Set it explicitly so Playwright can report a controlled timeout instead of letting Azure kill the process first. Azure job limits apply separately: Microsoft documents maximum job timeouts of 60 minutes for free Microsoft-hosted agents on private repositories and 360 minutes on public repositories. The effective limit depends on the agent and repository context; do not assume a larger YAML timeout overrides the applicable service limit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
  • Per-test timeout: governs how long an individual test may run; the documented default is 30 seconds.
  • Action and navigation timeouts: govern operations such as clicks and page navigation. Change these only when the failing operation has a justified longer wait.
  • Global Playwright timeout: caps the test run and gives Playwright a chance to stop with its own report.
  • Azure job timeout: caps the whole job, including setup and publishing steps. Keep it longer than the Playwright global timeout and leave time for reports.

The example’s 50-minute global limit is suitable only when the Azure job can run long enough to accommodate it. For a shorter job limit, reduce globalTimeout accordingly. A Playwright Workspaces quickstart on Microsoft Learn uses a 60-minute workflow timeout as an example; that example should not be mistaken for a universal allowance or guarantee for every Azure agent.

Fix hangs in a useful order

  1. Remove accidental pauses. Search the tests and shared helpers for page.pause() and other debugging waits. A pause left in code can wait indefinitely for a person who is not present on a CI agent. Remove it from the CI path rather than compensating with a larger timeout.
  2. Verify browser installation and runtime. Check that the browser-install task completed successfully before the test command. On Linux, use npx playwright install --with-deps or the official Playwright Docker image. Make sure the image or agent is compatible with the project runtime and installed Playwright version.
  3. Reduce concurrency. Set workers to 1 when CI is set. If this makes an intermittent suite stable, inspect CPU, memory, disk activity, and simultaneous browser count before raising the worker count. Sharding tests across separate jobs is another option when the suite needs more throughput.
  4. Check target reachability from the agent. A page that loads on a developer laptop may be unreachable from the hosted agent. Confirm the application is deployed and ready, then investigate DNS, firewall rules, proxy configuration, service connections, credentials, and access to the target environment or region.
  5. Read the task log around the stall. Find the last completed test and the first missing expected event. Also inspect teardown and publish steps: a test run may have ended while a later operation is still transferring or processing output.
  6. Use traces to locate the failing step. With trace: 'retain-on-failure', failure traces can show the page state and actions leading up to a problem. Open the Playwright report and compare it with the Azure task log. If remote trace transfer is itself slow, temporarily disable tracing for one diagnostic run to see whether transfer overhead is involved.
  7. Publish evidence even after failures. Keep test-result publication conditional on a failed test step being allowed to continue, as in the YAML above. Verify the JUnit output file exists at the configured location; a publisher cannot report a file that the reporter never created.
  8. Put the run back inside its budget. Set or lower globalTimeout and verify the Azure job limit leaves time for setup and publication. If the job-level limit triggers first, the process can be killed before Playwright writes a useful final report.

Choose the fix based on the failure pattern

  • Fails only in CI: compare the CI browser installation, Node version, environment variables, secrets, and network access with the local run. Avoid assuming a local browser installation is present on a fresh agent.
  • Fails intermittently: start with one worker, inspect traces from failed attempts, and look for shared test state or resource pressure. Raise concurrency only after the single-worker run is repeatable.
  • Fails at a consistent test step: inspect the action or navigation timeout that applies to that step, and confirm the page or expected element is actually available in CI.
  • Stops logging without a test failure: check for pauses, a blocked external dependency, an agent issue, or slow transfer of large trace artifacts. Use the last task output to decide which branch to investigate.
  • Fails after tests complete: focus on report generation, artifact transfer, and publishing configuration rather than changing test action timeouts.

Change one variable at a time when diagnosing an intermittent issue. For example, first pin concurrency to one and preserve the failure trace; if the issue remains, inspect reachability or temporarily disable tracing. Changing worker count, timeout values, and browser setup all at once may hide which condition caused the improvement.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If the immediate task is to capture a page image rather than execute browser assertions, ScreenshotNeo offers a separate screenshot API. It does not fix a Playwright test suite or replace CI testing; it can return a screenshot or PDF from one GET request, without installing and managing a browser in this pipeline. See the ScreenshotNeo API documentation for request options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo can accept cookie and consent banners before capture and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Keep the pipeline observable

A reliable CI run needs enough evidence to distinguish application bugs from environment problems. Keep the test report, retain traces on failure when their transfer cost is acceptable, and make the last completed task visible in the Azure log. Track the installation phase, test execution, and publishing phase separately. That way a test timeout, a browser dependency issue, and a report-upload delay do not all look like the same “hang.”

When you increase throughput, do so from a stable baseline: first establish that the same browser install and one-worker run is repeatable, then measure the agent’s resource headroom and distribute work deliberately. A higher job timeout alone does not fix an unbounded Playwright run, missing browser libraries, an accidental pause, or a network path the agent cannot reach.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.