October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Prevent Split Batches in Parallel Applitools Tests

Use one fresh Applitools batch ID across every worker or shard in a test run to keep parallel results together.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Give every worker or CI shard in a single Applitools test run the same batch ID. For Playwright, the simplest documented approach is to set APPLITOOLS_BATCH_ID before starting the test command, using a newly generated ID for each distinct run. Separate runs should use different IDs so unrelated results do not get grouped together.

Why parallel Applitools tests split into multiple batches

An Applitools batch groups related test results in a common dashboard container. Parallel Playwright tests run in separate worker processes, which do not share global variables or in-memory objects. If each worker creates a BatchInfo object without an explicit shared ID, each can generate a different ID, and the dashboard may show several batches instead of one.

The batch ID is the grouping mechanism across processes or machines. A batch name can make the resulting group easier for people to identify, but a shared name alone is not a substitute for a shared ID. See Applitools’ parallel Playwright guidance and batch configuration documentation.

Set one batch ID for all workers in a run

  1. At the start of the intended test run, generate a fresh unique ID. Applitools recommends a unique ID for each batch; a UUID is a practical choice because accidental collisions are very unlikely.
  2. Make that exact value available to every worker or shard that should contribute to the batch.
  3. For Playwright, set APPLITOOLS_BATCH_ID in the environment before invoking the test command. For example, in a POSIX shell:
    export APPLITOOLS_BATCH_ID="$(node -e 'console.log(require("crypto").randomUUID())')"
    npx playwright test

    This generates one ID in the parent shell and inherits it in the test process and its workers. In CI, create the value once for the run and distribute it to every participating job; do not generate a separate value independently inside each shard.
  4. Use a different ID for another test run, including a concurrent run. Reusing a static ID risks merging unrelated results.
  5. Give the batch a useful name if you want the dashboard group to be recognizable. The ID determines grouping; the name is for identification.

Applitools also demonstrates a commit-derived value for a sharded Storybook workflow. That can group the shards in that workflow, but make sure the chosen value distinguishes separate runs that should remain separate. See the Storybook scaling guide.

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

Choose between environment configuration and BatchInfo

Approach Where the ID is configured What to ensure
APPLITOOLS_BATCH_ID Process environment or CI configuration Every worker and shard receives the same value before tests start. Convenient when a run coordinator distributes configuration across processes or machines.
SDK BatchInfo Test code Assign the same explicit ID in every process before opening tests. Creating a separate object in each worker without a shared ID may still produce different batches.

Applitools’ batching documentation includes language-specific examples for Java, JavaScript, Python, Ruby, and C#. Check the syntax for the SDK version installed in your project before adapting one. The environment-variable example above is documented for parallel Playwright use; the sources do not establish a universal compatibility matrix for every runner and SDK version.

Troubleshoot batches that still split

  • Workers show different IDs: inspect the effective APPLITOOLS_BATCH_ID in each worker or shard. Generate it once per run, not once per worker.
  • The variable exists locally but not in CI containers: confirm the CI system explicitly forwards the run-level variable into each job or container, then verify it is present when the test process starts.
  • Unrelated runs appear together: check for a hard-coded or reused ID. Generate a fresh ID for each intended run, including concurrent runs.
  • You configure BatchInfo in code: verify every process assigns the same ID before opening tests. A per-worker object alone does not guarantee shared grouping.
  • All workers appear configured consistently, but results still split: inspect the effective environment and the runner/SDK configuration in each process. Exact APIs and environment handling can differ by version, so consult the documentation for the versions in use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API, rather than a way to configure Applitools batches. If your task is to capture a page, one GET request can return an image or PDF. See the ScreenshotNeo API documentation.

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

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.