@@ -16,43 +16,31 @@ codecept gherkin:steps Acceptance
1616
1717
1818
19- ## GenerateStepObject
20-
21- Generates StepObject class. You will be asked for steps you want to implement.
22-
23- * ` codecept g:stepobject Acceptance AdminSteps `
24- * ` codecept g:stepobject Acceptance UserSteps --silent ` - skip action questions
25-
26-
27-
19+ ## GenerateSuite
2820
29- ## Bootstrap
21+ Create new test suite. Requires suite name and actor name
3022
31- Creates default config, tests directory and sample suites for current project.
32- Use this command to start building a test suite.
23+ * ``
24+ * ` codecept g:suite Api ` -> api + ApiTester
25+ * ` codecept g:suite Integration Code ` -> integration + CodeTester
26+ * ` codecept g:suite Frontend Front ` -> frontend + FrontTester
3327
34- By default, it will create 3 suites ** Acceptance** , ** Functional** , and ** Unit** .
3528
36- * ` codecept bootstrap ` - creates ` tests ` dir and ` codeception.yml ` in current dir.
37- * ` codecept bootstrap --empty ` - creates ` tests ` dir without suites
38- * ` codecept bootstrap --namespace Frontend ` - creates tests, and use ` Frontend ` namespace for actor classes and helpers.
39- * ` codecept bootstrap --actor Wizard ` - sets actor as Wizard, to have ` TestWizard ` actor in tests.
40- * ` codecept bootstrap path/to/the/project ` - provide different path to a project, where tests should be placed
4129
4230
31+ ## GenerateSnapshot
4332
33+ Generates Snapshot.
34+ Snapshot can be used to test dynamical data.
35+ If suite name is provided, an actor class will be included into placeholder
4436
45- ## GherkinSnippets
37+ * ` codecept g:snapshot UserEmails `
38+ * ` codecept g:snapshot Products `
39+ * ` codecept g:snapshot Acceptance UserEmails `
4640
47- Generates code snippets for matched feature files in a suite.
48- Code snippets are expected to be implemented in Actor or PageObjects
4941
50- Usage:
5142
52- * ` codecept gherkin:snippets Acceptance ` - snippets from all feature of acceptance tests
53- * ` codecept gherkin:snippets Acceptance/feature/users ` - snippets from ` feature/users ` dir of acceptance tests
54- * ` codecept gherkin:snippets Acceptance user_account.feature ` - snippets from a single feature file
55- * ` codecept gherkin:snippets Acceptance/feature/users/user_accout.feature ` - snippets from feature file in a dir
43+ ## Init
5644
5745
5846
@@ -149,50 +137,82 @@ Options:
149137
150138
151139
152- ## GenerateCest
140+ ## GenerateGroup
153141
154- Generates Cest (scenario-driven object-oriented test) file:
142+ Creates empty GroupObject - extension which handles all group events.
155143
156- * ` codecept generate:cest suite Login `
157- * ` codecept g:cest suite subdir/subdir/testnameCest.php `
158- * ` codecept g:cest suite LoginCest -c path/to/project `
159- * ` codecept g:cest "App\Login" `
144+ * ` codecept g:group Admin `
160145
161146
162147
148+ ## Bootstrap
163149
164- ## GenerateHelper
150+ Creates default config, tests directory and sample suites for current project.
151+ Use this command to start building a test suite.
165152
166- Creates empty Helper class .
153+ By default, it will create 3 suites ** Acceptance ** , ** Functional ** , and ** Unit ** .
167154
168- * ` codecept g:helper MyHelper `
169- * ` codecept g:helper "My\Helper" `
155+ * ` codecept bootstrap ` - creates ` tests ` dir and ` codeception.yml ` in current dir.
156+ * ` codecept bootstrap --empty ` - creates ` tests ` dir without suites
157+ * ` codecept bootstrap --namespace Frontend ` - creates tests, and use ` Frontend ` namespace for actor classes and helpers.
158+ * ` codecept bootstrap --actor Wizard ` - sets actor as Wizard, to have ` TestWizard ` actor in tests.
159+ * ` codecept bootstrap path/to/the/project ` - provide different path to a project, where tests should be placed
170160
171161
172162
173163
174- ## GeneratePageObject
164+ ## GenerateStepObject
175165
176- Generates PageObject. Can be generated either globally, or just for one suite.
177- If PageObject is generated globally it will act as UIMap, without any logic in it.
166+ Generates StepObject class. You will be asked for steps you want to implement.
178167
179- * ` codecept g:page Login `
180- * ` codecept g:page Registration `
181- * ` codecept g:page Acceptance Login `
168+ * ` codecept g:stepobject Acceptance AdminSteps `
169+ * ` codecept g:stepobject Acceptance UserSteps --silent ` - skip action questions
182170
183171
184172
185- ## Build
186173
187- Generates Actor classes (initially Guy classes) from suite configs.
188- Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually.
174+ ## GenerateFeature
189175
190- * ` codecept build `
191- * ` codecept build path/to/project `
176+ Generates Feature file (in Gherkin):
177+
178+ * ` codecept generate:feature suite Login `
179+ * ` codecept g:feature suite subdir/subdir/login.feature `
180+ * ` codecept g:feature suite login.feature -c path/to/project `
181+
182+
183+
184+
185+ ## Clean
186+
187+ Recursively cleans ` output ` directory and generated code.
188+
189+ * ` codecept clean `
190+
191+
192+
193+
194+ ## GenerateCest
195+
196+ Generates Cest (scenario-driven object-oriented test) file:
197+
198+ * ` codecept generate:cest suite Login `
199+ * ` codecept g:cest suite subdir/subdir/testnameCest.php `
200+ * ` codecept g:cest suite LoginCest -c path/to/project `
201+ * ` codecept g:cest "App\Login" `
192202
193203
194204
195205
206+ ## GenerateScenarios
207+
208+ Generates user-friendly text scenarios from scenario-driven tests (Cest).
209+
210+ * ` codecept g:scenarios Acceptance ` - for all acceptance tests
211+ * ` codecept g:scenarios Acceptance --format html ` - in html format
212+ * ` codecept g:scenarios Acceptance --path doc ` - generate scenarios to ` doc ` dir
213+
214+
215+
196216## GenerateEnvironment
197217
198218Generates empty environment configuration file into envs dir:
@@ -203,13 +223,24 @@ Required to have `envs` path to be specified in `codeception.yml`
203223
204224
205225
206- ## SelfUpdate
226+ ## GenerateHelper
207227
208- Auto-updates phar archive from official site: ' https://codeception.com/codecept.phar ' .
228+ Creates empty Helper class .
209229
210- * ` php codecept.phar self-update `
230+ * ` codecept g:helper MyHelper `
231+ * ` codecept g:helper "My\Helper" `
211232
212- @author Franck Cassedanne < franck@cassedanne.com >
233+
234+
235+
236+ ## GeneratePageObject
237+
238+ Generates PageObject. Can be generated either globally, or just for one suite.
239+ If PageObject is generated globally it will act as UIMap, without any logic in it.
240+
241+ * ` codecept g:page Login `
242+ * ` codecept g:page Registration `
243+ * ` codecept g:page Acceptance Login `
213244
214245
215246
@@ -249,24 +280,6 @@ Check overriding config values (like in `run` command)
249280
250281
251282
252- ## Init
253-
254-
255-
256- ## CompletionFallback
257-
258-
259-
260- ## GenerateScenarios
261-
262- Generates user-friendly text scenarios from scenario-driven tests (Cest).
263-
264- * ` codecept g:scenarios Acceptance ` - for all acceptance tests
265- * ` codecept g:scenarios Acceptance --format html ` - in html format
266- * ` codecept g:scenarios Acceptance --path doc ` - generate scenarios to ` doc ` dir
267-
268-
269-
270283## Console
271284
272285Try to execute test commands in run-time. You may try commands before writing the test.
@@ -275,32 +288,14 @@ Try to execute test commands in run-time. You may try commands before writing th
275288
276289
277290
278- ## Clean
279-
280- Recursively cleans ` output ` directory and generated code.
281-
282- * ` codecept clean `
283-
284-
285-
286-
287- ## GenerateSuite
288-
289- Create new test suite. Requires suite name and actor name
290-
291- * ``
292- * ` codecept g:suite Api ` -> api + ApiTester
293- * ` codecept g:suite Integration Code ` -> integration + CodeTester
294- * ` codecept g:suite Frontend Front ` -> frontend + FrontTester
295-
296-
297-
291+ ## Build
298292
299- ## GenerateGroup
293+ Generates Actor classes (initially Guy classes) from suite configs.
294+ Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually.
300295
301- Creates empty GroupObject - extension which handles all group events.
296+ * ` codecept build `
297+ * ` codecept build path/to/project `
302298
303- * ` codecept g:group Admin `
304299
305300
306301
@@ -313,26 +308,31 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`.
313308
314309
315310
316- ## GenerateFeature
311+ ## CompletionFallback
317312
318- Generates Feature file (in Gherkin):
319313
320- * ` codecept generate:feature suite Login `
321- * ` codecept g:feature suite subdir/subdir/login.feature `
322- * ` codecept g:feature suite login.feature -c path/to/project `
323314
315+ ## GherkinSnippets
324316
317+ Generates code snippets for matched feature files in a suite.
318+ Code snippets are expected to be implemented in Actor or PageObjects
325319
320+ Usage:
326321
327- ## GenerateSnapshot
322+ * ` codecept gherkin:snippets Acceptance ` - snippets from all feature of acceptance tests
323+ * ` codecept gherkin:snippets Acceptance/feature/users ` - snippets from ` feature/users ` dir of acceptance tests
324+ * ` codecept gherkin:snippets Acceptance user_account.feature ` - snippets from a single feature file
325+ * ` codecept gherkin:snippets Acceptance/feature/users/user_accout.feature ` - snippets from feature file in a dir
328326
329- Generates Snapshot.
330- Snapshot can be used to test dynamical data.
331- If suite name is provided, an actor class will be included into placeholder
332327
333- * ` codecept g:snapshot UserEmails `
334- * ` codecept g:snapshot Products `
335- * ` codecept g:snapshot Acceptance UserEmails `
328+
329+ ## SelfUpdate
330+
331+ Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar ' .
332+
333+ * ` php codecept.phar self-update `
334+
335+ @author Franck Cassedanne < franck@cassedanne.com >
336336
337337
338338
0 commit comments