You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the `devServer` section, you can run a server that tests will interact with. The server starts during the initialization of Testplane on the INIT event.
6
7
8
+
<Admonitiontype="warning">
9
+
The `devServer` section is only responsible for launching the server.
10
+
11
+
Keep in mind that the `devServer` configuration does not change the `baseUrl`, which must be set correctly manually.
12
+
13
+
</Admonition>
14
+
7
15
## Example Usage {#example}
8
16
9
17
<DevServerExample />
@@ -28,6 +36,15 @@ With the `devServer` section, you can run a server that tests will interact with
28
36
Command to start the dev server. If not specified, the dev server will not be started.
29
37
</td>
30
38
</tr>
39
+
<tr>
40
+
<td>[`reuseExisting`](#reuseexisting)</td>
41
+
<td>`boolean`</td>
42
+
<td>`false`</td>
43
+
<td>
44
+
Reuse an existing dev server if it's already running, instead of spawning a new one. Requires setting the "url" property in "readinessProbe" section.
45
+
This readiness probe will be used to verify that the server is ready.
46
+
</td>
47
+
</tr>
31
48
<tr>
32
49
<td>[`env`](#env)</td>
33
50
<td>`Record<string, string>`</td>
@@ -75,6 +92,12 @@ With the `devServer` section, you can run a server that tests will interact with
75
92
76
93
Command to start the dev server. If not specified, the dev server will not be started.
77
94
95
+
### reuseExisting {#reuseexisting}
96
+
97
+
Reuse an existing dev server if it's already running, instead of spawning a new one. When enabled, Testplane will check if a server is already available at the specified URL before attempting to start a new one.
98
+
99
+
This option requires setting the `url` property in the `readinessProbe` section, which will be used to verify that the server is ready and accessible.
100
+
78
101
### env {#env}
79
102
80
103
Environment variables to be passed to the dev server process, in addition to the main process's `process.env`.
С помощью секции `devServer` можно запускать сервер, на который будут ходить тесты. Запуск происходит во время инициализации Testplane на событие INIT.
6
7
8
+
<Admonitiontype="warning">
9
+
Секция devServer отвечает только за поднятие сервера.
10
+
11
+
Стоит учитывать, что описание devServer секции не изменяет `baseUrl`, который нужно указывать правильно вручную.
12
+
13
+
</Admonition>
14
+
7
15
## Пример использования {#example}
8
16
9
17
<DevServerExample />
@@ -28,6 +36,15 @@ import DevServerExample from "@site/docs/config/_partials/examples/_dev-server-e
28
36
Команда для запуска dev сервера. Если не указана, dev сервер не будет запущен.
29
37
</td>
30
38
</tr>
39
+
<tr>
40
+
<td>[`reuseExisting`](#reuseexisting)</td>
41
+
<td>`boolean`</td>
42
+
<td>`false`</td>
43
+
<td>
44
+
Переиспользовать уже запущенный dev сервер вместо создания нового. Требует указания свойства "url" в секции "readinessProbe".
45
+
Эта проверка готовности будет использоваться для проверки того, что сервер готов к работе.
46
+
</td>
47
+
</tr>
31
48
<tr>
32
49
<td>[`env`](#env)</td>
33
50
<td>`Record<string, string>`</td>
@@ -75,6 +92,12 @@ import DevServerExample from "@site/docs/config/_partials/examples/_dev-server-e
75
92
76
93
Команда для запуска dev сервера. Если не указана, dev сервер не будет запущен.
77
94
95
+
### reuseExisting {#reuseexisting}
96
+
97
+
Переиспользовать уже запущенный dev сервер вместо создания нового. Когда эта опция включена, Testplane проверит, доступен ли сервер по указанному URL, прежде чем пытаться запустить новый.
98
+
99
+
Эта опция требует указания свойства `url` в секции `readinessProbe`, которое будет использоваться для проверки того, что сервер готов и доступен.
100
+
78
101
### env {#env}
79
102
80
103
Переменные окружения, которые должны быть переданы процессу с dev сервером, в дополнение к `process.env` основного процесса.
0 commit comments