@@ -14,23 +14,29 @@ If PageObject is generated globally it will act as UIMap, without any logic in i
14
14
* ` codecept g:page Registration `
15
15
* ` codecept g:page acceptance Login `
16
16
17
+
18
+
17
19
## GherkinSnippets
18
20
19
21
Generates code snippets for matched feature files in a suite.
20
22
Code snippets are expected to be implemented in Actor or PageObjects
21
23
22
24
Usage:
23
25
24
- * ` codecept gherkin:snippets Acceptance ` - snippets from all feature of acceptance tests
25
- * ` codecept gherkin:snippets Acceptance/feature/users ` - snippets from ` feature/users ` dir of acceptance tests
26
- * ` codecept gherkin:snippets Acceptance user_account.feature ` - snippets from a single feature file
27
- * ` codecept gherkin:snippets Acceptance/feature/users/user_accout.feature ` - snippets from feature file in a dir
26
+ * ` codecept gherkin:snippets acceptance ` - snippets from all feature of acceptance tests
27
+ * ` codecept gherkin:snippets acceptance/feature/users ` - snippets from ` feature/users ` dir of acceptance tests
28
+ * ` codecept gherkin:snippets acceptance user_account.feature ` - snippets from a single feature file
29
+ * ` codecept gherkin:snippets acceptance/feature/users/user_accout.feature ` - snippets from feature file in a dir
30
+
31
+
28
32
29
33
## Console
30
34
31
35
Try to execute test commands in run-time. You may try commands before writing the test.
32
36
33
- * ` codecept console Acceptance ` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands.
37
+ * ` codecept console acceptance ` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands.
38
+
39
+
34
40
35
41
## GenerateSnapshot
36
42
@@ -42,27 +48,34 @@ If suite name is provided, an actor class will be included into placeholder
42
48
* ` codecept g:snapshot Products `
43
49
* ` codecept g:snapshot acceptance UserEmails `
44
50
51
+
52
+
45
53
## GenerateHelper
46
54
47
55
Creates empty Helper class.
48
56
49
57
* ` codecept g:helper MyHelper `
50
58
* ` codecept g:helper "My\Helper" `
51
59
60
+
61
+
62
+
52
63
## Run
53
64
54
65
Executes tests.
55
66
56
67
Usage:
57
68
58
- * ` codecept run Unit,Functional ` : run only unit and functional suites
59
- * ` codecept run tests/Acceptance/MyCest.php ` : run only MyCest
60
- * ` codecept run Acceptance MyCest ` : same as above
61
- * ` codecept run Acceptance MyCest:myTestInIt ` : run one test from a Cest
62
- * ` codecept run Acceptance MyCest:myTestInIt#1-3 ` : run a range of examples or data provider items
63
- * ` codecept run Acceptance MyCest:myTestInIt@name.* ` : run data provider items with matching names
64
- * ` codecept run Acceptance checkout.feature ` : run feature-file
65
- * ` codecept run Acceptance -g slow ` : run tests from group named ` slow `
69
+ * ` codecept run acceptance ` : run all acceptance tests
70
+ * ` codecept run tests/acceptance/MyCest.php ` : run only MyCest
71
+ * ` codecept run acceptance MyCest ` : same as above
72
+ * ` codecept run acceptance MyCest:myTestInIt ` : run one test from a Cest
73
+ * ` codecept run acceptance MyCest:myTestInIt#1 ` : run one example or data provider item by number
74
+ * ` codecept run acceptance MyCest:myTestInIt#1-3 ` : run a range of examples or data provider items
75
+ * ` codecept run acceptance MyCest:myTestInIt@name.* ` : run data provider items with matching names
76
+ * ` codecept run acceptance checkout.feature ` : run feature-file
77
+ * ` codecept run acceptance -g slow ` : run tests from * slow* group
78
+ * ` codecept run unit,functional ` : run only unit and functional suites
66
79
67
80
Verbosity modes:
68
81
@@ -132,6 +145,9 @@ Options:
132
145
133
146
{% endhighlight %}
134
147
148
+
149
+
150
+
135
151
## Bootstrap
136
152
137
153
Creates default config, tests directory and sample suites for current project.
@@ -145,6 +161,9 @@ By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**.
145
161
* ` codecept bootstrap --actor Wizard ` - sets actor as Wizard, to have ` TestWizard ` actor in tests.
146
162
* ` codecept bootstrap path/to/the/project ` - provide different path to a project, where tests should be placed
147
163
164
+
165
+
166
+
148
167
## SelfUpdate
149
168
150
169
Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar ' .
@@ -153,12 +172,17 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept.
153
172
154
173
@author Franck Cassedanne
< [email protected] >
155
174
175
+
176
+
156
177
## GenerateGroup
157
178
158
179
Creates empty GroupObject - extension which handles all group events.
159
180
160
181
* ` codecept g:group Admin `
161
182
183
+
184
+
185
+
162
186
## GherkinSteps
163
187
164
188
Prints all steps from all Gherkin contexts for a specific suite
@@ -168,8 +192,13 @@ codecept gherkin:steps acceptance
168
192
169
193
{% endhighlight %}
170
194
195
+
196
+
197
+
171
198
## Init
172
199
200
+
201
+
173
202
## GenerateEnvironment
174
203
175
204
Generates empty environment configuration file into envs dir:
@@ -178,20 +207,27 @@ Generates empty environment configuration file into envs dir:
178
207
179
208
Required to have ` envs ` path to be specified in ` codeception.yml `
180
209
210
+
211
+
181
212
## GenerateScenarios
182
213
183
214
Generates user-friendly text scenarios from scenario-driven tests (Cest).
184
215
185
- * ` codecept g:scenarios Acceptance ` - for all acceptance tests
186
- * ` codecept g:scenarios Acceptance --format html ` - in html format
187
- * ` codecept g:scenarios Acceptance --path doc ` - generate scenarios to ` doc ` dir
216
+ * ` codecept g:scenarios acceptance ` - for all acceptance tests
217
+ * ` codecept g:scenarios acceptance --format html ` - in html format
218
+ * ` codecept g:scenarios acceptance --path doc ` - generate scenarios to ` doc ` dir
219
+
220
+
188
221
189
222
## GenerateStepObject
190
223
191
224
Generates StepObject class. You will be asked for steps you want to implement.
192
225
193
- * ` codecept g:stepobject Acceptance AdminSteps `
194
- * ` codecept g:stepobject Acceptance UserSteps --silent ` - skip action questions
226
+ * ` codecept g:stepobject acceptance AdminSteps `
227
+ * ` codecept g:stepobject acceptance UserSteps --silent ` - skip action questions
228
+
229
+
230
+
195
231
196
232
## GenerateTest
197
233
@@ -200,6 +236,8 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`.
200
236
* ` codecept g:test unit User `
201
237
* ` codecept g:test unit "App\User" `
202
238
239
+
240
+
203
241
## ConfigValidate
204
242
205
243
Validates and prints Codeception config.
@@ -221,6 +259,9 @@ Check overriding config values (like in `run` command)
221
259
* ` codecept config:validate -o "settings: lint: false" ` : disable linting
222
260
* ` codecept config:validate -o "reporters: report: \Custom\Reporter" --report ` : use custom reporter
223
261
262
+
263
+
264
+
224
265
## Build
225
266
226
267
Generates Actor classes (initially Guy classes) from suite configs.
@@ -229,6 +270,9 @@ Starting from Codeception 2.0 actor classes are auto-generated. Use this command
229
270
* ` codecept build `
230
271
* ` codecept build path/to/project `
231
272
273
+
274
+
275
+
232
276
## GenerateSuite
233
277
234
278
Create new test suite. Requires suite name and actor name
@@ -238,6 +282,9 @@ Create new test suite. Requires suite name and actor name
238
282
* ` codecept g:suite integration Code ` -> integration + CodeTester
239
283
* ` codecept g:suite frontend Front ` -> frontend + FrontTester
240
284
285
+
286
+
287
+
241
288
## GenerateFeature
242
289
243
290
Generates Feature file (in Gherkin):
@@ -246,21 +293,30 @@ Generates Feature file (in Gherkin):
246
293
* ` codecept g:feature suite subdir/subdir/login.feature `
247
294
* ` codecept g:feature suite login.feature -c path/to/project `
248
295
296
+
297
+
298
+
249
299
## DryRun
250
300
251
301
Shows step by step execution process for scenario driven tests without actually running them.
252
302
253
- * ` codecept dry-run Acceptance `
254
- * ` codecept dry-run Acceptance MyCest `
255
- * ` codecept dry-run Acceptance checkout.feature `
256
- * ` codecept dry-run tests/Acceptance/MyCest.php `
303
+ * ` codecept dry-run acceptance `
304
+ * ` codecept dry-run acceptance MyCest `
305
+ * ` codecept dry-run acceptance checkout.feature `
306
+ * ` codecept dry-run tests/acceptance/MyCest.php `
307
+
308
+
309
+
257
310
258
311
## Clean
259
312
260
313
Recursively cleans ` output ` directory and generated code.
261
314
262
315
* ` codecept clean `
263
316
317
+
318
+
319
+
264
320
## GenerateCest
265
321
266
322
Generates Cest (scenario-driven object-oriented test) file:
@@ -270,4 +326,10 @@ Generates Cest (scenario-driven object-oriented test) file:
270
326
* ` codecept g:cest suite LoginCest -c path/to/project `
271
327
* ` codecept g:cest "App\Login" `
272
328
329
+
330
+
331
+
273
332
## CompletionFallback
333
+
334
+
335
+
0 commit comments