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/cli-reference.md
+32-28Lines changed: 32 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,32 @@
2
2
3
3
This document describes the command line interface for Testo.
4
4
5
+
::: info Binary Path
6
+
If Testo is installed via Composer, the binary path will be `vendor/bin/testo`. The examples below use just `testo` for brevity, but in real projects use `vendor/bin/testo` or set up an alias in your environment.
7
+
:::
8
+
5
9
## Commands
6
10
7
-
### `run`
11
+
### `testo run`
8
12
9
13
Execute test suites with optional filtering and output formatting.
10
14
11
15
This is the default command and can be omitted when using flags.
12
16
13
17
```bash
14
-
./bin/testo run [options]
15
-
./bin/testo [options] # run is optional
18
+
testo run [options]
19
+
testo [options] # run is optional
16
20
```
17
21
18
22
**Examples:**
19
23
```bash
20
24
# Explicit run command
21
-
./bin/testo run
22
-
./bin/testo run --suite=Unit
25
+
testo run
26
+
testo run --suite=Unit
23
27
24
28
# Implicit run command (default)
25
-
./bin/testo
26
-
./bin/testo --suite=Unit
29
+
testo
30
+
testo --suite=Unit
27
31
```
28
32
29
33
## Common Configuration Flags
@@ -36,8 +40,8 @@ Specify path to configuration file.
36
40
37
41
**Examples:**
38
42
```bash
39
-
./bin/testo run --config=./custom-testo.php
40
-
./bin/testo run --suite=Integration --config=./ci-testo.php
43
+
testo run --config=./custom-testo.php
44
+
testo run --suite=Integration --config=./ci-testo.php
41
45
```
42
46
43
47
## Running Tests
@@ -52,8 +56,8 @@ Used by the [Testo plugin](https://plugins.jetbrains.com/plugin/28842-testo) for
52
56
53
57
**Examples:**
54
58
```bash
55
-
./bin/testo --teamcity
56
-
./bin/testo --suite=Unit --teamcity
59
+
testo --teamcity
60
+
testo --suite=Unit --teamcity
57
61
```
58
62
59
63
### Filtering
@@ -76,10 +80,10 @@ Filter tests by test suite name. Suites are defined in configuration.
76
80
**Examples:**
77
81
```bash
78
82
# Single suite
79
-
./bin/testo run --suite=Unit
83
+
testo run --suite=Unit
80
84
81
85
# Multiple suites
82
-
./bin/testo run --suite=Unit --suite=Integration
86
+
testo run --suite=Unit --suite=Integration
83
87
```
84
88
85
89
#### `--path`
@@ -95,16 +99,16 @@ Filter test files by glob patterns. Supports wildcards: `*`, `?`, `[abc]`
95
99
**Examples:**
96
100
```bash
97
101
# Matches tests/Unit*
98
-
./bin/testo run --path="tests/Unit"
102
+
testo run --path="tests/Unit"
99
103
100
104
# Matches tests/Unit/*Test.php
101
-
./bin/testo run --path="tests/Unit/*Test.php"
105
+
testo run --path="tests/Unit/*Test.php"
102
106
103
107
# Multiple paths
104
-
./bin/testo run --path="tests/Unit" --path="tests/Integration"
108
+
testo run --path="tests/Unit" --path="tests/Integration"
105
109
106
110
# Nested directories
107
-
./bin/testo run --path="tests/*/Security/*Test.php"
111
+
testo run --path="tests/*/Security/*Test.php"
108
112
```
109
113
110
114
#### `--filter`
@@ -121,23 +125,23 @@ Filter tests by class, method, or function names.
121
125
**Examples:**
122
126
```bash
123
127
# Specific method
124
-
./bin/testo run --filter=UserTest::testLogin
128
+
testo run --filter=UserTest::testLogin
125
129
126
130
# Entire class
127
-
./bin/testo run --filter=UserTest
131
+
testo run --filter=UserTest
128
132
129
133
# By FQN
130
-
./bin/testo run --filter=Tests\Unit\UserTest
134
+
testo run --filter=Tests\Unit\UserTest
131
135
132
136
# Method name across all classes
133
-
./bin/testo run --filter=testLogin
137
+
testo run --filter=testLogin
134
138
135
139
# Multiple filters (OR)
136
-
./bin/testo run --filter=UserTest::testCreate --filter=UserTest::testUpdate
140
+
testo run --filter=UserTest::testCreate --filter=UserTest::testUpdate
137
141
138
142
# Combine with other filters (AND)
139
-
./bin/testo run --filter=testAuthentication --suite=Unit
140
-
./bin/testo run --filter=UserTest --path="tests/Unit"
143
+
testo run --filter=testAuthentication --suite=Unit
144
+
testo run --filter=UserTest --path="tests/Unit"
141
145
```
142
146
143
147
**Filter Behavior:** See [Filtering](/docs/filtering) for details.
@@ -147,16 +151,16 @@ Filter tests by class, method, or function names.
147
151
**Examples:**
148
152
```bash
149
153
# Name AND suite
150
-
./bin/testo run --filter=testLogin --suite=Unit
154
+
testo run --filter=testLogin --suite=Unit
151
155
152
156
# Name AND path
153
-
./bin/testo run --filter=UserTest --path="tests/Unit"
157
+
testo run --filter=UserTest --path="tests/Unit"
154
158
155
159
# All three types (AND)
156
-
./bin/testo run --filter=testImportant --path="tests/Unit" --suite=Critical
160
+
testo run --filter=testImportant --path="tests/Unit" --suite=Critical
Copy file name to clipboardExpand all lines: ru/docs/cli-reference.md
+34-30Lines changed: 34 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,32 @@
2
2
3
3
Этот документ описывает интерфейс командной строки для Testo.
4
4
5
+
::: info Путь к бинарнику
6
+
Если Testo установлен через Composer, путь до бинарника будет `vendor/bin/testo`. В примерах ниже используется просто `testo` для краткости, но в реальных проектах используйте `vendor/bin/testo` или настройте алиас в вашем окружении.
7
+
:::
8
+
5
9
## Команды
6
10
7
-
### `run`
11
+
### `testo run`
8
12
9
-
Выполнить наборы тестов с опциональной фильтрацией и форматированием вывода.
13
+
Выполнить комплекты тестов с опциональной фильтрацией и форматированием вывода.
10
14
11
15
Это команда по умолчанию и может быть опущена при использовании флагов.
12
16
13
17
```bash
14
-
./bin/testo run [options]
15
-
./bin/testo [options] # run опциональна
18
+
testo run [options]
19
+
testo [options] # run опциональна
16
20
```
17
21
18
22
**Примеры:**
19
23
```bash
20
24
# Явная команда run
21
-
./bin/testo run
22
-
./bin/testo run --suite=Unit
25
+
testo run
26
+
testo run --suite=Unit
23
27
24
28
# Неявная команда run (по умолчанию)
25
-
./bin/testo
26
-
./bin/testo --suite=Unit
29
+
testo
30
+
testo --suite=Unit
27
31
```
28
32
29
33
## Общие флаги конфигурации
@@ -36,8 +40,8 @@
36
40
37
41
**Примеры:**
38
42
```bash
39
-
./bin/testo run --config=./custom-testo.php
40
-
./bin/testo run --suite=Integration --config=./ci-testo.php
43
+
testo run --config=./custom-testo.php
44
+
testo run --suite=Integration --config=./ci-testo.php
41
45
```
42
46
43
47
## Запуск тестов
@@ -52,8 +56,8 @@
52
56
53
57
**Примеры:**
54
58
```bash
55
-
./bin/testo --teamcity
56
-
./bin/testo --suite=Unit --teamcity
59
+
testo --teamcity
60
+
testo --suite=Unit --teamcity
57
61
```
58
62
59
63
### Фильтрация
@@ -69,17 +73,17 @@ Testo предоставляет три типа фильтров, которы
69
73
70
74
#### `--suite`
71
75
72
-
Фильтрация тестов по имени набора тестов. Наборы определяются в конфигурации.
76
+
Фильтрация тестов по имени комплекта тестов. Комплекты определяются в конфигурации.
73
77
74
78
**Повторяемый:** Да (логика ИЛИ)
75
79
76
80
**Примеры:**
77
81
```bash
78
82
# Один набор
79
-
./bin/testo run --suite=Unit
83
+
testo run --suite=Unit
80
84
81
85
# Несколько наборов
82
-
./bin/testo run --suite=Unit --suite=Integration
86
+
testo run --suite=Unit --suite=Integration
83
87
```
84
88
85
89
#### `--path`
@@ -95,16 +99,16 @@ Testo предоставляет три типа фильтров, которы
95
99
**Примеры:**
96
100
```bash
97
101
# Соответствует tests/Unit*
98
-
./bin/testo run --path="tests/Unit"
102
+
testo run --path="tests/Unit"
99
103
100
104
# Соответствует tests/Unit/*Test.php
101
-
./bin/testo run --path="tests/Unit/*Test.php"
105
+
testo run --path="tests/Unit/*Test.php"
102
106
103
107
# Несколько путей
104
-
./bin/testo run --path="tests/Unit" --path="tests/Integration"
108
+
testo run --path="tests/Unit" --path="tests/Integration"
105
109
106
110
# Вложенные директории
107
-
./bin/testo run --path="tests/*/Security/*Test.php"
111
+
testo run --path="tests/*/Security/*Test.php"
108
112
```
109
113
110
114
#### `--filter`
@@ -121,23 +125,23 @@ Testo предоставляет три типа фильтров, которы
121
125
**Примеры:**
122
126
```bash
123
127
# Конкретный метод
124
-
./bin/testo run --filter=UserTest::testLogin
128
+
testo run --filter=UserTest::testLogin
125
129
126
130
# Весь класс
127
-
./bin/testo run --filter=UserTest
131
+
testo run --filter=UserTest
128
132
129
133
# По FQN
130
-
./bin/testo run --filter=Tests\Unit\UserTest
134
+
testo run --filter=Tests\Unit\UserTest
131
135
132
136
# Имя метода во всех классах
133
-
./bin/testo run --filter=testLogin
137
+
testo run --filter=testLogin
134
138
135
139
# Несколько фильтров (ИЛИ)
136
-
./bin/testo run --filter=UserTest::testCreate --filter=UserTest::testUpdate
140
+
testo run --filter=UserTest::testCreate --filter=UserTest::testUpdate
137
141
138
142
# Комбинация с другими фильтрами (И)
139
-
./bin/testo run --filter=testAuthentication --suite=Unit
140
-
./bin/testo run --filter=UserTest --path="tests/Unit"
143
+
testo run --filter=testAuthentication --suite=Unit
144
+
testo run --filter=UserTest --path="tests/Unit"
141
145
```
142
146
143
147
**Поведение фильтров:** Подробности в разделе [Фильтрация](/ru/docs/filtering).
@@ -147,16 +151,16 @@ Testo предоставляет три типа фильтров, которы
147
151
**Примеры:**
148
152
```bash
149
153
# Имя И набор
150
-
./bin/testo run --filter=testLogin --suite=Unit
154
+
testo run --filter=testLogin --suite=Unit
151
155
152
156
# Имя И путь
153
-
./bin/testo run --filter=UserTest --path="tests/Unit"
157
+
testo run --filter=UserTest --path="tests/Unit"
154
158
155
159
# Все три типа (И)
156
-
./bin/testo run --filter=testImportant --path="tests/Unit" --suite=Critical
160
+
testo run --filter=testImportant --path="tests/Unit" --suite=Critical
0 commit comments