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