-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from gemini-testing/TESTPLANE-390.docs
docs: add docs about list-browsers command
- Loading branch information
Showing
2 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -464,6 +464,75 @@ For example, [html-reporter][html-reporter] adds `gui` command. | |
testplane list-tests --help | ||
``` | ||
## `list-browsers` command | ||
Command to get all browsers from the config. | ||
```bash | ||
> npx testplane list-browsers --help | ||
Usage: list-browsers [options] | ||
Lists all browsers from the config | ||
Options: | ||
--type [type] return browsers in specified type ('tags': browserName and browserVersion, 'ids': browserId from config) (default: tags) | ||
--format [format] return browsers in specified format ('json' / 'plain') (default: json) | ||
-h, --help output usage information | ||
``` | ||
For example, | ||
``` | ||
npx testplane list-browsers --type ids --format plain | ||
``` | ||
### Options {#list-browsers-options} | ||
#### Type {#list-browsers-type} | ||
Specify type of output data: browserId from config or browserName with browserVersion. | ||
```bash | ||
testplane list-browsers --type tags | ||
``` | ||
#### Format {#list-browsers-format} | ||
Specify format of output data: plain text or json. | ||
```bash | ||
testplane list-browsers --format json | ||
``` | ||
#### Example {#list-browsers-example} | ||
If you have the following "browsers" section in your [Testplane config](/docs/v8/config/main): | ||
```json | ||
{ | ||
"my-chrome": { "desiredCapabilities": { "browserName": "chrome", "browserVersion": "130.0" } }, | ||
"my-safari": { "desiredCapabilities": { "browserName": "safari" } } | ||
} | ||
``` | ||
The following commands will provide corresponding result: | ||
| Command | Result | | ||
|:--------------------------------------------------:|:----------------------------------------------------------------------------:| | ||
| `testplane list-browsers --type ids --format plain` | `my-chrome my-safari` | | ||
| `testplane list-browsers --type ids --format json` | `["my-chrome","my-safari"]` | | ||
| `testplane list-browsers --type tags --format plain` | `[email protected] safari` | | ||
| `testplane list-browsers --type tags --format json` | `[{"browserName":"chrome","browserVersion":"130.0"},{"browserName":"safari"}]` | | ||
#### Help {#list-browsers-help} | ||
Prints out information about the command and its options. | ||
```bash | ||
testplane list-browsers --help | ||
``` | ||
## `install-deps` command {#install-deps} | ||
This command is a part of the guide [How to launch Testplane in the local browser](/docs/v8/guides/local-browsers). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -465,6 +465,76 @@ it("test2", () => {}); | |
testplane list-tests --help | ||
``` | ||
## Команда `list-browsers` | ||
Команда для получения всех браузеров из конфигурации. | ||
```bash | ||
> npx testplane list-browsers --help | ||
Usage: list-browsers [options] | ||
Lists all browsers from the config | ||
Options: | ||
--type [type] return browsers in specified type ('tags': browserName and browserVersion, 'ids': browserId from config) (default: tags) | ||
--format [format] return browsers in specified format ('json' / 'plain') (default: json) | ||
-h, --help output usage information | ||
``` | ||
Например, | ||
``` | ||
npx testplane list-browsers --type ids --format plain | ||
``` | ||
### Опции {#list-browsers-options} | ||
#### Type {#list-browsers-type} | ||
Укажите тип выводимых данных: browserId из конфигурации или browserName с browserVersion. | ||
```bash | ||
testplane list-browsers --type tags | ||
``` | ||
#### Format {#list-browsers-format} | ||
Укажите формат выводимых данных: обычный текст или json. | ||
```bash | ||
testplane list-browsers --format json | ||
``` | ||
#### Пример {#list-browsers-example} | ||
Если у вас имеется следующий раздел "browsers" в вашей конфигурации [Testplane](/docs/v8/config/main): | ||
```json | ||
{ | ||
"my-chrome": { "desiredCapabilities": { "browserName": "chrome", "browserVersion": "130.0" } }, | ||
"my-safari": { "desiredCapabilities": { "browserName": "safari" } } | ||
} | ||
``` | ||
Следующие команды произведут соответствующий результат: | ||
| Команда | Результат | | ||
| :--------------------------------------------------: | :----------------------------------------------------------------------------: | | ||
| `testplane list-browsers --type ids --format plain` | `my-chrome my-safari` | | ||
| `testplane list-browsers --type ids --format json` | `["my-chrome","my-safari"]` | | ||
| `testplane list-browsers --type tags --format plain` | `[email protected] safari` | | ||
| `testplane list-browsers --type tags --format json` | `[{"browserName":"chrome","browserVersion":"130.0"},{"browserName":"safari"}]` | | ||
#### Help {#list-browsers-help} | ||
Выводит информацию команде и ее опциях. | ||
```bash | ||
testplane list-browsers --help | ||
``` | ||
## Команда `install-deps` {#install-deps} | ||
Эта команда является частью рецепта [Как запустить Testplane в локальном браузере](/docs/v8/guides/local-browsers). | ||
|