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. By default sample configuration for Db module is included.
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.
class_name: name of the actor class for current suite.
modules: list of enabled modules with their configuration.
namespace: default namespace of actor, support classes and tests.
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 same configuration templates for development team you can creare
codeception.dist.yml config which will be loaded before
codeception.yml. Dist config will provide shared options whil local
codeception.yml will override them per user basis. This way
codeception.yml should be ignored by VCS system.
For suite configuration template configs are also availble. Rename
suitename.dist.yml to make a dist config.
Configuration loading order:
- environment config