Skip to content

docs-parallelism#117

Open
Nikolaengel wants to merge 27 commits intogemini-testing:masterfrom
Nikolaengel:docs-parallelism
Open

docs-parallelism#117
Nikolaengel wants to merge 27 commits intogemini-testing:masterfrom
Nikolaengel:docs-parallelism

Conversation

@Nikolaengel
Copy link
Collaborator

No description provided.

@Nikolaengel Nikolaengel changed the title docs: file-creation docs: parallelism Mar 10, 2026
};
```

## Рекомендуемые настройки и как их рассчитать

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Рекомендуемые настройки и их расчет?

testsPerSession = 20–40 (для ускорения) или 1 (для максимальной изоляции)
```

#### Пример расчёта для CI

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать ё

};
```

#### Пример расчёта для локального запуска

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать ё


#### Установка и подключение

Чтобы установить плагин `@testplane/chunks` выполните команду.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужна запятая после @testplane/chunks


Мастер-процесс управляет очередью тестов и распределяет их по воркерам. Каждый воркер — это отдельный `Node.js`-процесс, который может держать одну или несколько браузерных сессий и последовательно выполнять в них тесты.

Тесты внутри одного `describe`-блока по умолчанию выполняются последовательно — в том порядке, в котором они объявлены. Параллелизм достигается за счёт одновременного выполнения тестов из разных файлов и разных браузеров в разных воркерах.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать ё (за счет)


#### Лимит тестов за сессию

Параметр `testsPerSession` отвечает за максимальное число тестов, которые выполнятся в одной браузерной сессии до её пересоздания.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать ё

| -------------------- | ------------ | ---------------------------------------------------------- | ------------------------------------------------- |
| `workers` | Глобальный | Количество параллельных `Node.js`-процессов | CPU, память на машине с тестами |
| `sessionsPerBrowser` | Браузер | Количество одновременных браузерных сессий | Нагрузку на `grid`, скорость прохождения |
| `testsPerSession` | Браузер | Сколько тестов выполнить в одной сессии до её пересоздания | Скорость (меньше накладных расходов) vs изоляция |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать ё


#### Базовая формула

Отправной точкой для расчёта является количество ядер CPU и доступная память на машине, где запускаются браузеры (Selenium Grid, Selenoid, или локальная машина).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать ё

Copy link

@janair77 janair77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

комментарий

Номер чанка и общее количество чанков передаются через переменные окружения или CLI-параметры:

```bash
# Запустить первый чанк из четырёх

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать ё

# Запустить первый чанк из четырёх
npx testplane --chunks 4 --chunk 1

# Запустить второй чанк из четырёх

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать ё

Copy link

@janair77 janair77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

комментарий

@Nikolaengel Nikolaengel changed the title docs: parallelism docs-parallelism Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants