@@ -15,48 +15,69 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept.
1515
1616
1717
18+ ## Init
1819
19- ## GenerateGroup
2020
21- Creates empty GroupObject - extension which handles all group events.
2221
23- * ` codecept g:group Admin `
22+ ## GherkinSnippets
2423
24+ Generates code snippets for matched feature files in a suite.
25+ Code snippets are expected to be implemented in Actor or PageObjects
2526
27+ Usage:
2628
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
2833
29- Validates and prints Codeception config.
30- Use it do debug Yaml configs
3134
32- Check config:
3335
34- * ` codecept config ` : check global config
35- * ` codecept config unit ` : check suite config
36+ ## GenerateEnvironment
3637
37- Load config :
38+ Generates empty environment configuration file into envs dir :
3839
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 `
4141
42- Check overriding config values (like in ` run ` command)
42+ Required to have ` envs ` path to be specified in ` codeception.yml `
4343
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
4744
4845
46+ ## CompletionFallback
4947
5048
51- ## CompletionFallback
5249
50+ ## DryRun
5351
52+ Shows step by step execution process for scenario driven tests without actually running them.
5453
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 `
5658
57- Try to execute test commands in run-time. You may try commands before writing the test.
5859
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+
6081
6182
6283
@@ -71,35 +92,54 @@ Starting from Codeception 2.0 actor classes are auto-generated. Use this command
7192
7293
7394
74- ## GherkinSteps
95+ ## GenerateSnapshot
7596
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
77100
78- {% highlight yaml %}
79- codecept gherkin: steps acceptance
101+ * ` codecept g:snapshot UserEmails `
102+ * ` codecept g:snapshot Products `
103+ * ` codecept g:snapshot acceptance UserEmails `
80104
81- {% endhighlight %}
82105
83106
107+ ## Clean
84108
109+ Recursively cleans ` output ` directory and generated code.
85110
86- ## GenerateFeature
111+ * ` codecept clean `
87112
88- Generates Feature file (in Gherkin):
89113
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 `
93114
94115
116+ ## Console
95117
118+ Try to execute test commands in run-time. You may try commands before writing the test.
96119
97- ## GenerateTest
120+ * ` codecept console acceptance ` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands.
98121
99- Generates skeleton for Unit Test that extends ` Codeception\TestCase\Test ` .
100122
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+
103143
104144
105145
@@ -202,36 +242,42 @@ If PageObject is generated globally it will act as UIMap, without any logic in i
202242
203243
204244
205- ## Clean
245+ ## GenerateFeature
206246
207- Recursively cleans ` output ` directory and generated code.
247+ Generates Feature file (in Gherkin):
208248
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 `
210252
211253
212254
213255
214- ## GenerateStepObject
256+ ## GenerateGroup
215257
216- Generates StepObject class. You will be asked for steps you want to implement .
258+ Creates empty GroupObject - extension which handles all group events .
217259
218- * ` codecept g:stepobject acceptance AdminSteps `
219- * ` codecept g:stepobject acceptance UserSteps --silent ` - skip action questions
260+ * ` codecept g:group Admin `
220261
221262
222263
264+ ## GenerateScenarios
223265
224- ## GherkinSnippets
266+ Generates user-friendly text scenarios from scenario-driven tests (Cest).
225267
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
228271
229- Usage:
230272
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" `
235281
236282
237283
@@ -263,72 +309,26 @@ By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**.
263309
264310
265311
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
313313
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
317316
318- * ` codecept g:snapshot UserEmails `
319- * ` codecept g:snapshot Products `
320- * ` codecept g:snapshot acceptance UserEmails `
317+ Check config:
321318
319+ * ` codecept config ` : check global config
320+ * ` codecept config unit ` : check suite config
322321
322+ Load config:
323323
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
325326
326- Shows step by step execution process for scenario driven tests without actually running them.
327+ Check overriding config values (like in ` run ` command)
327328
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
332332
333333
334334
0 commit comments