Skip to content

Commit 594ccc6

Browse files
committed
Use upper-cased suite names to match the default directory structure used by codeception v5
1 parent 0a4467c commit 594ccc6

24 files changed

+123
-123
lines changed

_includes/extensions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The screenshots are saved to `tests/_output/record_*` directories, open `index.h
7575

7676
#### Installation
7777

78-
Add this to the list of enabled extensions in `codeception.yml` or `acceptance.suite.yml`:
78+
Add this to the list of enabled extensions in `codeception.yml` or `Acceptance.suite.yml`:
7979

8080
``` yaml
8181
extensions:
@@ -136,7 +136,7 @@ Dependent processes run sequentially one by one.
136136
Can be configured in suite config:
137137

138138
```yaml
139-
# acceptance.suite.yml
139+
# Acceptance.suite.yml
140140
extensions:
141141
enabled:
142142
- Codeception\Extension\RunBefore:
@@ -193,7 +193,7 @@ Can be used to start/stop selenium server, chromedriver, mailcatcher, etc.
193193
Can be configured in suite config:
194194

195195
```yaml
196-
# acceptance.suite.yml
196+
# Acceptance.suite.yml
197197
extensions:
198198
enabled:
199199
- Codeception\Extension\RunProcess:
@@ -203,7 +203,7 @@ extensions:
203203
Multiple parameters can be passed as array:
204204

205205
```yaml
206-
# acceptance.suite.yml
206+
# Acceptance.suite.yml
207207
208208
extensions:
209209
enabled:

docs/APITesting.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ title: API Testing - Codeception Docs
99

1010
The same way we tested a web site, Codeception allows you to test web services. They are very hard to test manually, so it's a really good idea to automate web service testing. We have SOAP and REST as standards, which are represented in corresponding modules, which we will cover in this chapter.
1111

12-
You should start by creating a new test suite, (which was not provided by the `bootstrap` command). We recommend calling it **api** and using the `ApiTester` class for it.
12+
You should start by creating a new test suite, (which was not provided by the `bootstrap` command). We recommend calling it **Api** and using the `ApiTester` class for it.
1313

1414
```bash
15-
php vendor/bin/codecept generate:suite api
15+
php vendor/bin/codecept generate:suite Api
1616
```
1717

1818
We will put all the api tests there.
@@ -23,7 +23,7 @@ We will put all the api tests there.
2323
2424
The REST web service is accessed via HTTP with standard methods: `GET`, `POST`, `PUT`, `DELETE`. They allow users to receive and manipulate entities from the service. Accessing a WebService requires an HTTP client, so for using it you need the module `PhpBrowser` or one of framework modules set up. For example, we can use the `Symfony` module for Symfony2 applications in order to ignore web server and test web service internally.
2525

26-
Configure modules in `api.suite.yml`:
26+
Configure modules in `Api.suite.yml`:
2727

2828
```yaml
2929
actor: ApiTester
@@ -60,7 +60,7 @@ modules:
6060
Once we have configured our new testing suite, we can create the first sample test:
6161

6262
```bash
63-
php vendor/bin/codecept generate:cest api CreateUser
63+
php vendor/bin/codecept generate:cest Api CreateUser
6464
```
6565

