Skip to content

Commit acd0a55

Browse files
Merge pull request #52 from gemini-testing/TESTPLANE-390.docs
docs: add docs about list-browsers command
2 parents 606c23e + cd5fb1f commit acd0a55

File tree

2 files changed

+139
-0
lines changed
  • docs/command-line
  • i18n/ru/docusaurus-plugin-content-docs/current/command-line

2 files changed

+139
-0
lines changed

docs/command-line/index.mdx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,75 @@ For example, [html-reporter][html-reporter] adds `gui` command.
464464
testplane list-tests --help
465465
```
466466
467+
## `list-browsers` command
468+
469+
Command to get all browsers from the config.
470+
471+
```bash
472+
> npx testplane list-browsers --help
473+
474+
Usage: list-browsers [options]
475+
476+
Lists all browsers from the config
477+
478+
Options:
479+
480+
--type [type] return browsers in specified type ('tags': browserName and browserVersion, 'ids': browserId from config) (default: tags)
481+
--format [format] return browsers in specified format ('json' / 'plain') (default: json)
482+
-h, --help output usage information
483+
```
484+
485+
For example,
486+
487+
```
488+
npx testplane list-browsers --type ids --format plain
489+
```
490+
491+
### Options {#list-browsers-options}
492+
493+
#### Type {#list-browsers-type}
494+
495+
Specify type of output data: browserId from config or browserName with browserVersion.
496+
497+
```bash
498+
testplane list-browsers --type tags
499+
```
500+
501+
#### Format {#list-browsers-format}
502+
503+
Specify format of output data: plain text or json.
504+
505+
```bash
506+
testplane list-browsers --format json
507+
```
508+
509+
#### Example {#list-browsers-example}
510+
511+
If you have the following "browsers" section in your [Testplane config](/docs/v8/config/main):
512+
513+
```json
514+
{
515+
"my-chrome": { "desiredCapabilities": { "browserName": "chrome", "browserVersion": "130.0" } },
516+
"my-safari": { "desiredCapabilities": { "browserName": "safari" } }
517+
}
518+
```
519+
520+
The following commands will provide corresponding result:
521+
| Command | Result |
522+
|:--------------------------------------------------:|:----------------------------------------------------------------------------:|
523+
| `testplane list-browsers --type ids --format plain` | `my-chrome my-safari` |
524+
| `testplane list-browsers --type ids --format json` | `["my-chrome","my-safari"]` |
525+
| `testplane list-browsers --type tags --format plain` | `[email protected] safari` |
526+
| `testplane list-browsers --type tags --format json` | `[{"browserName":"chrome","browserVersion":"130.0"},{"browserName":"safari"}]` |
527+
528+
#### Help {#list-browsers-help}
529+
530+
Prints out information about the command and its options.
531+
532+
```bash
533+
testplane list-browsers --help
534+
```
535+
467536
## `install-deps` command {#install-deps}
468537
469538
This command is a part of the guide [How to launch Testplane in the local browser](/docs/v8/guides/local-browsers).

i18n/ru/docusaurus-plugin-content-docs/current/command-line/index.mdx

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,76 @@ it("test2", () => {});
465465
testplane list-tests --help
466466
```
467467
468+
## Команда `list-browsers`
469+
470+
Команда для получения всех браузеров из конфигурации.
471+
472+
```bash
473+
> npx testplane list-browsers --help
474+
475+
Usage: list-browsers [options]
476+
477+
Lists all browsers from the config
478+
479+
Options:
480+
481+
--type [type] return browsers in specified type ('tags': browserName and browserVersion, 'ids': browserId from config) (default: tags)
482+
--format [format] return browsers in specified format ('json' / 'plain') (default: json)
483+
-h, --help output usage information
484+
```
485+
486+
Например,
487+
488+
```
489+
npx testplane list-browsers --type ids --format plain
490+
```
491+
492+
### Опции {#list-browsers-options}
493+
494+
#### Type {#list-browsers-type}
495+
496+
Укажите тип выводимых данных: browserId из конфигурации или browserName с browserVersion.
497+
498+
```bash
499+
testplane list-browsers --type tags
500+
```
501+
502+
#### Format {#list-browsers-format}
503+
504+
Укажите формат выводимых данных: обычный текст или json.
505+
506+
```bash
507+
testplane list-browsers --format json
508+
```
509+
510+
#### Пример {#list-browsers-example}
511+
512+
Если у вас имеется следующий раздел "browsers" в вашей конфигурации [Testplane](/docs/v8/config/main):
513+
514+
```json
515+
{
516+
"my-chrome": { "desiredCapabilities": { "browserName": "chrome", "browserVersion": "130.0" } },
517+
"my-safari": { "desiredCapabilities": { "browserName": "safari" } }
518+
}
519+
```
520+
521+
Следующие команды произведут соответствующий результат:
522+
523+
| Команда | Результат |
524+
| :--------------------------------------------------: | :----------------------------------------------------------------------------: |
525+
| `testplane list-browsers --type ids --format plain` | `my-chrome my-safari` |
526+
| `testplane list-browsers --type ids --format json` | `["my-chrome","my-safari"]` |
527+
| `testplane list-browsers --type tags --format plain` | `[email protected] safari` |
528+
| `testplane list-browsers --type tags --format json` | `[{"browserName":"chrome","browserVersion":"130.0"},{"browserName":"safari"}]` |
529+
530+
#### Help {#list-browsers-help}
531+
532+
Выводит информацию команде и ее опциях.
533+
534+
```bash
535+
testplane list-browsers --help
536+
```
537+
468538
## Команда `install-deps` {#install-deps}
469539
470540
Эта команда является частью рецепта [Как запустить Testplane в локальном браузере](/docs/v8/guides/local-browsers).

0 commit comments

Comments
 (0)