Skip to content

Commit 26e7950

Browse files
Reorganizing the page
What I did: * Order the options alphabetically * Promote each option to be a heading * Some slight rewordings TODO: Get the `settings` keys out of the codeblock - maybe a bulleted list? - to allow HTML markup
1 parent dea0565 commit 26e7950

File tree

1 file changed

+61
-40
lines changed

1 file changed

+61
-40
lines changed

docs/reference/Configuration.md

Lines changed: 61 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,80 @@ title: Configuration - Codeception - Documentation
55

66
# Configuration
77

8-
## Global Configuration
8+
## Global Configuration: `codeception.yml`
99

10-
Configuration file `codeception.yml` is generated by `codecept bootstrap` command. It has preconfigured settings you can change.
10+
The global configuration file `codeception.yml` is generated by the `codecept bootstrap` command. Alphabetical list of options:
1111

12-
Here are global options you can change inside configuration:
12+
### `actor_suffix`
1313

14-
* `actor_suffix: Tester`: changes suffix for Actor classes. This defines a rule to generate new test suites. If you change `Tester` to `Ninja`, and generate new `api` test suite, you will get `ApiNinja` actor class.
15-
* `namespace`: set a namespace for tests. All new tests and support classes will be generated under that namespace. Allows to configure [multiple test setups for one runner](https://codeception.com/docs/08-Customization#Namespaces).
16-
* `include: []`: include additional Codeception configurations for [multiple applications setup](https://codeception.com/docs/08-Customization#Namespaces).
17-
* `paths` directories used by Codeception. Default values are:
14+
Sets the suffix for "Actor" classes. Default: `Tester`. If you set it to `Ninja` and generate a new `api` test suite, you will get an `ApiNinja` actor class.
15+
16+
### `bootstrap`
17+
18+
Bootstrap script that will be executed before all suites. A script should be put into `tests` directory.
19+
20+
### `coverage`
21+
22+
[CodeCoverage](https://codeception.com/docs/11-Codecoverage#Configuration) settings.
23+
24+
### `extends`
25+
26+
Allows you to specify a file (relative to the `codeception.yml` file) that holds some already pre-defined values. This can be used to always use the same configuration for modules or whatever.
27+
28+
### `extensions`
29+
30+
Allows to enable and configure [Codeception extensions](https://codeception.com/docs/08-Customization#Extension), [Group Objects](https://codeception.com/docs/08-Customization#Group-Objects), and [Custom Commands](https://codeception.com/docs/08-Customization#Custom-Commands).
31+
32+
### `gherkin`
33+
34+
[Gherkin options](https://codeception.com/docs/07-BDD#Configuration).
35+
36+
### `include`
37+
38+
Include additional Codeception configurations for [multiple applications setup](https://codeception.com/docs/08-Customization#Namespaces).
39+
40+
### `modules`
41+
42+
Allows to create shared module configuration for all included suites.
1843

1944
{% highlight yaml %}
45+
modules:
46+
config:
47+
Db:
48+
dsn: ''
49+
user: ''
50+
password: ''
51+
dump: tests/_data/dump.sql
52+
{% endhighlight %}
2053

21-
paths:
22-
# where the tests stored
23-
tests: tests
54+
### `namespace`
55+
56+
Sets the namespace under which all new tests and support classes will be generated. Allows to configure [multiple test setups for one runner](https://codeception.com/docs/08-Customization#Namespaces).
2457

25-
# directory for fixture data
26-
data: tests/_data
58+
### `params`
2759

28-
# directory for support code
29-
support: tests/_support
60+
Allows to pass [external parameters](https://codeception.com/docs/06-ModulesAndHelpers#Dynamic-Configuration-With-Parameters) into module configuration.
3061

31-
# directory for output
32-
output: tests/_output
62+
### `paths`
3363

34-
# directory for environment configuration
35-
envs: tests/_envs
64+
Directories used by Codeception. Default values:
3665

66+
{% highlight yaml %}
67+
paths:
68+
tests : tests # where the tests stored
69+
data : tests/_data # directory for fixture data
70+
support: tests/_support # directory for support code
71+
output : tests/_output # directory for output
72+
envs : tests/_envs # directory for environment configuration
3773
{% endhighlight %}
3874

39-
* `settings`: provide additional options for test runner. They may dramatically change the way Codeception is executed. For instance, take a note of `shuffle` option which allows to randomize tests execution order and `lint` option that toggles parsing a test file (using `php -l`) before loading it.
75+
### `reporters`
76+
77+
Allows to [change default reporters](https://codeception.com/docs/08-Customization#Custom-Reporters) of Codeception
78+
79+
### `settings`
80+
81+
Provide additional options for the test runner. They may dramatically change the way Codeception is executed. For instance, take a note of `shuffle` option which allows to randomize tests execution order and `lint` option that toggles parsing a test file (using `php -l`) before loading it.
4082

4183
{% highlight yaml %}
4284

@@ -92,27 +134,6 @@ settings:
92134

93135
{% endhighlight %}
94136

95-
* `modules`: allows to create shared module configuration for all included suites.
96-
97-
{% highlight yaml %}
98-
99-
modules:
100-
config:
101-
Db:
102-
dsn: ''
103-
user: ''
104-
password: ''
105-
dump: tests/_data/dump.sql
106-
107-
{% endhighlight %}
108-
* `extends`: allows you to specify a file (relative to the `codeception.yml` file) that holds some already pre-defined values. This can be used to always use the same configuration for modules or whatever.
109-
* `extensions`: allows to enable and configure [Codeception extensions](https://codeception.com/docs/08-Customization#Extension), [Group Objects](https://codeception.com/docs/08-Customization#Group-Objects), and [Custom Commands](https://codeception.com/docs/08-Customization#Custom-Commands).
110-
* `reporters`: allows to [change default reporters](https://codeception.com/docs/08-Customization#Custom-Reporters) of Codeception
111-
* `coverage`: [CodeCoverage](https://codeception.com/docs/11-Codecoverage#Configuration) settings.
112-
* `params`: allows to pass [external parameters](https://codeception.com/docs/06-ModulesAndHelpers#Dynamic-Configuration-With-Parameters) into module configuration.
113-
* `gherkin`: BDD-specific [Gherkin options](https://codeception.com/docs/07-BDD#Configuration).
114-
* `bootstrap`: bootstrap script that will be executed before all suites. A script should be put into `tests` directory.
115-
116137
## Suite Configuration
117138

118139
Each generated suite have its own configuration inside directory set by `paths: tests: ` configuration option in `codeception.yml`. Each suite configuration is named like `suitename.suite.yml`. It allows to enable and configure modules, and more.

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