--- layout: page title: Codeception Configuration --- # Configuration Configuration was explained in [Getting Started](http://codeception.com/docs/02-GettingStarted#configuration) chapter of Guides. ## Global Configuration Configuration file `codeception.yml` is generated by `codecept bootstrap` command and contains all parameters for running Codeception. Example: {% highlight yaml %} paths: tests: tests log: tests/_log data: tests/_data helpers: tests/_helpers settings: bootstrap: _bootstrap.php suite_class: \PHPUnit_Framework_TestSuite colors: false memory_limit: 1024M log: true modules: config: Db: dsn: '' user: '' password: '' dump: tests/_data/dump.sql {% endhighlight %} ### Parameters #### Paths * tests - path to test directory * log - path to log directory, where tests output stored * data - path to data directory, where tests input data may be stored * helpers - path to [helper](/docs/03-Modules#helpers) modules with custom actions and assertions #### Settings * bootstrap - the bootstrap file always loaded before each step. Can be useful for loading fixtures. But probably you want manual control, then remove this line and use `require_once '_bootstrap.php'` inside tests. * suite_class - suite is used as a tests container. * colors - colored ooutput, by default is `false` on Windows and `true` on other systems. Install [ANSICon](http://adoxa.110mb.com/ansicon/) on Windows and set to true. * memory_limit - PHP memory consuming parameter. Increase this value if you run out of memory. * log - weather to log tests execution process to file. #### Modules This section is used to configure a module for all suites. If you got module shared through all suites, put their configuration here. #### Extensions Extensions can subscribe to events and extend Codeception functionality. They can be installed from 3rd party sources and enabled in global configuration `codeception.yml`. {% highlight yaml %} extensions: enabled: [MyExtension] # class name config: MyExtension: param: value {% endhighlight %} Extensions should included in global bootstrap file in `tests/_bootstrap.php` ## Suite Configuration Each suite has it's configuration file in `tests` directory. It's used for configuring modules used in test scenarios. Example: {% highlight yaml %} class_name: WebGuy modules: enabled: - PhpBrowser - WebHelper config: PhpBrowser: url: 'http://localhost/myapp/' {% endhighlight %} ### Parameters * class_name - a [Guy class](http://codeception.com/docs/02-GettingStarted#guys) used in this suite. #### Modules * enabled - a list of modules. The order of list *matters* as the next modules can replace actions from previous ones. * config - config of module. The configuration parameters for each module is documented on pages for each module. There are required and optional pameters. Examples: Configuring [Db](http://codeception.com/docs/modules/Db) module: {% highlight yaml %} modules: enabled [PhpBrowser, WebHelper, Db] config: dsn: 'mysql:host=localhost;dbname=testdb' user: root password: dump: tests/_data/dump.sql {% endhighlight %} Configuring [Selenium2](http://codeception.com/docs/modules/Selenium2) module: {% highlight yaml %} modules: enabled: [Selenium2, WebHelper] config: Selenium2: url: http://localhost/ browser: firefox delay: 10 {% endhighlight %}