playwright/src
Andrey Lushnikov 4f762ba90a
feat: introduce experimental general-purpose grid (#8941)
This patch adds a general-purpose grid framework to parallelize
Playwright across multiple agents.

This patch adds two CLI commands to manage grid:

- `npx playwright experimental-grid-server` - to launch grid
- `npx playwrigth experimental-grid-agent` - to launch agent in a host
  environment.

Grid server accepts an `--agent-factory` argument. A simple
`factory.js` might look like this:

```js
const child_process = require('child_process');

module.exports = {
  name: 'My Simple Factory',
  capacity: Infinity, // How many workers launch per agent
  timeout: 10_000, // 10 seconds timeout to create agent
  launch: ({agentId, gridURL, playwrightVersion}) => child_process.spawn(`npx`, [
    'playwright'
    'experimental-grid-agent',
    '--grid-url', gridURL,
    '--agent-id', agentId,
  ], {
    cwd: __dirname,
    shell: true,
    stdio: 'inherit',
  }),
};
```

With this `factory.js`, grid server could be launched like this:

```bash
npx playwright experimental-grid-server --factory=./factory.js
```

Once launched, it could be used with Playwright Test using env variable:

```bash
PW_GRID=http://localhost:3000 npx playwright test
```
2021-09-16 01:20:36 -07:00
..
cli feat: introduce experimental general-purpose grid (#8941) 2021-09-16 01:20:36 -07:00
client feat(fetch): introduce FetchRequest.dispose, fulfill with global fetch (#8945) 2021-09-15 14:02:55 -07:00
common feat(headers): add Headers.headers that would mimic the behavior of the deprecated getters (#8665) 2021-09-02 20:48:23 -07:00
dispatchers feat(fetch): introduce FetchRequest.dispose, fulfill with global fetch (#8945) 2021-09-15 14:02:55 -07:00
grid feat: introduce experimental general-purpose grid (#8941) 2021-09-16 01:20:36 -07:00
protocol feat(fetch): introduce FetchRequest.dispose, fulfill with global fetch (#8945) 2021-09-15 14:02:55 -07:00
remote chore: move sdkLanguage over to the protocol init call (#8329) 2021-08-20 21:32:21 +02:00
server feat(fetch): introduce FetchRequest.dispose, fulfill with global fetch (#8945) 2021-09-15 14:02:55 -07:00
test feat: introduce experimental general-purpose grid (#8941) 2021-09-16 01:20:36 -07:00
third_party chore: bring in folio source (#6923) 2021-06-06 17:09:53 -07:00
utils feat: introduce experimental general-purpose grid (#8941) 2021-09-16 01:20:36 -07:00
web fix: center image diff (#8947) 2021-09-15 12:26:00 -07:00
.eslintrc.js chore(lint): add @typescript-eslint/type-annotation-spacing rule (#897) 2020-02-07 13:36:49 -08:00
browserServerImpl.ts chore(channels): generate dispatcher event types (#8540) 2021-08-30 18:43:18 +02:00
inprocess.ts chore: move sdkLanguage over to the protocol init call (#8329) 2021-08-20 21:32:21 +02:00
nativeDeps.ts fix(webkit): add libevdev dep (#7630) 2021-07-14 20:20:03 -07:00
outofprocess.ts chore(protocol): do client hello instead of server hello (#8019) 2021-08-19 17:31:14 +02:00