Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d4dfaf

Browse files
Reorganizing "settings" code block
1 parent 7dbd6f2 commit 0d4dfaf

File tree

1 file changed

+15
-49
lines changed

1 file changed

+15
-49
lines changed

docs/reference/Configuration.md

Lines changed: 15 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -80,60 +80,26 @@ Allows to [change default reporters](https://codeception.com/docs/08-Customizati
8080

8181
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.
8282

83+
Syntax example:
8384
{% highlight yaml %}
84-
8585
settings:
86-
87-
# enable/disable syntax of test files before loading
88-
# for php < 7 exec('php -l') is used
89-
# disable if you need to speed up tests execution
90-
lint: true
91-
92-
# randomize test order
93-
shuffle: true
94-
95-
# by default it's false on Windows
96-
# use [ANSICON](https://github.com/adoxa/ansicon) to colorize output.
9786
colors: true
98-
99-
# Generate XML JUnit report using strict schema
100-
# Avoid putting additional report fields like steps or scenario names to it
101-
# Required for XML reports on Jenkins CI
102-
strict_xml: false
103-
104-
# Tests (especially functional) can take a lot of memory
105-
# We set a high limit for them by default.
106-
memory_limit: 1024M
107-
108-
# This value controls whether PHPUnit attempts to backup global variables
109-
# See https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.backupGlobals
110-
backup_globals: true
111-
112-
# PHPUnit can be strict about tests that do not test anything
113-
# See https://phpunit.de/manual/current/en/risky-tests.html#risky-tests.useless-tests
114-
report_useless_tests: false
115-
116-
# PHPUnit can be strict about output during tests.
117-
# See https://phpunit.de/manual/current/en/risky-tests.html#risky-tests.output-during-test-execution
118-
disallow_test_output: false
119-
120-
# PHPUnit can be strict about tests that manipulate global state.
121-
# See https://phpunit.de/manual/current/en/risky-tests.html#risky-tests.global-state-manipulation
122-
be_strict_about_changes_to_global_state: false
123-
124-
# Log the incomplete and skipped tests into junit report
125-
# See https://phpunit.de/manual/current/en/appendixes.configuration.html
126-
# Section logging > junit
127-
log_incomplete_skipped: false
128-
129-
# Set the error_reporting level
130-
# You can specify either a predefined constant or an integer value
131-
# See https://www.php.net/manual/en/function.error-reporting.php
132-
# See https://www.php.net/manual/en/errorfunc.constants.php
133-
error_level: E_ALL & ~E_STRICT & ~E_DEPRECATED
134-
13587
{% endhighlight %}
13688

89+
Possible settings:
90+
91+
* `backup_globals: true`: Controls whether PHPUnit attempts to backup global variables, see https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.backupGlobals
92+
* `be_strict_about_changes_to_global_state: false`: PHPUnit can be strict about tests that manipulate global state, see https://phpunit.de/manual/current/en/risky-tests.html#risky-tests.global-state-manipulation
93+
* `colors: true`: By default this is false on Windows. Use [ANSICON](https://github.com/adoxa/ansicon) to colorize output.
94+
* `disallow_test_output: false`: PHPUnit can be strict about output during tests, see https://phpunit.de/manual/current/en/risky-tests.html#risky-tests.output-during-test-execution
95+
* `error_level: E_ALL & ~E_STRICT & ~E_DEPRECATED`: Set the error_reporting level. You can specify either a predefined constant or an integer value, see https://www.php.net/manual/en/function.error-reporting.php and https://www.php.net/manual/en/errorfunc.constants.php
96+
* `memory_limit: 1024M`: Tests (especially functional) can take a lot of memory. We set a high limit for them by default.
97+
* `lint: true`: Enable/disable syntax of test files before loading. For PHP < 7 `exec('php -l')` is used. Disable if you need to speed up tests execution.
98+
* `log_incomplete_skipped: false`: Log the incomplete and skipped tests into junit report ,see https://phpunit.de/manual/current/en/appendixes.configuration.html Section logging > junit
99+
* `report_useless_tests: false`: PHPUnit can be strict about tests that do not test anything, see https://phpunit.de/manual/current/en/risky-tests.html#risky-tests.useless-tests
100+
* `shuffle: true`: Randomize test order
101+
* `strict_xml: false`: Generate XML JUnit report using strict schema. Avoid putting additional report fields like steps or scenario names to it. Required for XML reports on Jenkins CI
102+
137103
## Suite Configuration: `unit.suite.yml`, `functional.suite.yml` etc.
138104

139105
Each suite has its own configuration inside the directory set by `paths: tests: ` in `codeception.yml`. Alphabetical list of options:

0 commit comments

Comments
 (0)