6666
It will be called `CreateUserCest.php`.
@@ -379,7 +379,7 @@ class Api extends \Codeception\Module {
379379

380380
## Conclusion
381381

382-
Codeception has two modules that will help you to test various web services. They need a new `api` suite to be created. Remember, you are not limited to test only response body. By including `Db` module you may check if a user has been created after the `CreateUser` call. You can improve testing scenarios by using REST or SOAP responses in your helper methods.
382+
Codeception has two modules that will help you to test various web services. They need a new `Api` suite to be created. Remember, you are not limited to test only response body. By including `Db` module you may check if a user has been created after the `CreateUser` call. You can improve testing scenarios by using REST or SOAP responses in your helper methods.
383383

384384

385385
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/docs/APITesting.md"><strong>Improve</strong> this guide</a></div>

docs/AcceptanceTests.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Common PhpBrowser drawbacks:
5757
We need to specify the `url` parameter in the acceptance suite config:
5858

5959
```yaml
60-
# acceptance.suite.yml
60+
# Acceptance.suite.yml
6161
actor: AcceptanceTester
6262
modules:
6363
enabled:
@@ -68,10 +68,10 @@ modules:
6868
We should start by creating a test with the next command:
6969
7070
```
71-
php vendor/bin/codecept g:cest acceptance Signin
71+
php vendor/bin/codecept g:cest Acceptance Signin
7272
```
7373

74-
It will be placed into `tests/acceptance` directory.
74+
It will be placed into `tests/Acceptance` directory.
7575

7676
```php
7777
class SigninCest
@@ -268,10 +268,10 @@ Each failed assertion will be shown in the test results, but it won't stop the t
268268

269269
Conditional assertions are disabled in bootstrap setup. To enable them you should add corresponding step decorators to suite config:
270270

271-
> If you started project as `codecept init acceptance` they should be already enabled in config
271+
> If you started project as `codecept init Acceptance` they should be already enabled in config
272272
273273
```yaml
274-
# in acceptance.suite.yml
274+
# in Acceptance.suite.yml
275275
# or in codeception.yml inside suites section
276276
step_decorators:
277277
- \Codeception\Step\ConditionalAssertion
@@ -390,7 +390,7 @@ Now, you are ready to run WebDriver tests using Codeception.
390390
391391
To execute a test in a browser you need to change the suite configuration to use **WebDriver** module.
392392
393-
Modify your `acceptance.suite.yml` file:
393+
Modify your `Acceptance.suite.yml` file:
394394
395395
```yaml
396396
actor: AcceptanceTester
@@ -503,10 +503,10 @@ $I->retry(4, 400);
503503

504504
Retries are disabled by default. To enable them you should add retry step decorators to suite config:
505505

506-
> If you started project as `codecept init acceptance` they should be already enabled in config
506+
> If you started project as `codecept init Acceptance` they should be already enabled in config
507507
508508
```yaml
509-
# in acceptance.suite.yml
509+
# in Acceptance.suite.yml
510510
# or in codeception.yml inside suites section
511511
step_decorators:
512512
- \Codeception\Step\Retry
@@ -578,10 +578,10 @@ if ($I->tryToSeeElement('.alert')) {
578578

579579
A/B testing is disabled by default. To enable it you should add corresponding step decorators to suite config:
580580

581-
> If you started project as `codecept init acceptance` in Codeception >= 3.0 they should be already enabled in config
581+
> If you started project as `codecept init Acceptance` in Codeception >= 3.0 they should be already enabled in config
582582

583583
```yaml
584-
# in acceptance.suite.yml
584+
# in Acceptance.suite.yml
585585
# or in codeception.yml inside suites section
586586
step_decorators:
587587
- \Codeception\Step\TryTo

docs/AdvancedUsage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function testNotReadyToday()
192192
There are several ways to execute a bunch of tests. You can run tests from a specific directory:
193193

194194
```
195-
php vendor/bin/codecept run tests/acceptance/admin
195+
php vendor/bin/codecept run tests/Acceptance/admin
196196
```
197197

198198
You can execute one (or several) specific groups of tests:

docs/BDD.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Feature file is written in Gherkin format. Codeception can generate a feature fi
8888
We will assume that we will use scenarios in feature files for acceptance tests, so feature files to be placed in `acceptance` suite directory:
8989

9090
```bash
91-
php vendor/bin/codecept g:feature acceptance checkout
91+
php vendor/bin/codecept g:feature Acceptance checkout
9292
```
9393

9494
Generated template will look like this:
@@ -151,13 +151,13 @@ And in the end we are verifying our expectation using **Then** keyword. The acti
151151
We can test this scenario by executing it in dry-run mode. In this mode test won't be executed (actually, we didn't define any step for it, so it won't be executed in any case).
152152

153153
```bash
154-
php vendor/bin/codecept dry-run acceptance checkout.feature
154+
php vendor/bin/codecept dry-run Acceptance checkout.feature
155155
```
156156

157157
```bash
158158
checkout: order several products
159159
Signature: checkout:order several products
160-
Test: tests/acceptance/checkout.feature:order several products
160+
Test: tests/Acceptance/checkout.feature:order several products
161161
Scenario --
162162
In order to buy product
163163
As a customer
@@ -181,7 +181,7 @@ Besides the scenario steps listed we got the notification that our steps are not
181181
We can define them easily by executing `gherkin:snippets` command for the given suite:
182182
183183
```bash
184-
php vendor/bin/codecept gherkin:snippets acceptance
184+
php vendor/bin/codecept gherkin:snippets Acceptance
185185
```
186186
187187
This will produce code templates for all undefined steps in all feature files of this suite.
@@ -551,7 +551,7 @@ While Behat is a great tool for Behavior Driven Development, you still may prefe
551551
If you decided to run your features with Codeception, we recommend to start with symlinking your `features` directory into one of the test suites:
552552
553553
```bash
554-
ln -s $PWD/features tests/acceptance
554+
ln -s $PWD/features tests/Acceptance
555555
```
556556
557557
Then you will need to implement all step definitions. Run `gherkin:snippets` to generate stubs for them.

docs/Codecoverage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ coverage:
153153
### Remote Server
154154

155155
But if you run tests on different server (or your webserver doesn't use code from current directory) a single option `remote` should be added to config.
156-
For example, let's turn on remote coverage for acceptance suite in `acceptance.suite.yml`:
156+
For example, let's turn on remote coverage for acceptance suite in `Acceptance.suite.yml`:
157157

158158

159159
```yaml

docs/ContinuousIntegration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ before_script:
181181
# Test
182182
test:
183183
script:
184-
- vendor/bin/codecept run acceptance --xml --html
184+
- vendor/bin/codecept run Acceptance --xml --html
185185
artifacts:
186186
when: always
187187
expire_in: 1 week

docs/Customization.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ and you want to get a single report in JUnit and HTML format. The code coverage
3535
If you want to run a specific suite from the application you can execute:
3636

3737
```bash
38-
php vendor/bin/codecept run unit -c frontend
38+
php vendor/bin/codecept run Unit -c frontend
3939
```
4040

41-
Where `unit` is the name of suite and the `-c` option specifies the path to the `codeception.yml` configuration file to use.
41+
Where `Unit` is the name of suite and the `-c` option specifies the path to the `codeception.yml` configuration file to use.
4242
In this example we will assume that there is `frontend/codeception.yml` configuration file
4343
and that we will execute the unit tests for only that app.
4444

@@ -199,7 +199,7 @@ extensions:
199199
200200
```
201201

202-
Extensions can also be enabled per suite inside suite configs (like `acceptance.suite.yml`) and for a specific environment.
202+
Extensions can also be enabled per suite inside suite configs (like `Acceptance.suite.yml`) and for a specific environment.
203203

204204
To enable extension dynamically, execute the `run` command with `--ext` option.
205205
Provide a class name as a parameter:
@@ -371,7 +371,7 @@ You can pass the `-c` option to any Codeception command (except `bootstrap`), to
371371
```
372372
php vendor/bin/codecept run -c ~/projects/ecommerce/
373373
php vendor/bin/codecept run -c ~/projects/drupal
374-
php vendor/bin/codecept generate:cest acceptance CreateArticle -c ~/projects/drupal/
374+
php vendor/bin/codecept generate:cest Acceptance CreateArticle -c ~/projects/drupal/
375375
376376
```
377377

@@ -393,19 +393,19 @@ Tests for groups can be specified as an array of file names or directories conta
393393
```yaml
394394
groups:
395395
# add 2 tests to db group
396-
db: [tests/unit/PersistTest.php, tests/unit/DataTest.php]
396+
db: [tests/Unit/PersistTest.php, tests/Unit/DataTest.php]
397397
398398
# add all tests from a directory to api group
399-
api: [tests/functional/api]
399+
api: [tests/Functional/api]
400400
401401
```
402402

403403
A list of tests for the group can be passed from a Group file. It should be defined in plain text with test names on separate lines:
404404

405405
```
406-
tests/unit/DbTest.php
407-
tests/unit/UserTest.php:creat
408-
tests/unit/UserTest.php:update
406+
tests/Unit/DbTest.php
407+
tests/Unit/UserTest.php:creat
408+
tests/Unit/UserTest.php:update
409409
410410
```
411411
A group file can be included by its relative filename:
@@ -542,11 +542,11 @@ You should also specify the path to the `log` directory, where the reports and l
542542
It is possible to run specific suites from included applications:
543543

544544
* `codecept run` ⬅ Execute all tests from all apps and all suites
545-
* `codecept run unit` ⬅ Runs unit suite from the current app
546-
* `codecept run admin::unit` ⬅ Runs unit suite from admin app
547-
* `codecept run *::unit` ⬅ Runs unit suites from all included apps and NOT the root suite
548-
* `codecept run unit,*::unit` ⬅ Runs included unit suites AND root unit suite
549-
* `codecept run functional,*::unit` ⬅ Runs included unit suites and root functional suite
545+
* `codecept run Unit` ⬅ Runs unit suite from the current app
546+
* `codecept run admin::Unit` ⬅ Runs unit suite from admin app
547+
* `codecept run *::Unit` ⬅ Runs unit suites from all included apps and NOT the root suite
548+
* `codecept run Unit,*::Unit` ⬅ Runs included unit suites AND root unit suite
549+
* `codecept run Functional,*::Unit` ⬅ Runs included unit suites and root functional suite
550550

551551

552552
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/docs/Customization.md"><strong>Improve</strong> this guide</a></div>

docs/ParallelExecution.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ Codeception can organize tests into [groups](https://codeception.com/docs/Advanc
146146

147147

148148
```bash
149-
tests/functional/LoginCept.php
150-
tests/functional/AdminCest.php:createUser
151-
tests/functional/AdminCest.php:deleteUser
149+
tests/Functional/LoginCept.php
150+
tests/Functional/AdminCest.php:createUser
151+
tests/Functional/AdminCest.php:deleteUser
152152
```
153153

154154
Tasks from `\Codeception\Task\SplitTestsByGroups` will generate non-intersecting group files. You can either split your tests by files or by single tests:
@@ -159,15 +159,15 @@ public function parallelSplitTests()
159159
// Split your tests by files
160160
$this->taskSplitTestFilesByGroups(5)
161161
->projectRoot('.')
162-
->testsFrom('tests/acceptance')
162+
->testsFrom('tests/Acceptance')
163163
->groupsTo('tests/Support/Data/paracept_')
164164
->run();
165165

166166
/*
167167
// Split your tests by single tests (alternatively)
168168
$this->taskSplitTestsByGroups(5)
169169
->projectRoot('.')
170-
->testsFrom('tests/acceptance')
170+
->testsFrom('tests/Acceptance')
171171
->groupsTo('tests/Support/Data/paracept_')
172172
->run();
173173
*/
@@ -207,7 +207,7 @@ Let's try to execute tests from the second group:
207207
208208
209209
```bash
210-
php vendor/bin/codecept run acceptance -g paracept_2
210+
php vendor/bin/codecept run Acceptance -g paracept_2
211211
```
212212

213213
#### Step 2: Running Tests
@@ -228,7 +228,7 @@ public function parallelRun()
228228
for ($i = 1; $i <= 5; $i++) {
229229
$parallel->process(
230230
$this->taskCodecept() // use built-in Codecept task
231-
->suite('acceptance') // run acceptance tests
231+
->suite('Acceptance') // run acceptance tests
232232
->group("paracept_$i") // for all paracept_* groups
233233
->xml("tests/_log/result_$i.xml") // save XML results
234234
);

docs/ReusingTestCode.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Do not hard-code complex CSS or XPath locators in your tests but rather move the
9595
Codeception can generate a PageObject class for you with command:
9696

9797
```
98-
php vendor/bin/codecept generate:pageobject acceptance Login
98+
php vendor/bin/codecept generate:pageobject Acceptance Login
9999
```
100100

101101
> It is recommended to use page objects for acceptance testing only
@@ -197,17 +197,17 @@ We call such a classes StepObjects.
197197
Lets create an Admin StepObject with the generator:
198198

199199
```
200-
php vendor/bin/codecept generate:stepobject acceptance Admin
200+
php vendor/bin/codecept generate:stepobject Acceptance Admin
201201
```
202202

203203
You can supply optional action names. Enter one at a time, followed by a newline.
204204
End with an empty line to continue to StepObject creation.
205205

206206
```
207-
php vendor/bin/codecept generate:stepobject acceptance Admin
207+
php vendor/bin/codecept generate:stepobject Acceptance Admin
208208
Add action to StepObject class (ENTER to exit): loginAsAdmin
209209
Add action to StepObject class (ENTER to exit):
210-
StepObject was created in /tests/acceptance/_support/Step/Acceptance/Admin.php
210+
StepObject was created in /tests/Acceptance/_support/Step/Acceptance/Admin.php
211211
```
212212
213213
This will generate a class in `/tests/Support/Step/Acceptance/Admin.php` similar to this:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy