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
Copy file name to clipboardExpand all lines: docs/html-reporter/html-reporter-setup.mdx
+82Lines changed: 82 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ import ConfigExamples from "/docs/_partials/html-reporter-config-examples.mdx";
35
35
<tr><td>[plugins](#plugins)</td><td>`Plugin[]`</td><td>`[]`</td><td>A list of plugins with their settings.</td></tr>
36
36
<tr><td>[customScripts](#customscripts)</td><td>`AnyFunction[]`</td><td>`[]`</td><td>A list of functions that implement custom scripts. For example, Yandex.Metrika scripts or a Bug.</td></tr>
<tr><td>[badgeFormatter](#badgeformatter)</td><td>`BadgeFormatter`</td><td>`null`</td><td>A callback that is called after every test run. It receives the test result and returns a list of badges.</td></tr>
38
39
39
40
</tbody>
40
41
</table>
@@ -288,6 +289,86 @@ If you don't want to share analytics with us, you can disable it in any of the f
288
289
- Using environment variables: `html_reporter_yandex_metrika_enabled=false` or simply `NO_ANALYTICS=true`
289
290
- Using CLI arguments: `--html-reporter-yandex_metrika_enabled=false`
290
291
292
+
### badgeFormatter
293
+
294
+
A callback that is called after every test run. It receives the test result and returns a list of badges.
295
+
296
+
Usage example: here we set the ticket name and URL, the branch name, and the speed test indicator.
<td>Optional parameter. Name of icon from [GravityUI][gravity-ui-icons].</td>
363
+
</tr>
364
+
<tr>
365
+
<td>`url`</td>
366
+
<td>`string`</td>
367
+
<td>Optional parameter. Url of badge.</td>
368
+
</tr>
369
+
</tbody>
370
+
</table>
371
+
291
372
### Passing parameters via the CLI {#setup_by_cli}
292
373
293
374
All plugin parameters that can be defined in the config can also be passed as command line options or through environment variables during Testplane startup. Use the prefix `--html-reporter-` for command line options and `html_reporter_` for environment variables.
@@ -328,3 +409,4 @@ Files that are created during the execution of tests:
Copy file name to clipboardExpand all lines: i18n/ru/docusaurus-plugin-content-docs/current/html-reporter/html-reporter-setup.mdx
+81Lines changed: 81 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ import ConfigExamples from "../_partials/html-reporter-config-examples.mdx";
33
33
<tr><td>[plugins](#plugins)</td><td>`Plugin[]`</td><td>`[]`</td><td>Список плагинов с их настройками.</td></tr>
34
34
<tr><td>[customScripts](#customscripts)</td><td>`AnyFunction[]`</td><td>`[]`</td><td>Список функций, реализующих кастомные скрипты. Например, скрипты Яндекс.Метрики или Жучка.</td></tr>
<tr><td>[badgeFormatter](#badgeformatter)</td><td>`BadgeFormatter`</td><td>`null`</td><td>Колбэк, который вызывается после каждого запуска теста. Он получает результат теста и возвращает список бейджей.</td></tr>
36
37
37
38
</tbody>
38
39
</table>
@@ -286,6 +287,86 @@ customScripts: [
286
287
- С помощью переменных окружения: `html_reporter_yandex_metrika_enabled=false` или просто `NO_ANALYTICS=true`
287
288
- С помощью аргументов CLI: `--html-reporter-yandex_metrika_enabled=false`
288
289
290
+
### badgeFormatter
291
+
292
+
Колбэк, который вызывается после каждого запуска теста. Он получает результат теста и возвращает список бейджей.
293
+
294
+
Пример использования: здесь мы задаём название тикета и URL, название ветки и индикатор скорости теста.
<td>Обязательный параметр. Отображаемое имя бейджа.</td>
356
+
</tr>
357
+
<tr>
358
+
<td>`icon`</td>
359
+
<td>`string`</td>
360
+
<td>Опциональный параметр. Имя иконки из [GravityUI][gravity-ui-icons].</td>
361
+
</tr>
362
+
<tr>
363
+
<td>`url`</td>
364
+
<td>`string`</td>
365
+
<td>Опциональный параметр. Ссылка которая откроется при клике на бейдж.</td>
366
+
</tr>
367
+
</tbody>
368
+
</table>
369
+
289
370
### Передача параметров через CLI {#setup_by_cli}
290
371
291
372
Все параметры плагина, которые можно определить в конфиге, можно также передать в виде опций командной строки или через переменные окружения во время запуска testplane. Используйте префикс `--html-reporter-` для опций командной строки и `html_reporter_` — для переменных окружения.
0 commit comments