{
  "format": 3,
  "id": "4.3",
  "title": "Groups, whole-group shards and worker processes",
  "layers": {
    "runner": {
      "label": "Runner"
    }
  },
  "lanes": {
    "runner": {
      "label": "RUNNER PROCESS",
      "layer": "runner",
      "y": 16,
      "h": 735,
      "x": 16,
      "w": 425.355
    },
    "worker": {
      "label": "WORKER PROCESS",
      "layer": "runner",
      "y": 779,
      "h": 271.9999999999999,
      "x": 16,
      "w": 425.355
    }
  },
  "frames": {},
  "nodes": {
    "selected": {
      "label": "Selected files and tests",
      "layer": "runner",
      "lane": "runner",
      "box": [
        90,
        40,
        170,
        36
      ]
    },
    "groups": {
      "label": "Compatible file groups",
      "layer": "runner",
      "lane": "runner",
      "box": [
        92,
        152.6,
        166,
        36
      ]
    },
    "parallel": {
      "label": "Parallel tests",
      "layer": "runner",
      "lane": "runner",
      "box": [
        217.70999999999998,
        265.2,
        105,
        36
      ]
    },
    "serial": {
      "label": "Serial describe",
      "layer": "runner",
      "lane": "runner",
      "box": [
        32,
        265.2,
        117,
        36
      ]
    },
    "hooks": {
      "label": "All-hook batches",
      "layer": "runner",
      "lane": "runner",
      "box": [
        206.20999999999998,
        377.8,
        128,
        36
      ]
    },
    "shards": {
      "label": "Whole-group shards",
      "layer": "runner",
      "lane": "runner",
      "box": [
        147.605,
        477.8,
        150,
        36
      ]
    },
    "dispatch": {
      "label": "Dispatcher · slots",
      "layer": "runner",
      "lane": "runner",
      "box": [
        156.105,
        590.4,
        133,
        36
      ]
    },
    "limits": {
      "label": "Project worker limit",
      "layer": "runner",
      "lane": "runner",
      "box": [
        58.35499999999999,
        703,
        146,
        36
      ]
    },
    "compatible": {
      "label": "Worker compatibility",
      "layer": "runner",
      "lane": "runner",
      "box": [
        236.35500000000002,
        703,
        155,
        36
      ]
    },
    "tests": {
      "label": "First test",
      "layer": "runner",
      "lane": "worker",
      "box": [
        348.355,
        803,
        80,
        36
      ]
    },
    "replacement": {
      "label": "Replacement worker",
      "layer": "runner",
      "lane": "worker",
      "box": [
        162.355,
        803,
        154,
        36
      ]
    },
    "next": {
      "label": "Next test",
      "layer": "runner",
      "lane": "worker",
      "box": [
        347.355,
        903,
        82,
        36
      ]
    },
    "last": {
      "label": "Next test",
      "layer": "runner",
      "lane": "worker",
      "box": [
        347.355,
        1002.9999999999999,
        82,
        36
      ]
    }
  },
  "edges": {
    "select": {
      "from": "selected",
      "to": "groups",
      "label": {
        "at": [
          187,
          118.5
        ],
        "text": "filter, group"
      },
      "path": "M175,76 L175,114.3 L175,152.6",
      "badge": [
        175,
        114.3
      ]
    },
    "parallel": {
      "from": "groups",
      "to": "parallel",
      "path": "M205.44014209591472,188.6 L270.21,226.9 L270.21,265.2",
      "badge": [
        254.308814653473,
        217.49724046833876
      ]
    },
    "serial": {
      "from": "serial",
      "to": "groups",
      "label": {
        "at": [
          102.5,
          231.1
        ],
        "text": "serial"
      },
      "path": "M90.5,265.2 L90.5,226.9 L147.98401420959146,188.6",
      "badge": [
        90.5,
        226.9
      ]
    },
    "hooks": {
      "from": "parallel",
      "to": "hooks",
      "label": {
        "at": [
          282.21,
          343.7
        ],
        "text": "all-hooks"
      },
      "path": "M270.21,301.2 L270.21,339.5 L270.21,377.8",
      "badge": [
        270.21,
        339.5
      ]
    },
    "shard": {
      "from": "groups",
      "to": "shards",
      "label": {
        "at": [
          187,
          343.7
        ],
        "text": "keep whole"
      },
      "path": "M175,188.6 L175,226.9 L175,283.2 L175,339.5 L175,395.8 L175,445.8 L205.4672,477.8",
      "badge": [
        175,
        339.2921381708517
      ]
    },
    "parallelShard": {
      "from": "hooks",
      "to": "shards",
      "path": "M270.21,413.8 L270.21,445.8 L239.7428,477.8",
      "badge": [
        266.0091754658708,
        450.21216735020397
      ]
    },
    "dispatch": {
      "from": "shards",
      "to": "dispatch",
      "label": {
        "at": [
          234.60500000000002,
          556.3000000000001
        ],
        "text": "schedule"
      },
      "path": "M222.605,513.8 L222.605,552.1 L222.605,590.4",
      "badge": [
        222.605,
        552.1
      ]
    },
    "limit": {
      "from": "limits",
      "to": "dispatch",
      "path": "M131.355,703 L131.355,664.6999999999999 L193.43093250444048,626.4",
      "badge": [
        146.09537188236274,
        655.6053924714846
      ]
    },
    "reuse": {
      "from": "dispatch",
      "to": "compatible",
      "label": {
        "at": [
          325.85499999999996,
          668.9
        ],
        "text": "check hash"
      },
      "path": "M251.77906749555953,626.4 L313.855,664.6999999999999 L313.855,703",
      "badge": [
        299.11462811763727,
        655.6053924714846
      ]
    },
    "run": {
      "from": "compatible",
      "to": "tests",
      "label": {
        "at": [
          310.3505728752538,
          790.6715728752538
        ],
        "text": "assign group"
      },
      "path": "M313.855,739 L313.855,771 L388.355,771 L388.355,803",
      "badge": [
        313.855,
        768
      ]
    },
    "replace": {
      "from": "compatible",
      "to": "replacement",
      "label": {
        "at": [
          254.4815,
          756.9000000000001
        ],
        "text": "replace"
      },
      "path": "M313.855,739 L313.855,771 L239.355,771 L239.355,803",
      "badge": [
        276.605,
        771
      ]
    },
    "next": {
      "from": "tests",
      "to": "next",
      "path": "M388.355,839 L388.355,871 L388.355,903",
      "badge": [
        388.355,
        871
      ]
    },
    "last": {
      "from": "next",
      "to": "last",
      "path": "M388.355,939 L388.355,971 L388.355,1002.9999999999999",
      "badge": [
        388.355,
        971
      ]
    }
  },
  "scenarios": [
    {
      "id": "intro",
      "label": "How groups reach workers",
      "display": {
        "counterLabel": false,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "steps": [
        {
          "id": "selection-happens-in-the-runner",
          "title": "Selection happens in the runner",
          "text": "testMatch and testIgnore filter files; grep filters test titles including tags.",
          "show": [
            "selected"
          ],
          "current": [
            "selected"
          ],
          "edges": [],
          "defs": [
            "selection",
            "file-selection"
          ],
          "sources": [
            {
              "label": "projectUtils.ts:147-160",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/projectUtils.ts#L147-L160"
            },
            {
              "label": "loadUtils.ts:242-249",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/loadUtils.ts#L242-L249"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "compatible-tests-form-file-group",
          "title": "Compatible tests form file groups",
          "text": "Nonparallel tests share a file group within the same worker hash; projects, repetition and worker fixtures separate groups.",
          "show": [
            "selected",
            "groups"
          ],
          "current": [
            "groups"
          ],
          "edges": [
            "select"
          ],
          "defs": [
            "group",
            "compatible-grouping"
          ],
          "code": "group",
          "sources": [
            {
              "label": "testGroups.ts:30-37",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L30-L37"
            },
            {
              "label": "testGroups.ts:68-81",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L68-L81"
            },
            {
              "label": "testGroups.ts:112-120",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L112-L120"
            },
            {
              "label": "config.ts:91-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/common/config.ts#L91-L93"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "parallel-mode-has-exceptions",
          "title": "Parallel mode has exceptions",
          "text": "Parallel tests without all-hooks or an outer sequential suite can form individual groups; a serial describe stays together.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial"
          ],
          "current": [
            "parallel",
            "serial"
          ],
          "edges": [
            "select",
            "parallel",
            "serial"
          ],
          "defs": [
            "parallel",
            "parallel-tests"
          ],
          "code": "bigfile",
          "sources": [
            {
              "label": "loadUtils.ts:263-267",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/loadUtils.ts#L263-L267"
            },
            {
              "label": "testGroups.ts:85-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L85-L93"
            },
            {
              "label": "testGroups.ts:95-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L95-L109"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "all-hooks-share-batches",
          "title": "All-hooks share batches",
          "text": "Parallel tests with all-hooks and no outer sequential suite are batched using expected parallelism. Sharding first uses shard count, then worker count.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks"
          ],
          "current": [
            "hooks"
          ],
          "edges": [
            "select",
            "parallel",
            "serial",
            "hooks"
          ],
          "defs": [
            "hooks",
            "all-hook-batches"
          ],
          "sources": [
            {
              "label": "testGroups.ts:85-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L85-L93"
            },
            {
              "label": "testGroups.ts:95-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L95-L109"
            },
            {
              "label": "testGroups.ts:122-131",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L122-L131"
            },
            {
              "label": "loadUtils.ts:191-203",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/loadUtils.ts#L191-L203"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "shards-keep-groups-whole",
          "title": "Shards keep groups whole",
          "text": "Shard target sizes use test counts. A whole group goes to the shard containing its first test position; statically skipped tests normally do not count.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards"
          ],
          "current": [
            "shards"
          ],
          "edges": [
            "select",
            "parallel",
            "serial",
            "hooks",
            "shard",
            "parallelShard"
          ],
          "defs": [
            "shard",
            "whole-groups"
          ],
          "sources": [
            {
              "label": "testGroups.ts:164-168",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L164-L168"
            },
            {
              "label": "testGroups.ts:183-193",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L183-L193"
            },
            {
              "label": "testGroups.ts:170-181",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L170-L181"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "slots-bound-dispatch-and-reuse",
          "title": "Slots bound dispatch and reuse",
          "text": "The dispatcher allocates bounded slots, respects project limits and scheduling locks, and prefers a free compatible worker. A mismatched or stopping worker stops before replacement.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "replacement"
          ],
          "current": [
            "dispatch",
            "limits",
            "compatible",
            "replacement"
          ],
          "edges": [
            "select",
            "parallel",
            "serial",
            "hooks",
            "shard",
            "parallelShard",
            "dispatch",
            "limit",
            "reuse",
            "replace"
          ],
          "defs": [
            "dispatch",
            "worker-slots",
            "project-limit",
            "compatible-reuse",
            "Replacement"
          ],
          "sources": [
            {
              "label": "dispatcher.ts:73-98",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L73-L98"
            },
            {
              "label": "dispatcher.ts:236-240",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L236-L240"
            },
            {
              "label": "dispatcher.ts:87-92",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L87-L92"
            },
            {
              "label": "dispatcher.ts:115-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L115-L118"
            },
            {
              "label": "dispatcher.ts:149-157",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L149-L157"
            },
            {
              "label": "suiteUtils.ts:76-78",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/common/suiteUtils.ts#L76-L78"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "workers-run-assigned-tests-in-or",
          "title": "Workers run assigned tests in order",
          "text": "The worker awaits each test before advancing to the next test in its assigned group.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "replacement",
            "tests",
            "next",
            "last"
          ],
          "current": [
            "tests"
          ],
          "edges": [
            "select",
            "parallel",
            "serial",
            "hooks",
            "shard",
            "parallelShard",
            "dispatch",
            "limit",
            "reuse",
            "replace",
            "run",
            "next",
            "last"
          ],
          "defs": [
            "order",
            "ordered-execution"
          ],
          "sources": [
            {
              "label": "workerMain.ts:242-250",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L242-L250"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        }
      ]
    },
    {
      "id": "default-files",
      "label": "Default files",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "nodeLabels": {
        "tests": "A",
        "next": "B",
        "last": "C"
      },
      "whole": {
        "title": "Whole file groups",
        "text": "Example: two files, four tests, two shards. The worker rows show shard 1."
      },
      "steps": [
        {
          "id": "testmatch-and-grep-select-the-fi",
          "title": "testMatch and grep select the files and tests: a has A, B, C; b has D.",
          "text": "testMatch and grep select the files and tests: a has A, B, C; b has D.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "selected"
          ],
          "edges": [],
          "defs": [],
          "log": [],
          "sources": [
            {
              "label": "projectUtils.ts:147-160",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/projectUtils.ts#L147-L160"
            },
            {
              "label": "loadUtils.ts:242-249",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/loadUtils.ts#L242-L249"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "by-default-the-tests-of-one-file",
          "title": "By default, the tests of one file form one group.",
          "text": "By default, the tests of one file form one group.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "groups"
          ],
          "edges": [
            "select"
          ],
          "defs": [],
          "code": "group",
          "log": [],
          "sources": [
            {
              "label": "testGroups.ts:30-37",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L30-L37"
            },
            {
              "label": "testGroups.ts:68-81",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L68-L81"
            },
            {
              "label": "testGroups.ts:112-120",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L112-L120"
            },
            {
              "label": "config.ts:91-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/common/config.ts#L91-L93"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "shard-1-takes-the-whole-group-a",
          "title": "Shard 1 takes the whole group A B C. Worker 1 runs A.",
          "text": "Shard 1 takes the whole group A B C. Worker 1 runs A.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "tests"
          ],
          "edges": [
            "shard",
            "dispatch"
          ],
          "defs": [],
          "log": [
            "Running 3 tests using 1 worker, shard 1 of 2"
          ],
          "sources": [
            {
              "label": "testGroups.ts:164-168",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L164-L168"
            },
            {
              "label": "testGroups.ts:183-193",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L183-L193"
            },
            {
              "label": "testGroups.ts:170-181",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L170-L181"
            },
            {
              "label": "workerMain.ts:242-250",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L242-L250"
            },
            {
              "label": "base.ts:243-250",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/reporters/base.ts#L243-L250"
            },
            {
              "label": "tasks.ts:413-422",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/tasks.ts#L413-L422"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "the-same-worker-runs-b-in-file-o",
          "title": "The same worker runs B, in file order.",
          "text": "The same worker runs B, in file order.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "next"
          ],
          "edges": [
            "next"
          ],
          "defs": [],
          "log": [
            "Running 3 tests using 1 worker, shard 1 of 2"
          ],
          "sources": [
            {
              "label": "workerMain.ts:242-250",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L242-L250"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "worker-1-runs-c-one-group-needs",
          "title": "Worker 1 runs C. One group needs one worker, so worker 2 never starts.",
          "text": "Worker 1 runs C. One group needs one worker, so worker 2 never starts.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "last"
          ],
          "edges": [
            "last"
          ],
          "defs": [],
          "log": [
            "Running 3 tests using 1 worker, shard 1 of 2"
          ],
          "sources": [
            {
              "label": "workerMain.ts:242-250",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L242-L250"
            },
            {
              "label": "tasks.ts:413-422",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/tasks.ts#L413-L422"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "selected",
          "step": "testmatch-and-grep-select-the-fi",
          "log": []
        },
        {
          "node": "groups",
          "step": "by-default-the-tests-of-one-file",
          "log": [],
          "edge": "select"
        },
        {
          "node": "shards",
          "step": "shard-1-takes-the-whole-group-a",
          "log": [],
          "edge": "shard"
        },
        {
          "node": "dispatch",
          "step": "shard-1-takes-the-whole-group-a",
          "log": [
            "Running 3 tests using 1 worker, shard 1 of 2"
          ],
          "edge": "dispatch"
        },
        {
          "node": "tests",
          "step": "shard-1-takes-the-whole-group-a",
          "log": []
        },
        {
          "node": "next",
          "step": "the-same-worker-runs-b-in-file-o",
          "log": [],
          "edge": "next"
        },
        {
          "node": "last",
          "step": "worker-1-runs-c-one-group-needs",
          "log": [],
          "edge": "last"
        }
      ]
    },
    {
      "id": "parallel-exceptions",
      "label": "Parallel exceptions",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "fullyParallel splits a file into tests",
        "text": "A serial describe and a shared beforeAll keep tests together."
      },
      "steps": [
        {
          "id": "with-fullyparallel-each-test-can",
          "title": "With fullyParallel, each test can be its own group.",
          "text": "With fullyParallel, each test can be its own group.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "parallel"
          ],
          "edges": [],
          "defs": [],
          "code": "bigfile",
          "log": [],
          "sources": [
            {
              "label": "loadUtils.ts:263-267",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/loadUtils.ts#L263-L267"
            },
            {
              "label": "testGroups.ts:85-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L85-L93"
            },
            {
              "label": "testGroups.ts:95-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L95-L109"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "two-shards-share-the-groups-a-an",
          "title": "Two shards share the groups: A and B, then C.",
          "text": "Two shards share the groups: A and B, then C.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "shards"
          ],
          "edges": [],
          "defs": [],
          "log": [],
          "sources": [
            {
              "label": "testGroups.ts:183-193",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L183-L193"
            },
            {
              "label": "testGroups.ts:170-181",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L170-L181"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "a-serial-describe-with-a-and-b-s",
          "title": "A serial describe with A and B stays one group.",
          "text": "A serial describe with A and B stays one group.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "serial"
          ],
          "edges": [],
          "defs": [],
          "log": [],
          "sources": [
            {
              "label": "testGroups.ts:85-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L85-L93"
            },
            {
              "label": "testGroups.ts:95-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L95-L109"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "four-tests-with-a-shared-beforea",
          "title": "Four tests with a shared beforeAll form two batches, one per shard.",
          "text": "Four tests with a shared beforeAll form two batches, one per shard.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "hooks"
          ],
          "edges": [],
          "defs": [],
          "log": [],
          "sources": [
            {
              "label": "testGroups.ts:122-131",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L122-L131"
            },
            {
              "label": "loadUtils.ts:191-203",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/loadUtils.ts#L191-L203"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "parallel",
          "step": "with-fullyparallel-each-test-can",
          "log": []
        },
        {
          "node": "shards",
          "step": "two-shards-share-the-groups-a-an",
          "log": []
        },
        {
          "node": "serial",
          "step": "a-serial-describe-with-a-and-b-s",
          "log": []
        },
        {
          "node": "hooks",
          "step": "four-tests-with-a-shared-beforea",
          "log": []
        }
      ]
    },
    {
      "id": "reuse-limits",
      "label": "Reuse limits",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "A free slot takes an allowed group",
        "text": "Example: two workers; project P allows one."
      },
      "steps": [
        {
          "id": "p-allows-one-worker-so-its-secon",
          "title": "P allows one worker, so its second file waits.",
          "text": "P allows one worker, so its second file waits.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "limits"
          ],
          "edges": [],
          "defs": [],
          "log": [],
          "sources": [
            {
              "label": "dispatcher.ts:236-240",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L236-L240"
            },
            {
              "label": "dispatcher.ts:87-92",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L87-L92"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "project-q-needs-its-own-worker-i",
          "title": "Project Q needs its own worker. It takes the second slot.",
          "text": "Project Q needs its own worker. It takes the second slot.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "dispatch"
          ],
          "edges": [],
          "defs": [],
          "log": [],
          "sources": [
            {
              "label": "testGroups.ts:30-37",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L30-L37"
            },
            {
              "label": "dispatcher.ts:236-240",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L236-L240"
            },
            {
              "label": "dispatcher.ts:87-92",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L87-L92"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "after-a-spec-ts-the-same-p-worke",
          "title": "After a.spec.ts, the same P worker takes b.spec.ts.",
          "text": "After a.spec.ts, the same P worker takes b.spec.ts.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "tests"
          ],
          "edges": [],
          "defs": [],
          "log": [],
          "sources": [
            {
              "label": "dispatcher.ts:115-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L115-L118"
            },
            {
              "label": "suiteUtils.ts:76-78",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/common/suiteUtils.ts#L76-L78"
            },
            {
              "label": "workerMain.ts:242-250",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L242-L250"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        },
        {
          "id": "if-a-group-needs-other-worker-fi",
          "title": "If a group needs other worker fixtures, the old worker stops first.",
          "text": "If a group needs other worker fixtures, the old worker stops first.",
          "show": [
            "selected",
            "groups",
            "parallel",
            "serial",
            "hooks",
            "shards",
            "dispatch",
            "limits",
            "compatible",
            "tests",
            "replacement",
            "next",
            "last"
          ],
          "current": [
            "replacement"
          ],
          "edges": [],
          "defs": [],
          "log": [],
          "sources": [
            {
              "label": "dispatcher.ts:149-157",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L149-L157"
            }
          ],
          "deeper": [
            {
              "title": "0.1 API calls leave from Node, page calls from the browser",
              "href": "/0-anatomy/0-1-anatomy-of-a-test/"
            },
            {
              "title": "4.1 Projects wait for successful dependencies",
              "href": "/4-runner/4-1-config-and-projects/"
            },
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "4.4 A retry is a new attempt in a new worker",
              "href": "/4-runner/4-4-retries-and-flaky/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "limits",
          "step": "p-allows-one-worker-so-its-secon",
          "log": []
        },
        {
          "node": "dispatch",
          "step": "project-q-needs-its-own-worker-i",
          "log": []
        },
        {
          "node": "tests",
          "step": "after-a-spec-ts-the-same-p-worke",
          "log": []
        },
        {
          "node": "replacement",
          "step": "if-a-group-needs-other-worker-fi",
          "log": []
        }
      ]
    }
  ],
  "definitions": {
    "selection": {
      "term": "Selection",
      "text": "testMatch and testIgnore filter files; grep filters test titles including tags."
    },
    "group": {
      "term": "Compatible file group",
      "text": "Nonparallel tests share a file group within the same worker hash; projects, repetition and worker fixtures separate groups."
    },
    "parallel": {
      "term": "Parallel groups",
      "text": "Parallel tests without all-hooks or an outer sequential suite can form individual groups; a serial describe stays together."
    },
    "hooks": {
      "term": "All-hook batches",
      "text": "Parallel tests with all-hooks and no outer sequential suite are batched using expected parallelism. Sharding first uses shard count, then worker count."
    },
    "shard": {
      "term": "Whole-group sharding",
      "text": "Shard target sizes use test counts. A whole group goes to the shard containing its first test position; statically skipped tests normally do not count."
    },
    "dispatch": {
      "term": "Worker dispatch",
      "text": "The dispatcher allocates bounded slots, respects project limits and scheduling locks, and prefers a free compatible worker. A mismatched or stopping worker stops before replacement."
    },
    "order": {
      "term": "Ordered execution",
      "text": "The worker awaits each test before advancing to the next test in its assigned group."
    },
    "file-selection": {
      "term": "File selection",
      "text": "testMatch and testIgnore filter supported test files."
    },
    "compatible-grouping": {
      "term": "Compatible grouping",
      "text": "Worker hash and required file partition groups."
    },
    "parallel-tests": {
      "term": "Parallel tests",
      "text": "Without all-hooks, parallel groups use the test or outer sequential suite as key."
    },
    "all-hook-batches": {
      "term": "All-hook batches",
      "text": "Batch size uses the number of tests and expected parallelism."
    },
    "whole-groups": {
      "term": "Whole groups",
      "text": "A shard receives a group according to its first test position."
    },
    "worker-slots": {
      "term": "Worker slots",
      "text": "The dispatcher allocates the configured number of slots."
    },
    "project-limit": {
      "term": "Project limit",
      "text": "The scheduler checks running workers against the project limit."
    },
    "compatible-reuse": {
      "term": "Compatible reuse",
      "text": "The dispatcher prefers a free worker with the same hash."
    },
    "Replacement": {
      "term": "Replacement",
      "text": "A mismatched or stopping worker is stopped before replacement."
    },
    "ordered-execution": {
      "term": "Ordered execution",
      "text": "The worker awaits each test before advancing."
    }
  },
  "code": {
    "group": {
      "title": "Inside Playwright · testGroups.ts",
      "source": {
        "label": "testGroups.ts:115-115",
        "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L115"
      },
      "lines": [
        "// Tests without parallel mode should run serially as a single group.",
        "if (withRequireFile.general.tests.length)",
        "  result.push(withRequireFile.general);"
      ]
    },
    "bigfile": {
      "title": "In your test · one big file",
      "lines": [
        "// 40 tests in one file:",
        "// ✗ Four workers, still one group",
        "export default defineConfig({ workers: 4 });",
        "// ✓ Let the tests of one file split",
        "export default defineConfig({",
        "  workers: 4,",
        "  fullyParallel: true,",
        "});"
      ]
    }
  },
  "conceptScenario": "intro",
  "concepts": [
    {
      "label": "Runner process",
      "layer": "runner",
      "items": [
        {
          "definition": "file-selection",
          "short": "testMatch and testIgnore filter supported test files.",
          "nodes": [
            "selected"
          ],
          "step": {
            "step": "selection-happens-in-the-runner"
          },
          "source": {
            "label": "projectUtils.ts:147-160",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/projectUtils.ts#L147-L160"
          }
        },
        {
          "definition": "compatible-grouping",
          "short": "Worker hash and required file partition groups.",
          "nodes": [
            "groups"
          ],
          "step": {
            "step": "compatible-tests-form-file-group"
          },
          "source": {
            "label": "testGroups.ts:68-81",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L68-L81"
          }
        },
        {
          "definition": "parallel-tests",
          "short": "Without all-hooks, parallel groups use the test or outer sequential suite as key.",
          "nodes": [
            "parallel",
            "serial"
          ],
          "step": {
            "step": "parallel-mode-has-exceptions"
          },
          "source": {
            "label": "testGroups.ts:95-109",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L95-L109"
          }
        },
        {
          "definition": "all-hook-batches",
          "short": "Batch size uses the number of tests and expected parallelism.",
          "nodes": [
            "hooks"
          ],
          "step": {
            "step": "all-hooks-share-batches"
          },
          "source": {
            "label": "testGroups.ts:122-131",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L122-L131"
          }
        },
        {
          "definition": "whole-groups",
          "short": "A shard receives a group according to its first test position.",
          "nodes": [
            "shards"
          ],
          "step": {
            "step": "shards-keep-groups-whole"
          },
          "source": {
            "label": "testGroups.ts:183-193",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/testGroups.ts#L183-L193"
          }
        },
        {
          "definition": "worker-slots",
          "short": "The dispatcher allocates the configured number of slots.",
          "nodes": [
            "dispatch"
          ],
          "step": {
            "step": "slots-bound-dispatch-and-reuse"
          },
          "source": {
            "label": "dispatcher.ts:236-240",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L236-L240"
          }
        },
        {
          "definition": "project-limit",
          "short": "The scheduler checks running workers against the project limit.",
          "nodes": [
            "limits"
          ],
          "step": {
            "step": "slots-bound-dispatch-and-reuse"
          },
          "source": {
            "label": "dispatcher.ts:87-92",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L87-L92"
          }
        },
        {
          "definition": "compatible-reuse",
          "short": "The dispatcher prefers a free worker with the same hash.",
          "nodes": [
            "compatible"
          ],
          "step": {
            "step": "slots-bound-dispatch-and-reuse"
          },
          "source": {
            "label": "dispatcher.ts:115-118",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L115-L118"
          }
        },
        {
          "definition": "Replacement",
          "short": "A mismatched or stopping worker is stopped before replacement.",
          "nodes": [
            "replacement"
          ],
          "step": {
            "step": "slots-bound-dispatch-and-reuse"
          },
          "source": {
            "label": "dispatcher.ts:149-157",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/runner/dispatcher.ts#L149-L157"
          }
        }
      ]
    },
    {
      "label": "Worker process",
      "layer": "runner",
      "items": [
        {
          "definition": "ordered-execution",
          "short": "The worker awaits each test before advancing.",
          "nodes": [
            "tests"
          ],
          "step": {
            "step": "workers-run-assigned-tests-in-or"
          },
          "source": {
            "label": "workerMain.ts:242-250",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L242-L250"
          }
        }
      ]
    }
  ],
  "callouts": {
    "1": [
      "selected",
      "groups"
    ],
    "2": [
      "groups",
      "parallel",
      "serial",
      "hooks"
    ],
    "3": [
      "shards"
    ],
    "4": [
      "dispatch",
      "compatible",
      "tests"
    ]
  },
  "deeper": [
    {
      "title": "0.1 API calls leave from Node, page calls from the browser",
      "href": "/0-anatomy/0-1-anatomy-of-a-test/",
      "why": "Runner and worker processes."
    },
    {
      "title": "4.1 Projects wait for successful dependencies",
      "href": "/4-runner/4-1-config-and-projects/",
      "why": "Project selection and scheduling."
    },
    {
      "title": "4.2 Built on demand, torn down in reverse",
      "href": "/4-runner/4-2-custom-fixtures/",
      "why": "Worker fixtures and their scope."
    },
    {
      "title": "4.4 A retry is a new attempt in a new worker",
      "href": "/4-runner/4-4-retries-and-flaky/",
      "why": "New attempts in new workers."
    }
  ],
  "viewBox": [
    457.355,
    1067
  ],
  "measurement": {
    "name": "font-table",
    "labels": {
      "select": {
        "width": 82.17299999999999,
        "height": 12.6
      },
      "serial": {
        "width": 37.925999999999995,
        "height": 12.6
      },
      "hooks": {
        "width": 56.88899999999999,
        "height": 12.6
      },
      "shard": {
        "width": 63.20999999999999,
        "height": 12.6
      },
      "dispatch": {
        "width": 50.56799999999999,
        "height": 12.6
      },
      "reuse": {
        "width": 63.20999999999999,
        "height": 12.6
      },
      "run": {
        "width": 75.85199999999999,
        "height": 12.6
      },
      "replace": {
        "width": 44.24699999999999,
        "height": 12.6
      }
    }
  }
}
