Download Latest Version v4.7.0 source code.tar.gz (152.6 kB)
Email in envelope

Get an email when there's a new version of PEST

Home / v4.6.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-04-14 1.5 kB
v4.6.0 source code.tar.gz 2026-04-14 104.3 kB
v4.6.0 source code.zip 2026-04-14 211.0 kB
Totals: 3 Items   316.7 kB 1

For better shard balance, Pest can distribute tests based on their actual execution time using the --update-shards option. This ensures each shard takes roughly the same wall-clock time, minimizing how long your slowest CI job runs.

Step 1: Generate the timing data by running your full test suite with --update-shards:

:::bash
./vendor/bin/pest --update-shards

This runs all tests and records each test class's duration into tests/.pest/shards.json. You can also combine it with --parallel to speed things up:

:::bash
./vendor/bin/pest --parallel --update-shards

Step 2: Commit tests/.pest/shards.json to your repository. This file is human-readable and looks like this:

:::json
{
    "timings": {
        "Tests\\Feature\\Payments\\StripeCheckoutTest": 1.608,
        "Tests\\Feature\\Reports\\SalesReportTest": 2.105,
        "Tests\\Unit\\Models\\UserTest": 0.050
    },
    "checksum": "...",
    "updated_at": "2026-04-14T10:30:00+00:00"
}

Step 3: When you run --shard and tests/.pest/shards.json exists, Pest automatically uses time-balanced distribution:

:::bash
./vendor/bin/pest --shard=1/5

The output will indicate that time-balanced sharding is active:

Shard:    1 of 5 — 12 files ran, out of 50 (time-balanced).
Source: README.md, updated 2026-04-14