codeception.yml is generated by
codecept bootstrap command. It has preconfigured settings you can change.
Here are global options you can change inside configuration:
actor: Tester: changes suffix for Actor classes. This defines a rule to generate new test suites. If you change
Ninja, and generate new
api test suite, you will get
ApiNinja actor class.
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.
include: : include additional Codeception configurations for multiple applications setup.
paths directories used by Codeception. Default values are:
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.
modules: allows to create shared module configuration for all included suites.
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.
actor: name of the actor class for current suite.
modules: list of enabled modules with their configuration.
extends: allows you to specify a file (relative to the
*.suite.yml file) that holds some already pre-defined values. This can be used to always use the same configuration for modules or whatever.
namespace: default namespace of actor, support classes and tests.
suite_namespace: default namespace for new tests of this suite (ignores
env: override any configuration per environment.
groups: groups with the list of tests of for corresponding group.
coverage: pre suite CodeCoverage settings.
gherkin: per suite BDD Gherkin settings.
error_level: error level for runner in current suite. Should be specified for unit, integration, functional tests. Passes value to
Config Templates (dist)
To provide the same configuration template for your development team, you can create a
codeception.dist.yml config file, which will be loaded before
codeception.yml. The dist config provides shared options, while local
codeception.yml files override them on a per-installation basis. Therefore,
codeception.yml should be ignored by your VCS system.
Config templates can also be used for suite configuration, by creating a
Configuration loading order:
- environment config