@@ -15,48 +15,69 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept.
15
15
16
16
17
17
18
+ ## Init
18
19
19
- ## GenerateGroup
20
20
21
- Creates empty GroupObject - extension which handles all group events.
22
21
23
- * ` codecept g:group Admin `
22
+ ## GherkinSnippets
24
23
24
+ Generates code snippets for matched feature files in a suite.
25
+ Code snippets are expected to be implemented in Actor or PageObjects
25
26
27
+ Usage:
26
28
27
- ## ConfigValidate
29
+ * ` codecept gherkin:snippets acceptance ` - snippets from all feature of acceptance tests
30
+ * ` codecept gherkin:snippets acceptance/feature/users ` - snippets from ` feature/users ` dir of acceptance tests
31
+ * ` codecept gherkin:snippets acceptance user_account.feature ` - snippets from a single feature file
32
+ * ` codecept gherkin:snippets acceptance/feature/users/user_accout.feature ` - snippets from feature file in a dir
28
33
29
- Validates and prints Codeception config.
30
- Use it do debug Yaml configs
31
34
32
- Check config:
33
35
34
- * ` codecept config ` : check global config
35
- * ` codecept config unit ` : check suite config
36
+ ## GenerateEnvironment
36
37
37
- Load config :
38
+ Generates empty environment configuration file into envs dir :
38
39
39
- * ` codecept config:validate -c path/to/another/config ` : from another dir
40
- * ` codecept config:validate -c another_config.yml ` : from another config file
40
+ * ` codecept g:env firefox `
41
41
42
- Check overriding config values (like in ` run ` command)
42
+ Required to have ` envs ` path to be specified in ` codeception.yml `
43
43
44
- * ` codecept config:validate -o "settings: shuffle: true" ` : enable shuffle
45
- * ` codecept config:validate -o "settings: lint: false" ` : disable linting
46
- * ` codecept config:validate -o "reporters: report: \Custom\Reporter" --report ` : use custom reporter
47
44
48
45
46
+ ## CompletionFallback
49
47
50
48
51
- ## CompletionFallback
52
49
50
+ ## DryRun
53
51
52
+ Shows step by step execution process for scenario driven tests without actually running them.
54
53
55
- ## Console
54
+ * ` codecept dry-run acceptance `
55
+ * ` codecept dry-run acceptance MyCest `
56
+ * ` codecept dry-run acceptance checkout.feature `
57
+ * ` codecept dry-run tests/acceptance/MyCest.php `
56
58
57
- Try to execute test commands in run-time. You may try commands before writing the test.
58
59
59
- * ` codecept console acceptance ` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands.
60
+
61
+
62
+ ## GenerateHelper
63
+
64
+ Creates empty Helper class.
65
+
66
+ * ` codecept g:helper MyHelper `
67
+ * ` codecept g:helper "My\Helper" `
68
+
69
+
70
+
71
+
72
+ ## GenerateSuite
73
+
74
+ Create new test suite. Requires suite name and actor name
75
+
76
+ * ``
77
+ * ` codecept g:suite api ` -> api + ApiTester
78
+ * ` codecept g:suite integration Code ` -> integration + CodeTester
79
+ * ` codecept g:suite frontend Front ` -> frontend + FrontTester
80
+
60
81
61
82
62
83
@@ -71,35 +92,54 @@ Starting from Codeception 2.0 actor classes are auto-generated. Use this command
71
92
72
93
73
94
74
- ## GherkinSteps
95
+ ## GenerateSnapshot
75
96
76
- Prints all steps from all Gherkin contexts for a specific suite
97
+ Generates Snapshot.
98
+ Snapshot can be used to test dynamical data.
99
+ If suite name is provided, an actor class will be included into placeholder
77
100
78
- {% highlight yaml %}
79
- codecept gherkin: steps acceptance
101
+ * ` codecept g:snapshot UserEmails `
102
+ * ` codecept g:snapshot Products `
103
+ * ` codecept g:snapshot acceptance UserEmails `
80
104
81
- {% endhighlight %}
82
105
83
106
107
+ ## Clean
84
108
109
+ Recursively cleans ` output ` directory and generated code.
85
110
86
- ## GenerateFeature
111
+ * ` codecept clean `
87
112
88
- Generates Feature file (in Gherkin):
89
113
90
- * ` codecept generate:feature suite Login `
91
- * ` codecept g:feature suite subdir/subdir/login.feature `
92
- * ` codecept g:feature suite login.feature -c path/to/project `
93
114
94
115
116
+ ## Console
95
117
118
+ Try to execute test commands in run-time. You may try commands before writing the test.
96
119
97
- ## GenerateTest
120
+ * ` codecept console acceptance ` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands.
98
121
99
- Generates skeleton for Unit Test that extends ` Codeception\TestCase\Test ` .
100
122
101
- * ` codecept g:test unit User `
102
- * ` codecept g:test unit "App\User" `
123
+
124
+ ## GenerateStepObject
125
+
126
+ Generates StepObject class. You will be asked for steps you want to implement.
127
+
128
+ * ` codecept g:stepobject acceptance AdminSteps `
129
+ * ` codecept g:stepobject acceptance UserSteps --silent ` - skip action questions
130
+
131
+
132
+
133
+
134
+ ## GherkinSteps
135
+
136
+ Prints all steps from all Gherkin contexts for a specific suite
137
+
138
+ {% highlight yaml %}
139
+ codecept gherkin: steps acceptance
140
+
141
+ {% endhighlight %}
142
+
103
143
104
144
105
145
@@ -202,36 +242,42 @@ If PageObject is generated globally it will act as UIMap, without any logic in i
202
242
203
243
204
244
205
- ## Clean
245
+ ## GenerateFeature
206
246
207
- Recursively cleans ` output ` directory and generated code.
247
+ Generates Feature file (in Gherkin):
208
248
209
- * ` codecept clean `
249
+ * ` codecept generate:feature suite Login `
250
+ * ` codecept g:feature suite subdir/subdir/login.feature `
251
+ * ` codecept g:feature suite login.feature -c path/to/project `
210
252
211
253
212
254
213
255
214
- ## GenerateStepObject
256
+ ## GenerateGroup
215
257
216
- Generates StepObject class. You will be asked for steps you want to implement .
258
+ Creates empty GroupObject - extension which handles all group events .
217
259
218
- * ` codecept g:stepobject acceptance AdminSteps `
219
- * ` codecept g:stepobject acceptance UserSteps --silent ` - skip action questions
260
+ * ` codecept g:group Admin `
220
261
221
262
222
263
264
+ ## GenerateScenarios
223
265
224
- ## GherkinSnippets
266
+ Generates user-friendly text scenarios from scenario-driven tests (Cest).
225
267
226
- Generates code snippets for matched feature files in a suite.
227
- Code snippets are expected to be implemented in Actor or PageObjects
268
+ * ` codecept g:scenarios acceptance ` - for all acceptance tests
269
+ * ` codecept g:scenarios acceptance --format html ` - in html format
270
+ * ` codecept g:scenarios acceptance --path doc ` - generate scenarios to ` doc ` dir
228
271
229
- Usage:
230
272
231
- * ` codecept gherkin:snippets acceptance ` - snippets from all feature of acceptance tests
232
- * ` codecept gherkin:snippets acceptance/feature/users ` - snippets from ` feature/users ` dir of acceptance tests
233
- * ` codecept gherkin:snippets acceptance user_account.feature ` - snippets from a single feature file
234
- * ` codecept gherkin:snippets acceptance/feature/users/user_accout.feature ` - snippets from feature file in a dir
273
+
274
+
275
+ ## GenerateTest
276
+
277
+ Generates skeleton for Unit Test that extends ` Codeception\TestCase\Test ` .
278
+
279
+ * ` codecept g:test unit User `
280
+ * ` codecept g:test unit "App\User" `
235
281
236
282
237
283
@@ -263,72 +309,26 @@ By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**.
263
309
264
310
265
311
266
- ## GenerateScenarios
267
-
268
- Generates user-friendly text scenarios from scenario-driven tests (Cest).
269
-
270
- * ` codecept g:scenarios acceptance ` - for all acceptance tests
271
- * ` codecept g:scenarios acceptance --format html ` - in html format
272
- * ` codecept g:scenarios acceptance --path doc ` - generate scenarios to ` doc ` dir
273
-
274
-
275
-
276
- ## GenerateHelper
277
-
278
- Creates empty Helper class.
279
-
280
- * ` codecept g:helper MyHelper `
281
- * ` codecept g:helper "My\Helper" `
282
-
283
-
284
-
285
-
286
- ## GenerateSuite
287
-
288
- Create new test suite. Requires suite name and actor name
289
-
290
- * ``
291
- * ` codecept g:suite api ` -> api + ApiTester
292
- * ` codecept g:suite integration Code ` -> integration + CodeTester
293
- * ` codecept g:suite frontend Front ` -> frontend + FrontTester
294
-
295
-
296
-
297
-
298
- ## Init
299
-
300
-
301
-
302
- ## GenerateEnvironment
303
-
304
- Generates empty environment configuration file into envs dir:
305
-
306
- * ` codecept g:env firefox `
307
-
308
- Required to have ` envs ` path to be specified in ` codeception.yml `
309
-
310
-
311
-
312
- ## GenerateSnapshot
312
+ ## ConfigValidate
313
313
314
- Generates Snapshot.
315
- Snapshot can be used to test dynamical data.
316
- If suite name is provided, an actor class will be included into placeholder
314
+ Validates and prints Codeception config.
315
+ Use it do debug Yaml configs
317
316
318
- * ` codecept g:snapshot UserEmails `
319
- * ` codecept g:snapshot Products `
320
- * ` codecept g:snapshot acceptance UserEmails `
317
+ Check config:
321
318
319
+ * ` codecept config ` : check global config
320
+ * ` codecept config unit ` : check suite config
322
321
322
+ Load config:
323
323
324
- ## DryRun
324
+ * ` codecept config:validate -c path/to/another/config ` : from another dir
325
+ * ` codecept config:validate -c another_config.yml ` : from another config file
325
326
326
- Shows step by step execution process for scenario driven tests without actually running them.
327
+ Check overriding config values (like in ` run ` command)
327
328
328
- * ` codecept dry-run acceptance `
329
- * ` codecept dry-run acceptance MyCest `
330
- * ` codecept dry-run acceptance checkout.feature `
331
- * ` codecept dry-run tests/acceptance/MyCest.php `
329
+ * ` codecept config:validate -o "settings: shuffle: true" ` : enable shuffle
330
+ * ` codecept config:validate -o "settings: lint: false" ` : disable linting
331
+ * ` codecept config:validate -o "reporters: report: \Custom\Reporter" --report ` : use custom reporter
332
332
333
333
334
334
0 commit comments