Skip to content

Commit d409544

Browse files
authored
Merge pull request #861 from ThomasLandauer/patch-2
Update Commands.md: Capitalizing suite names
2 parents 87638f9 + c3531e0 commit d409544

File tree

1 file changed

+22
-84
lines changed

1 file changed

+22
-84
lines changed

docs/reference/Commands.md

Lines changed: 22 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,23 @@ If PageObject is generated globally it will act as UIMap, without any logic in i
1414
* `codecept g:page Registration`
1515
* `codecept g:page acceptance Login`
1616

17-
18-
1917
## GherkinSnippets
2018

2119
Generates code snippets for matched feature files in a suite.
2220
Code snippets are expected to be implemented in Actor or PageObjects
2321

2422
Usage:
2523

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
3228

3329
## Console
3430

3531
Try to execute test commands in run-time. You may try commands before writing the test.
3632

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.
4034

4135
## GenerateSnapshot
4236

@@ -48,34 +42,27 @@ If suite name is provided, an actor class will be included into placeholder
4842
* `codecept g:snapshot Products`
4943
* `codecept g:snapshot acceptance UserEmails`
5044

51-
52-
5345
## GenerateHelper
5446

5547
Creates empty Helper class.
5648

5749
* `codecept g:helper MyHelper`
5850
* `codecept g:helper "My\Helper"`
5951

60-
61-
62-
6352
## Run
6453

6554
Executes tests.
6655

6756
Usage:
6857

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`
7966

8067
Verbosity modes:
8168

@@ -145,9 +132,6 @@ Options:
145132

146133
{% endhighlight %}
147134

148-
149-
150-
151135
## Bootstrap
152136

153137
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**.
161145
* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests.
162146
* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed
163147

164-
165-
166-
167148
## SelfUpdate
168149

169150
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.
172153

173154
@author Franck Cassedanne <[email protected]>
174155

175-
176-
177156
## GenerateGroup
178157

179158
Creates empty GroupObject - extension which handles all group events.
180159

181160
* `codecept g:group Admin`
182161

183-
184-
185-
186162
## GherkinSteps
187163

188164
Prints all steps from all Gherkin contexts for a specific suite
@@ -192,13 +168,8 @@ codecept gherkin:steps acceptance
192168

193169
{% endhighlight %}
194170

195-
196-
197-
198171
## Init
199172

200-
201-
202173
## GenerateEnvironment
203174

204175
Generates empty environment configuration file into envs dir:
@@ -207,27 +178,20 @@ Generates empty environment configuration file into envs dir:
207178

208179
Required to have `envs` path to be specified in `codeception.yml`
209180

210-
211-
212181
## GenerateScenarios
213182

214183
Generates user-friendly text scenarios from scenario-driven tests (Cest).
215184

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
221188

222189
## GenerateStepObject
223190

224191
Generates StepObject class. You will be asked for steps you want to implement.
225192

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
231195

232196
## GenerateTest
233197

@@ -236,8 +200,6 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`.
236200
* `codecept g:test unit User`
237201
* `codecept g:test unit "App\User"`
238202

239-
240-
241203
## ConfigValidate
242204

243205
Validates and prints Codeception config.
@@ -259,9 +221,6 @@ Check overriding config values (like in `run` command)
259221
* `codecept config:validate -o "settings: lint: false"`: disable linting
260222
* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter
261223

262-
263-
264-
265224
## Build
266225

267226
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
270229
* `codecept build`
271230
* `codecept build path/to/project`
272231

273-
274-
275-
276232
## GenerateSuite
277233

278234
Create new test suite. Requires suite name and actor name
@@ -282,9 +238,6 @@ Create new test suite. Requires suite name and actor name
282238
* `codecept g:suite integration Code` -> integration + CodeTester
283239
* `codecept g:suite frontend Front` -> frontend + FrontTester
284240

285-
286-
287-
288241
## GenerateFeature
289242

290243
Generates Feature file (in Gherkin):
@@ -293,30 +246,21 @@ Generates Feature file (in Gherkin):
293246
* `codecept g:feature suite subdir/subdir/login.feature`
294247
* `codecept g:feature suite login.feature -c path/to/project`
295248

296-
297-
298-
299249
## DryRun
300250

301251
Shows step by step execution process for scenario driven tests without actually running them.
302252

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`
310257

311258
## Clean
312259

313260
Recursively cleans `output` directory and generated code.
314261

315262
* `codecept clean`
316263

317-
318-
319-
320264
## GenerateCest
321265

322266
Generates Cest (scenario-driven object-oriented test) file:
@@ -326,10 +270,4 @@ Generates Cest (scenario-driven object-oriented test) file:
326270
* `codecept g:cest suite LoginCest -c path/to/project`
327271
* `codecept g:cest "App\Login"`
328272

329-
330-
331-
332273
## CompletionFallback
333-
334-
335-

0 commit comments

Comments
 (0)