From d3380e150bd559c7452fc23908cccd3874e71ef9 Mon Sep 17 00:00:00 2001 From: Sascha Egerer Date: Fri, 28 Jun 2024 17:36:40 +0200 Subject: [PATCH 001/156] Add "Examples" attribute example for associative keys --- docs/AdvancedUsage.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/AdvancedUsage.md b/docs/AdvancedUsage.md index be9aca38a..9f8b7ac47 100644 --- a/docs/AdvancedUsage.md +++ b/docs/AdvancedUsage.md @@ -265,6 +265,32 @@ class EndpointCest ``` +You can also use [named arguments](https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments) to get an example with associative keys. +```php +sendGet($example['url']); + $I->seeResponseCodeIs($example['expectedReponseCode']); + } +} + +``` + ## Example Annotation As well as the `\Codeception\Attribute\Examples` attribute, available for Cest tests, the `@example` attribute allows you to From 3877cc81600e3c0af9aaf36db631f3e79af16555 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sat, 14 Dec 2024 15:19:56 +0100 Subject: [PATCH 002/156] Update modules.yml: Adding Mailpit --- _data/modules.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_data/modules.yml b/_data/modules.yml index 6b8b770e3..a927d5d4e 100644 --- a/_data/modules.yml +++ b/_data/modules.yml @@ -87,6 +87,12 @@ description: Codeception module to test email using MailCare.io (Free, Open Source or paid services). color: "#e65722" +- name: Mailpit + image: https://mailpit.axllent.org/images/mailpit.svg + link: https://github.com/koehnlein/codeception-email-mailpit + description: Mailpit is a standalone local SMTP server to test email deliveries. The Codeception module provides assertions such as `$I->haveUnreadEmails();` or `$I->seeInOpenedEmailHtmlBody()`. + color: "#2C3E50" + - name: MailCatcher link: https://github.com/captbaritone/codeception-mailcatcher-module description: MailCatcher is a standalone software which can be configured to catch *any* email sent by your development server, and display it on a webpage. The MailCatcher Module allows you to test the contents of those emails in an acceptance test. From f5012d2b6c6a2a7e833db42aa3a2ca27597ada4f Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sat, 14 Dec 2024 15:21:05 +0100 Subject: [PATCH 003/156] Update modules.yml --- _data/modules.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/_data/modules.yml b/_data/modules.yml index a927d5d4e..71f0a80d6 100644 --- a/_data/modules.yml +++ b/_data/modules.yml @@ -96,7 +96,6 @@ - name: MailCatcher link: https://github.com/captbaritone/codeception-mailcatcher-module description: MailCatcher is a standalone software which can be configured to catch *any* email sent by your development server, and display it on a webpage. The MailCatcher Module allows you to test the contents of those emails in an acceptance test. - color: "#FFF5C4" - name: MailSMTP link: https://github.com/AhmedSamy/codeception-smtp-mail From 5934add981de71f6cf2e14856a0db7b1ceb15e8e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 Jan 2025 12:28:42 +0000 Subject: [PATCH 004/156] updated --- changelog.markdown | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index f00b0213e..6bd71f62c 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,19 @@ title: Codeception Changelog +### module-laravel 3.2.0: 3.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/01/13 11:42:45 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) + + + +## What's Changed +* fix: use the request object resolved from the app container as parameter to kernel's terminate method call by **[countless-integers](https://github.com/countless-integers)** in https://github.com/Codeception/module-laravel/pull/52 +* Call `forgetBootstrappers` after test by **[asanikovich](https://github.com/asanikovich)** in https://github.com/Codeception/module-laravel/pull/53 + +**Full Changelog**: https://github.com/Codeception/module-laravel/compare/3.1.1...3.2.0 + + ### module-yii2 1.1.12: 1.1.12 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2024/12/09 14:36:21 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) From cbe667eec36ddb147271d3b002b081a6d2c1bd48 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 Jan 2025 18:19:01 +0000 Subject: [PATCH 005/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f5575bdc9..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,90 +5,46 @@ title: Commands - Codeception - Documentation # Console Commands -## Run +## GenerateEnvironment -Executes tests. +Generates empty environment configuration file into envs dir: -Usage: + * `codecept g:env firefox` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Required to have `envs` path to be specified in `codeception.yml` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -116,45 +72,27 @@ codecept gherkin:steps acceptance -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## CompletionFallback +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -170,41 +108,54 @@ Generates Cest (scenario-driven object-oriented test) file: -## GenerateHelper +## SelfUpdate -Creates empty Helper class. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `php codecept.phar self-update` +@author Franck Cassedanne -## Console +## GenerateTest -Try to execute test commands in run-time. You may try commands before writing the test. +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GeneratePageObject +## GenerateFeature -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates Feature file (in Gherkin): -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. +## GenerateSnapshot -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` @@ -223,113 +174,162 @@ Usage: -## SelfUpdate +## DryRun -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Shows step by step execution process for scenario driven tests without actually running them. -* `php codecept.phar self-update` +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -@author Franck Cassedanne -## GenerateEnvironment +## GenerateScenarios -Generates empty environment configuration file into envs dir: +Generates user-friendly text scenarios from scenario-driven tests (Cest). - * `codecept g:env firefox` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Required to have `envs` path to be specified in `codeception.yml` +## GeneratePageObject -## Init +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateGroup -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` +## GenerateSuite -## Bootstrap +Create new test suite. Requires suite name and actor name -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## CompletionFallback -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config +## Init -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +## Run -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: -## GenerateSuite +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -Create new test suite. Requires suite name and actor name +Load config: -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run + +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests + +{% endhighlight %} -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From fe0bae5bdad9fd2b13aebc05365fdab66e43e97e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 Jan 2025 19:10:38 +0000 Subject: [PATCH 006/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..f5575bdc9 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,46 +5,90 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} @@ -72,49 +116,36 @@ codecept gherkin:steps acceptance -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne +## CompletionFallback @@ -127,35 +158,53 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## GenerateFeature +## GenerateCest -Generates Feature file (in Gherkin): +Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateSnapshot +## GenerateHelper -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Creates empty Helper class. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateHelper -Creates empty Helper class. +## Console -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -174,162 +223,113 @@ Usage: -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## GeneratePageObject +Required to have `envs` path to be specified in `codeception.yml` -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## GenerateFeature -* `codecept g:group Admin` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## CompletionFallback -## Clean +## GenerateSnapshot -Recursively cleans `output` directory and generated code. +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -* `codecept clean` +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` +## ConfigValidate -## Init +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## Run +Load config: -Executes tests. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Usage: +Check overriding config values (like in `run` command) -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateSuite -Override config values: +Create new test suite. Requires suite name and actor name -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From d724d88ca1fa582a2d291b20e45fd9c275fc0a19 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 Jan 2025 20:15:03 +0000 Subject: [PATCH 007/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f5575bdc9..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,90 +5,46 @@ title: Commands - Codeception - Documentation # Console Commands -## Run +## GenerateEnvironment -Executes tests. +Generates empty environment configuration file into envs dir: -Usage: + * `codecept g:env firefox` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Required to have `envs` path to be specified in `codeception.yml` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -116,45 +72,27 @@ codecept gherkin:steps acceptance -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## CompletionFallback +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -170,41 +108,54 @@ Generates Cest (scenario-driven object-oriented test) file: -## GenerateHelper +## SelfUpdate -Creates empty Helper class. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `php codecept.phar self-update` +@author Franck Cassedanne -## Console +## GenerateTest -Try to execute test commands in run-time. You may try commands before writing the test. +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GeneratePageObject +## GenerateFeature -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates Feature file (in Gherkin): -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. +## GenerateSnapshot -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` @@ -223,113 +174,162 @@ Usage: -## SelfUpdate +## DryRun -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Shows step by step execution process for scenario driven tests without actually running them. -* `php codecept.phar self-update` +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -@author Franck Cassedanne -## GenerateEnvironment +## GenerateScenarios -Generates empty environment configuration file into envs dir: +Generates user-friendly text scenarios from scenario-driven tests (Cest). - * `codecept g:env firefox` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Required to have `envs` path to be specified in `codeception.yml` +## GeneratePageObject -## Init +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateGroup -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` +## GenerateSuite -## Bootstrap +Create new test suite. Requires suite name and actor name -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## CompletionFallback -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config +## Init -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +## Run -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: -## GenerateSuite +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -Create new test suite. Requires suite name and actor name +Load config: -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run + +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests + +{% endhighlight %} -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 6f54863bbd980d6e4698ea7a02e2b5ce04466b10 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 Jan 2025 21:12:44 +0000 Subject: [PATCH 008/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..f5575bdc9 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,46 +5,90 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} @@ -72,49 +116,36 @@ codecept gherkin:steps acceptance -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne +## CompletionFallback @@ -127,35 +158,53 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## GenerateFeature +## GenerateCest -Generates Feature file (in Gherkin): +Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateSnapshot +## GenerateHelper -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Creates empty Helper class. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateHelper -Creates empty Helper class. +## Console -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -174,162 +223,113 @@ Usage: -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## GeneratePageObject +Required to have `envs` path to be specified in `codeception.yml` -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## GenerateFeature -* `codecept g:group Admin` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## CompletionFallback -## Clean +## GenerateSnapshot -Recursively cleans `output` directory and generated code. +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -* `codecept clean` +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` +## ConfigValidate -## Init +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## Run +Load config: -Executes tests. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Usage: +Check overriding config values (like in `run` command) -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateSuite -Override config values: +Create new test suite. Requires suite name and actor name -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From c206474ba653f44d9ff50c40d87578dbfe7fa655 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Jan 2025 15:14:20 +0000 Subject: [PATCH 009/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f5575bdc9..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,90 +5,46 @@ title: Commands - Codeception - Documentation # Console Commands -## Run +## GenerateEnvironment -Executes tests. +Generates empty environment configuration file into envs dir: -Usage: + * `codecept g:env firefox` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Required to have `envs` path to be specified in `codeception.yml` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -116,45 +72,27 @@ codecept gherkin:steps acceptance -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## CompletionFallback +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -170,41 +108,54 @@ Generates Cest (scenario-driven object-oriented test) file: -## GenerateHelper +## SelfUpdate -Creates empty Helper class. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `php codecept.phar self-update` +@author Franck Cassedanne -## Console +## GenerateTest -Try to execute test commands in run-time. You may try commands before writing the test. +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GeneratePageObject +## GenerateFeature -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates Feature file (in Gherkin): -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. +## GenerateSnapshot -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` @@ -223,113 +174,162 @@ Usage: -## SelfUpdate +## DryRun -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Shows step by step execution process for scenario driven tests without actually running them. -* `php codecept.phar self-update` +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -@author Franck Cassedanne -## GenerateEnvironment +## GenerateScenarios -Generates empty environment configuration file into envs dir: +Generates user-friendly text scenarios from scenario-driven tests (Cest). - * `codecept g:env firefox` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Required to have `envs` path to be specified in `codeception.yml` +## GeneratePageObject -## Init +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateGroup -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` +## GenerateSuite -## Bootstrap +Create new test suite. Requires suite name and actor name -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## CompletionFallback -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config +## Init -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +## Run -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: -## GenerateSuite +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -Create new test suite. Requires suite name and actor name +Load config: -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run + +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests + +{% endhighlight %} -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 1983127eae6a59f45dcde21222dcab31df97e7d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Jan 2025 16:17:34 +0000 Subject: [PATCH 010/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..f5575bdc9 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,46 +5,90 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} @@ -72,49 +116,36 @@ codecept gherkin:steps acceptance -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne +## CompletionFallback @@ -127,35 +158,53 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## GenerateFeature +## GenerateCest -Generates Feature file (in Gherkin): +Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateSnapshot +## GenerateHelper -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Creates empty Helper class. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateHelper -Creates empty Helper class. +## Console -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -174,162 +223,113 @@ Usage: -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## GeneratePageObject +Required to have `envs` path to be specified in `codeception.yml` -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## GenerateFeature -* `codecept g:group Admin` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## CompletionFallback -## Clean +## GenerateSnapshot -Recursively cleans `output` directory and generated code. +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -* `codecept clean` +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` +## ConfigValidate -## Init +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## Run +Load config: -Executes tests. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Usage: +Check overriding config values (like in `run` command) -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateSuite -Override config values: +Create new test suite. Requires suite name and actor name -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From aa337e3c71881a11c8ad2802203778746c0e0f39 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Jan 2025 21:11:01 +0000 Subject: [PATCH 011/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f5575bdc9..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,90 +5,46 @@ title: Commands - Codeception - Documentation # Console Commands -## Run +## GenerateEnvironment -Executes tests. +Generates empty environment configuration file into envs dir: -Usage: + * `codecept g:env firefox` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Required to have `envs` path to be specified in `codeception.yml` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -116,45 +72,27 @@ codecept gherkin:steps acceptance -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## CompletionFallback +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -170,41 +108,54 @@ Generates Cest (scenario-driven object-oriented test) file: -## GenerateHelper +## SelfUpdate -Creates empty Helper class. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `php codecept.phar self-update` +@author Franck Cassedanne -## Console +## GenerateTest -Try to execute test commands in run-time. You may try commands before writing the test. +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GeneratePageObject +## GenerateFeature -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates Feature file (in Gherkin): -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. +## GenerateSnapshot -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` @@ -223,113 +174,162 @@ Usage: -## SelfUpdate +## DryRun -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Shows step by step execution process for scenario driven tests without actually running them. -* `php codecept.phar self-update` +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -@author Franck Cassedanne -## GenerateEnvironment +## GenerateScenarios -Generates empty environment configuration file into envs dir: +Generates user-friendly text scenarios from scenario-driven tests (Cest). - * `codecept g:env firefox` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Required to have `envs` path to be specified in `codeception.yml` +## GeneratePageObject -## Init +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateGroup -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` +## GenerateSuite -## Bootstrap +Create new test suite. Requires suite name and actor name -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## CompletionFallback -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config +## Init -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +## Run -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: -## GenerateSuite +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -Create new test suite. Requires suite name and actor name +Load config: -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run + +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests + +{% endhighlight %} -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 5bdcbb43a0393164d84b3d047e3f65103a9b48f4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 02:41:16 +0000 Subject: [PATCH 012/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..f5575bdc9 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,46 +5,90 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} @@ -72,49 +116,36 @@ codecept gherkin:steps acceptance -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne +## CompletionFallback @@ -127,35 +158,53 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## GenerateFeature +## GenerateCest -Generates Feature file (in Gherkin): +Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateSnapshot +## GenerateHelper -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Creates empty Helper class. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateHelper -Creates empty Helper class. +## Console -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -174,162 +223,113 @@ Usage: -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## GeneratePageObject +Required to have `envs` path to be specified in `codeception.yml` -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## GenerateFeature -* `codecept g:group Admin` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## CompletionFallback -## Clean +## GenerateSnapshot -Recursively cleans `output` directory and generated code. +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -* `codecept clean` +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` +## ConfigValidate -## Init +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## Run +Load config: -Executes tests. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Usage: +Check overriding config values (like in `run` command) -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateSuite -Override config values: +Create new test suite. Requires suite name and actor name -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 8d07b6f21a4b73c2b5af181e190578246228010d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 07:13:33 +0000 Subject: [PATCH 013/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f5575bdc9..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,90 +5,46 @@ title: Commands - Codeception - Documentation # Console Commands -## Run +## GenerateEnvironment -Executes tests. +Generates empty environment configuration file into envs dir: -Usage: + * `codecept g:env firefox` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Required to have `envs` path to be specified in `codeception.yml` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -116,45 +72,27 @@ codecept gherkin:steps acceptance -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## CompletionFallback +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -170,41 +108,54 @@ Generates Cest (scenario-driven object-oriented test) file: -## GenerateHelper +## SelfUpdate -Creates empty Helper class. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `php codecept.phar self-update` +@author Franck Cassedanne -## Console +## GenerateTest -Try to execute test commands in run-time. You may try commands before writing the test. +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GeneratePageObject +## GenerateFeature -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates Feature file (in Gherkin): -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. +## GenerateSnapshot -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` @@ -223,113 +174,162 @@ Usage: -## SelfUpdate +## DryRun -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Shows step by step execution process for scenario driven tests without actually running them. -* `php codecept.phar self-update` +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -@author Franck Cassedanne -## GenerateEnvironment +## GenerateScenarios -Generates empty environment configuration file into envs dir: +Generates user-friendly text scenarios from scenario-driven tests (Cest). - * `codecept g:env firefox` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Required to have `envs` path to be specified in `codeception.yml` +## GeneratePageObject -## Init +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateGroup -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` +## GenerateSuite -## Bootstrap +Create new test suite. Requires suite name and actor name -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## CompletionFallback -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config +## Init -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +## Run -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: -## GenerateSuite +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -Create new test suite. Requires suite name and actor name +Load config: -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run + +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests + +{% endhighlight %} -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 62cdfac90e0dbcdf4b325958ac0d9b6924a3456a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 08:18:27 +0000 Subject: [PATCH 014/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..f5575bdc9 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,46 +5,90 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} @@ -72,49 +116,36 @@ codecept gherkin:steps acceptance -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne +## CompletionFallback @@ -127,35 +158,53 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## GenerateFeature +## GenerateCest -Generates Feature file (in Gherkin): +Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateSnapshot +## GenerateHelper -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Creates empty Helper class. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateHelper -Creates empty Helper class. +## Console -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -174,162 +223,113 @@ Usage: -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## GeneratePageObject +Required to have `envs` path to be specified in `codeception.yml` -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## GenerateFeature -* `codecept g:group Admin` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## CompletionFallback -## Clean +## GenerateSnapshot -Recursively cleans `output` directory and generated code. +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -* `codecept clean` +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` +## ConfigValidate -## Init +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## Run +Load config: -Executes tests. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Usage: +Check overriding config values (like in `run` command) -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateSuite -Override config values: +Create new test suite. Requires suite name and actor name -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 0c2aade575b4d6c5beee3603a42302ac80e5373c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 10:14:55 +0000 Subject: [PATCH 015/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f5575bdc9..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,90 +5,46 @@ title: Commands - Codeception - Documentation # Console Commands -## Run +## GenerateEnvironment -Executes tests. +Generates empty environment configuration file into envs dir: -Usage: + * `codecept g:env firefox` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Required to have `envs` path to be specified in `codeception.yml` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -116,45 +72,27 @@ codecept gherkin:steps acceptance -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## CompletionFallback +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -170,41 +108,54 @@ Generates Cest (scenario-driven object-oriented test) file: -## GenerateHelper +## SelfUpdate -Creates empty Helper class. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `php codecept.phar self-update` +@author Franck Cassedanne -## Console +## GenerateTest -Try to execute test commands in run-time. You may try commands before writing the test. +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GeneratePageObject +## GenerateFeature -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates Feature file (in Gherkin): -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. +## GenerateSnapshot -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` @@ -223,113 +174,162 @@ Usage: -## SelfUpdate +## DryRun -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Shows step by step execution process for scenario driven tests without actually running them. -* `php codecept.phar self-update` +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -@author Franck Cassedanne -## GenerateEnvironment +## GenerateScenarios -Generates empty environment configuration file into envs dir: +Generates user-friendly text scenarios from scenario-driven tests (Cest). - * `codecept g:env firefox` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Required to have `envs` path to be specified in `codeception.yml` +## GeneratePageObject -## Init +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateGroup -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` +## GenerateSuite -## Bootstrap +Create new test suite. Requires suite name and actor name -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## CompletionFallback -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config +## Init -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +## Run -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: -## GenerateSuite +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -Create new test suite. Requires suite name and actor name +Load config: -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run + +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests + +{% endhighlight %} -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 491d38c3240bfce16c24b0343bb68d1aa99efc3a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 11:11:49 +0000 Subject: [PATCH 016/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..f5575bdc9 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,46 +5,90 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} @@ -72,49 +116,36 @@ codecept gherkin:steps acceptance -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne +## CompletionFallback @@ -127,35 +158,53 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## GenerateFeature +## GenerateCest -Generates Feature file (in Gherkin): +Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateSnapshot +## GenerateHelper -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Creates empty Helper class. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateHelper -Creates empty Helper class. +## Console -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -174,162 +223,113 @@ Usage: -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## GeneratePageObject +Required to have `envs` path to be specified in `codeception.yml` -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## GenerateFeature -* `codecept g:group Admin` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## CompletionFallback -## Clean +## GenerateSnapshot -Recursively cleans `output` directory and generated code. +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -* `codecept clean` +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` +## ConfigValidate -## Init +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## Run +Load config: -Executes tests. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Usage: +Check overriding config values (like in `run` command) -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateSuite -Override config values: +Create new test suite. Requires suite name and actor name -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 13aa6965c56c712a2981285e6d75fa9b2f560000 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 12:27:16 +0000 Subject: [PATCH 017/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f5575bdc9..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,90 +5,46 @@ title: Commands - Codeception - Documentation # Console Commands -## Run +## GenerateEnvironment -Executes tests. +Generates empty environment configuration file into envs dir: -Usage: + * `codecept g:env firefox` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Required to have `envs` path to be specified in `codeception.yml` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -116,45 +72,27 @@ codecept gherkin:steps acceptance -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## DryRun - -Shows step by step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## CompletionFallback +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -170,41 +108,54 @@ Generates Cest (scenario-driven object-oriented test) file: -## GenerateHelper +## SelfUpdate -Creates empty Helper class. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `php codecept.phar self-update` +@author Franck Cassedanne -## Console +## GenerateTest -Try to execute test commands in run-time. You may try commands before writing the test. +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GeneratePageObject +## GenerateFeature -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates Feature file (in Gherkin): -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. +## GenerateSnapshot -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` @@ -223,113 +174,162 @@ Usage: -## SelfUpdate +## DryRun -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Shows step by step execution process for scenario driven tests without actually running them. -* `php codecept.phar self-update` +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -@author Franck Cassedanne -## GenerateEnvironment +## GenerateScenarios -Generates empty environment configuration file into envs dir: +Generates user-friendly text scenarios from scenario-driven tests (Cest). - * `codecept g:env firefox` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Required to have `envs` path to be specified in `codeception.yml` +## GeneratePageObject -## Init +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateGroup -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` +## GenerateSuite -## Bootstrap +Create new test suite. Requires suite name and actor name -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## CompletionFallback -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config +## Init -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +## Run -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: -## GenerateSuite +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -Create new test suite. Requires suite name and actor name +Load config: -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run + +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests + +{% endhighlight %} -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir From 2fe8a82691a5cdcf96ae89e0c0ea46e90e9a23c3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 Jan 2025 23:12:49 +0000 Subject: [PATCH 018/156] updated --- changelog.markdown | 23 ++++++ docs/modules/Db.md | 190 ++++++++++++++++++++++----------------------- 2 files changed, 116 insertions(+), 97 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index 6bd71f62c..259697adb 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,29 @@ title: Codeception Changelog +### module-db 3.2.0: 3.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/01/31 22:25:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed +* test: Run test against PHP 8.3 by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/71 +* docs: Use short array syntax for consistency by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/72 +* feat: Configure nullable types explicitly by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/73 +* test: /opt/mssql-tools/bin/sqlcmd tool not found in given path by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/80 +* test: Run test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/77 +* test: Avoid deprecated direct access to driver and dbh property by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/81 +* docs: Fix yaml format in PHPDoc and remove duplication by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-db/pull/78 +* chore: Remove unnecessary files from Composer package by **[s1lver](https://github.com/s1lver)** in https://github.com/Codeception/module-db/pull/83 + +## New Contributors +* **[ThomasLandauer](https://github.com/ThomasLandauer)** made their first contribution in https://github.com/Codeception/module-db/pull/78 +* **[s1lver](https://github.com/s1lver)** made their first contribution in https://github.com/Codeception/module-db/pull/83 + +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.4...3.2.0 + + ### module-laravel 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/01/13 11:42:45 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) diff --git a/docs/modules/Db.md b/docs/modules/Db.md index 9f203be0a..b017c643e 100644 --- a/docs/modules/Db.md +++ b/docs/modules/Db.md @@ -25,7 +25,7 @@ The most important function of this module is to clean a database before each te This module also provides actions to perform checks in a database, e.g. [seeInDatabase()](https://codeception.com/docs/modules/Db#seeInDatabase) In order to have your database populated with data you need a raw SQL dump. -Simply put the dump in the `tests/_data` directory (by default) and specify the path in the config. +Simply put the dump in the `tests/Support/Data` directory (by default) and specify the path in the config. The next time after the database is cleared, all your data will be restored from the dump. Don't forget to include `CREATE TABLE` statements in the dump. @@ -40,85 +40,80 @@ Also available: * MS SQL * Oracle -Connection is done by database Drivers, which are stored in the `Codeception\Lib\Driver` namespace. -[Check out the drivers](https://github.com/Codeception/Codeception/tree/2.4/src/Codeception/Lib/Driver) -if you run into problems loading dumps and cleaning databases. - -### Config - -* dsn *required* - PDO DSN -* user *required* - username to access database -* password *required* - password -* dump - path to database dump -* populate: false - whether the the dump should be loaded before the test suite is started -* cleanup: false - whether the dump should be reloaded before each test -* reconnect: false - whether the module should reconnect to the database before each test -* waitlock: 0 - wait lock (in seconds) that the database session should use for DDL statements -* ssl_key - path to the SSL key (MySQL specific, @see https://php.net/manual/de/ref.pdo-mysql.php#pdo.constants.mysql-attr-key) -* ssl_cert - path to the SSL certificate (MySQL specific, @see https://php.net/manual/de/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-cert) -* ssl_ca - path to the SSL certificate authority (MySQL specific, @see https://php.net/manual/de/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-ca) -* ssl_verify_server_cert - disables certificate CN verification (MySQL specific, @see https://php.net/manual/de/ref.pdo-mysql.php) -* ssl_cipher - list of one or more permissible ciphers to use for SSL encryption (MySQL specific, @see https://php.net/manual/de/ref.pdo-mysql.php#pdo.constants.mysql-attr-cipher) -* databases - include more database configs and switch between them in tests. -* initial_queries - list of queries to be executed right after connection to the database has been initiated, i.e. creating the database if it does not exist or preparing the database collation -* skip_cleanup_if_failed - Do not perform the cleanup if the tests failed. If this is used, manual cleanup might be required when re-running -### Example - - modules: - enabled: - - Db: - dsn: 'mysql:host=localhost;dbname=testdb' - user: 'root' - password: '' - dump: 'tests/_data/dump.sql' - populate: true - cleanup: true - reconnect: true - waitlock: 10 - skip_cleanup_if_failed: true - ssl_key: '/path/to/client-key.pem' - ssl_cert: '/path/to/client-cert.pem' - ssl_ca: '/path/to/ca-cert.pem' - ssl_verify_server_cert: false - ssl_cipher: 'AES256-SHA' - initial_queries: - - 'CREATE DATABASE IF NOT EXISTS temp_db;' - - 'USE temp_db;' - - 'SET NAMES utf8;' +Connection is done by database drivers, which are stored in the `Codeception\Lib\Driver` namespace. +Check out the drivers if you run into problems loading dumps and cleaning databases. + +### Example `Functional.suite.yml` +{% highlight yaml %} + +modules: + enabled: + - Db: + dsn: 'mysql:host=localhost;dbname=testdb' + user: 'root' + password: '' + dump: 'tests/Support/Data/dump.sql' + populate: true # whether the dump should be loaded before the test suite is started + cleanup: true # whether the dump should be reloaded before each test + reconnect: true # whether the module should reconnect to the database before each test + waitlock: 10 # wait lock (in seconds) that the database session should use for DDL statements + databases: # include more database configs and switch between them in tests. + skip_cleanup_if_failed: true # Do not perform the cleanup if the tests failed. If this is used, manual cleanup might be required when re-running + ssl_key: '/path/to/client-key.pem' # path to the SSL key (MySQL specific, see https://php.net/manual/de/ref.pdo-mysql.php#pdo.constants.mysql-attr-key) + ssl_cert: '/path/to/client-cert.pem' # path to the SSL certificate (MySQL specific, see https://php.net/manual/de/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-cert) + ssl_ca: '/path/to/ca-cert.pem' # path to the SSL certificate authority (MySQL specific, see https://php.net/manual/de/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-ca) + ssl_verify_server_cert: false # disables certificate CN verification (MySQL specific, see https://php.net/manual/de/ref.pdo-mysql.php) + ssl_cipher: 'AES256-SHA' # list of one or more permissible ciphers to use for SSL encryption (MySQL specific, see https://php.net/manual/de/ref.pdo-mysql.php#pdo.constants.mysql-attr-cipher) + initial_queries: # list of queries to be executed right after connection to the database has been initiated, i.e. creating the database if it does not exist or preparing the database collation + - 'CREATE DATABASE IF NOT EXISTS temp_db;' + - 'USE temp_db;' + - 'SET NAMES utf8;' + +{% endhighlight %} ### Example with multi-dumps - modules: - enabled: - - Db: - dsn: 'mysql:host=localhost;dbname=testdb' - user: 'root' - password: '' - dump: - - 'tests/_data/dump.sql' - - 'tests/_data/dump-2.sql' +{% highlight yaml %} + +modules: + enabled: + - Db: + dsn: 'mysql:host=localhost;dbname=testdb' + user: 'root' + password: '' + dump: + - 'tests/Support/Data/dump.sql' + - 'tests/Support/Data/dump-2.sql' + +{% endhighlight %} ### Example with multi-databases +{% highlight yaml %} - modules: - enabled: - - Db: - dsn: 'mysql:host=localhost;dbname=testdb' - user: 'root' - password: '' - databases: +modules: + enabled: + - Db: + dsn: 'mysql:host=localhost;dbname=testdb' + user: 'root' + password: '' + databases: db2: - dsn: 'mysql:host=localhost;dbname=testdb2' - user: 'userdb2' - password: '' + dsn: 'mysql:host=localhost;dbname=testdb2' + user: 'userdb2' + password: '' + +{% endhighlight %} -### Example with Sqlite +### Example with SQLite +{% highlight yaml %} + +modules: + enabled: + - Db: + dsn: 'sqlite:relative/path/to/sqlite-database.db' + user: '' + password: '' - modules: - enabled: - - Db: - dsn: 'sqlite:relative/path/to/sqlite-database.db' - user: '' - password: '' +{% endhighlight %} ### SQL data dump @@ -134,31 +129,32 @@ For MySQL: {% highlight yaml %} modules: - enabled: - - Db: - dsn: 'mysql:host=localhost;dbname=testdb' - user: 'root' - password: '' - dump: 'tests/_data/dump.sql' - populate: true # run populator before all tests - cleanup: true # run populator before each test - populator: 'mysql -u $user -h $host $dbname < $dump' + enabled: + - Db: + dsn: 'mysql:host=localhost;dbname=testdb' + user: 'root' + password: '' + dump: 'tests/Support/Data/dump.sql' + populate: true # run populator before all tests + cleanup: true # run populator before each test + populator: 'mysql -u $user -h $host $dbname < $dump' {% endhighlight %} -For PostgreSQL (using pg_restore) +For PostgreSQL (using `pg_restore`) {% highlight yaml %} + modules: - enabled: - - Db: - dsn: 'pgsql:host=localhost;dbname=testdb' - user: 'root' - password: '' - dump: 'tests/_data/db_backup.dump' - populate: true # run populator before all tests - cleanup: true # run populator before each test - populator: 'pg_restore -u $user -h $host -D $dbname < $dump' + enabled: + - Db: + dsn: 'pgsql:host=localhost;dbname=testdb' + user: 'root' + password: '' + dump: 'tests/Support/Data/db_backup.dump' + populate: true # run populator before all tests + cleanup: true # run populator before each test + populator: 'pg_restore -u $user -h $host -D $dbname < $dump' {% endhighlight %} @@ -334,7 +330,7 @@ Provide table name, desired column and criteria. {% highlight php %} grabColumnFromDatabase('users', 'email', array('name' => 'RebOOter')); +$mails = $I->grabColumnFromDatabase('users', 'email', ['name' => 'RebOOter']); {% endhighlight %} @@ -353,7 +349,7 @@ Provide table name and criteria. {% highlight php %} grabEntriesFromDatabase('users', array('name' => 'Davert')); +$mail = $I->grabEntriesFromDatabase('users', ['name' => 'Davert']); {% endhighlight %} Comparison expressions can be used as well: @@ -384,7 +380,7 @@ Provide table name, desired column and criteria. {% highlight php %} grabEntryFromDatabase('users', array('name' => 'Davert')); +$mail = $I->grabEntryFromDatabase('users', ['name' => 'Davert']); {% endhighlight %} Comparison expressions can be used as well: @@ -414,7 +410,7 @@ Provide table name, desired column and criteria. {% highlight php %} grabFromDatabase('users', 'email', array('name' => 'Davert')); +$mail = $I->grabFromDatabase('users', 'email', ['name' => 'Davert']); {% endhighlight %} Comparison expressions can be used as well: @@ -451,7 +447,7 @@ unless you've configured "skip_cleanup_if_failed", and the test fails. {% highlight php %} haveInDatabase('users', array('name' => 'miles', 'email' => 'miles@davis.com')); +$I->haveInDatabase('users', ['name' => 'miles', 'email' => 'miles@davis.com']); {% endhighlight %} @@ -559,7 +555,7 @@ Update an SQL record into a database. {% highlight php %} updateInDatabase('users', array('isAdmin' => true), array('email' => 'miles@davis.com')); +$I->updateInDatabase('users', ['isAdmin' => true], ['email' => 'miles@davis.com']); {% endhighlight %} From dee0fb7e4b5716a5c333b044542d3fa28bf46fe9 Mon Sep 17 00:00:00 2001 From: Ihor Sychevskyi Date: Sun, 2 Feb 2025 10:12:00 +0200 Subject: [PATCH 019/156] fix video url in header menu (#883) --- _layouts/bootstrap.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/bootstrap.html b/_layouts/bootstrap.html index 4b62edd6b..ff47fefa9 100644 --- a/_layouts/bootstrap.html +++ b/_layouts/bootstrap.html @@ -90,7 +90,7 @@
  • Guides

  • {{ guides }} -
  • Video
  • +
  • Videos
  • From b130d2348f44d6c5ef544df1923325b251d6c452 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Feb 2025 20:15:06 +0000 Subject: [PATCH 020/156] updated --- changelog.markdown | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 259697adb..a6caebafb 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,21 @@ title: Codeception Changelog +### module-db 3.2.1: 3.2.1 + +Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/02/06 19:56:35 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed +* fix: allow uppercase table names by quoting the table name when fetching the primary key of a table in PostgreSQL by **[jandrusku](https://github.com/jandrusku)** in https://github.com/Codeception/module-db/pull/82 + +## New Contributors +* **[jandrusku](https://github.com/jandrusku)** made their first contribution in https://github.com/Codeception/module-db/pull/82 + +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.2.0...3.2.1 + + ### module-db 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/01/31 22:25:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) From 08701da4cf0b64c161bb2c9f2a3413cf4362c942 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Feb 2025 20:14:47 +0000 Subject: [PATCH 021/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From a45751189004bd50fcce0466a64b57b3716f542c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Feb 2025 21:13:15 +0000 Subject: [PATCH 022/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,138 +5,94 @@ title: Commands - Codeception - Documentation # Console Commands -## Init +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## CompletionFallback +Required to have `envs` path to be specified in `codeception.yml` -## Run +## ConfigValidate -Executes tests. +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config`: check global config +* `codecept config unit`: check suite config -Verbosity modes: +Load config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Load config: +Check overriding config values (like in `run` command) -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +## GenerateStepObject -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +Generates StepObject class. You will be asked for steps you want to implement. -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## Build -## Clean +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Recursively cleans `output` directory and generated code. +* `codecept build` +* `codecept build path/to/project` -* `codecept clean` +## GherkinSteps -## Console +Prints all steps from all Gherkin contexts for a specific suite -Try to execute test commands in run-time. You may try commands before writing the test. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% endhighlight %} -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## Console -* `codecept g:group Admin` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## Bootstrap -Usage: +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -152,19 +108,22 @@ Generates Cest (scenario-driven object-oriented test) file: -## Bootstrap +## SelfUpdate -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -179,15 +138,6 @@ Generates Feature file (in Gherkin): -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - ## GenerateSnapshot Generates Snapshot. @@ -200,135 +150,185 @@ If suite name is provided, an actor class will be included into placeholder -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs +## GenerateHelper -Check config: +Creates empty Helper class. -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GeneratePageObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateGroup -## DryRun +Creates empty GroupObject - extension which handles all group events. -Shows step by step execution process for scenario driven tests without actually running them. +* `codecept g:group Admin` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateSuite +Create new test suite. Requires suite name and actor name -## GenerateScenarios +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateHelper -Creates empty Helper class. +## Run -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## SelfUpdate +Load config: -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `php codecept.phar self-update` +Override config values: -@author Franck Cassedanne +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} From 105395badc8bc23c4cc7c2ef8b22b3c6d794f52f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 04:16:36 +0000 Subject: [PATCH 023/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From f5adaa97e4b1f865e27b17f1c25bec7cd0826346 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 05:13:56 +0000 Subject: [PATCH 024/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,138 +5,94 @@ title: Commands - Codeception - Documentation # Console Commands -## Init +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## CompletionFallback +Required to have `envs` path to be specified in `codeception.yml` -## Run +## ConfigValidate -Executes tests. +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config`: check global config +* `codecept config unit`: check suite config -Verbosity modes: +Load config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Load config: +Check overriding config values (like in `run` command) -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +## GenerateStepObject -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +Generates StepObject class. You will be asked for steps you want to implement. -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## Build -## Clean +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Recursively cleans `output` directory and generated code. +* `codecept build` +* `codecept build path/to/project` -* `codecept clean` +## GherkinSteps -## Console +Prints all steps from all Gherkin contexts for a specific suite -Try to execute test commands in run-time. You may try commands before writing the test. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% endhighlight %} -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## Console -* `codecept g:group Admin` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## Bootstrap -Usage: +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -152,19 +108,22 @@ Generates Cest (scenario-driven object-oriented test) file: -## Bootstrap +## SelfUpdate -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -179,15 +138,6 @@ Generates Feature file (in Gherkin): -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - ## GenerateSnapshot Generates Snapshot. @@ -200,135 +150,185 @@ If suite name is provided, an actor class will be included into placeholder -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs +## GenerateHelper -Check config: +Creates empty Helper class. -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GeneratePageObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateGroup -## DryRun +Creates empty GroupObject - extension which handles all group events. -Shows step by step execution process for scenario driven tests without actually running them. +* `codecept g:group Admin` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateSuite +Create new test suite. Requires suite name and actor name -## GenerateScenarios +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateHelper -Creates empty Helper class. +## Run -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## SelfUpdate +Load config: -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `php codecept.phar self-update` +Override config values: -@author Franck Cassedanne +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} From d114984475f5d5e359b388cec488dc7863171885 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 12:28:01 +0000 Subject: [PATCH 025/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From 9bcd5ccc8cbc238855e9e9025b9ebb37ca482778 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 13:21:14 +0000 Subject: [PATCH 026/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,138 +5,94 @@ title: Commands - Codeception - Documentation # Console Commands -## Init +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## CompletionFallback +Required to have `envs` path to be specified in `codeception.yml` -## Run +## ConfigValidate -Executes tests. +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config`: check global config +* `codecept config unit`: check suite config -Verbosity modes: +Load config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Load config: +Check overriding config values (like in `run` command) -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +## GenerateStepObject -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +Generates StepObject class. You will be asked for steps you want to implement. -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## Build -## Clean +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Recursively cleans `output` directory and generated code. +* `codecept build` +* `codecept build path/to/project` -* `codecept clean` +## GherkinSteps -## Console +Prints all steps from all Gherkin contexts for a specific suite -Try to execute test commands in run-time. You may try commands before writing the test. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% endhighlight %} -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## Console -* `codecept g:group Admin` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## Bootstrap -Usage: +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -152,19 +108,22 @@ Generates Cest (scenario-driven object-oriented test) file: -## Bootstrap +## SelfUpdate -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -179,15 +138,6 @@ Generates Feature file (in Gherkin): -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - ## GenerateSnapshot Generates Snapshot. @@ -200,135 +150,185 @@ If suite name is provided, an actor class will be included into placeholder -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs +## GenerateHelper -Check config: +Creates empty Helper class. -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GeneratePageObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateGroup -## DryRun +Creates empty GroupObject - extension which handles all group events. -Shows step by step execution process for scenario driven tests without actually running them. +* `codecept g:group Admin` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateSuite +Create new test suite. Requires suite name and actor name -## GenerateScenarios +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateHelper -Creates empty Helper class. +## Run -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## SelfUpdate +Load config: -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `php codecept.phar self-update` +Override config values: -@author Franck Cassedanne +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} From 322dc651117c83c99cdaec7756256f563bdd08b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 17:13:28 +0000 Subject: [PATCH 027/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From d518a1375fcf9861c23812a1dffde4195ac6594a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 18:17:46 +0000 Subject: [PATCH 028/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,138 +5,94 @@ title: Commands - Codeception - Documentation # Console Commands -## Init +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## CompletionFallback +Required to have `envs` path to be specified in `codeception.yml` -## Run +## ConfigValidate -Executes tests. +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config`: check global config +* `codecept config unit`: check suite config -Verbosity modes: +Load config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Load config: +Check overriding config values (like in `run` command) -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +## GenerateStepObject -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +Generates StepObject class. You will be asked for steps you want to implement. -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## Build -## Clean +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Recursively cleans `output` directory and generated code. +* `codecept build` +* `codecept build path/to/project` -* `codecept clean` +## GherkinSteps -## Console +Prints all steps from all Gherkin contexts for a specific suite -Try to execute test commands in run-time. You may try commands before writing the test. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% endhighlight %} -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## Console -* `codecept g:group Admin` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## Bootstrap -Usage: +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -152,19 +108,22 @@ Generates Cest (scenario-driven object-oriented test) file: -## Bootstrap +## SelfUpdate -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -179,15 +138,6 @@ Generates Feature file (in Gherkin): -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - ## GenerateSnapshot Generates Snapshot. @@ -200,135 +150,185 @@ If suite name is provided, an actor class will be included into placeholder -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs +## GenerateHelper -Check config: +Creates empty Helper class. -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GeneratePageObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateGroup -## DryRun +Creates empty GroupObject - extension which handles all group events. -Shows step by step execution process for scenario driven tests without actually running them. +* `codecept g:group Admin` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateSuite +Create new test suite. Requires suite name and actor name -## GenerateScenarios +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateHelper -Creates empty Helper class. +## Run -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## SelfUpdate +Load config: -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `php codecept.phar self-update` +Override config values: -@author Franck Cassedanne +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} From 6cfc149f2ccd07e09909c190afbaad862633e744 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 22:13:27 +0000 Subject: [PATCH 029/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From a7008fa9246151df9f09f5461f376945c9ba62f3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 01:04:37 +0000 Subject: [PATCH 030/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,138 +5,94 @@ title: Commands - Codeception - Documentation # Console Commands -## Init +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## CompletionFallback +Required to have `envs` path to be specified in `codeception.yml` -## Run +## ConfigValidate -Executes tests. +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config`: check global config +* `codecept config unit`: check suite config -Verbosity modes: +Load config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Load config: +Check overriding config values (like in `run` command) -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +## GenerateStepObject -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +Generates StepObject class. You will be asked for steps you want to implement. -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## Build -## Clean +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Recursively cleans `output` directory and generated code. +* `codecept build` +* `codecept build path/to/project` -* `codecept clean` +## GherkinSteps -## Console +Prints all steps from all Gherkin contexts for a specific suite -Try to execute test commands in run-time. You may try commands before writing the test. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% endhighlight %} -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## Console -* `codecept g:group Admin` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## Bootstrap -Usage: +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -152,19 +108,22 @@ Generates Cest (scenario-driven object-oriented test) file: -## Bootstrap +## SelfUpdate -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -179,15 +138,6 @@ Generates Feature file (in Gherkin): -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - ## GenerateSnapshot Generates Snapshot. @@ -200,135 +150,185 @@ If suite name is provided, an actor class will be included into placeholder -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs +## GenerateHelper -Check config: +Creates empty Helper class. -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GeneratePageObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateGroup -## DryRun +Creates empty GroupObject - extension which handles all group events. -Shows step by step execution process for scenario driven tests without actually running them. +* `codecept g:group Admin` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateSuite +Create new test suite. Requires suite name and actor name -## GenerateScenarios +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateHelper -Creates empty Helper class. +## Run -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## SelfUpdate +Load config: -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `php codecept.phar self-update` +Override config values: -@author Franck Cassedanne +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} From f8b3066ecc7aa07a92346ee5d4150b585108f242 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 03:17:36 +0000 Subject: [PATCH 031/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From f7df89109060f43fffb5bf51b9421cfdf4dcf07f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 04:16:56 +0000 Subject: [PATCH 032/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,138 +5,94 @@ title: Commands - Codeception - Documentation # Console Commands -## Init +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## CompletionFallback +Required to have `envs` path to be specified in `codeception.yml` -## Run +## ConfigValidate -Executes tests. +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config`: check global config +* `codecept config unit`: check suite config -Verbosity modes: +Load config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Load config: +Check overriding config values (like in `run` command) -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +## GenerateStepObject -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +Generates StepObject class. You will be asked for steps you want to implement. -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## Build -## Clean +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Recursively cleans `output` directory and generated code. +* `codecept build` +* `codecept build path/to/project` -* `codecept clean` +## GherkinSteps -## Console +Prints all steps from all Gherkin contexts for a specific suite -Try to execute test commands in run-time. You may try commands before writing the test. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% endhighlight %} -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## Console -* `codecept g:group Admin` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## Bootstrap -Usage: +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -152,19 +108,22 @@ Generates Cest (scenario-driven object-oriented test) file: -## Bootstrap +## SelfUpdate -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -179,15 +138,6 @@ Generates Feature file (in Gherkin): -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - ## GenerateSnapshot Generates Snapshot. @@ -200,135 +150,185 @@ If suite name is provided, an actor class will be included into placeholder -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs +## GenerateHelper -Check config: +Creates empty Helper class. -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GeneratePageObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateGroup -## DryRun +Creates empty GroupObject - extension which handles all group events. -Shows step by step execution process for scenario driven tests without actually running them. +* `codecept g:group Admin` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateSuite +Create new test suite. Requires suite name and actor name -## GenerateScenarios +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateHelper -Creates empty Helper class. +## Run -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## SelfUpdate +Load config: -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `php codecept.phar self-update` +Override config values: -@author Franck Cassedanne +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} From dc1c3fc231c558b40807ad561779eede5f6e8319 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 05:14:19 +0000 Subject: [PATCH 033/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From 1a1ba2f67259ec6a2deede85a24397814b22b17c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 06:19:47 +0000 Subject: [PATCH 034/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,138 +5,94 @@ title: Commands - Codeception - Documentation # Console Commands -## Init +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## CompletionFallback +Required to have `envs` path to be specified in `codeception.yml` -## Run +## ConfigValidate -Executes tests. +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config`: check global config +* `codecept config unit`: check suite config -Verbosity modes: +Load config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Load config: +Check overriding config values (like in `run` command) -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +## GenerateStepObject -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +Generates StepObject class. You will be asked for steps you want to implement. -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## Build -## Clean +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Recursively cleans `output` directory and generated code. +* `codecept build` +* `codecept build path/to/project` -* `codecept clean` +## GherkinSteps -## Console +Prints all steps from all Gherkin contexts for a specific suite -Try to execute test commands in run-time. You may try commands before writing the test. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% endhighlight %} -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## Console -* `codecept g:group Admin` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## Bootstrap -Usage: +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -152,19 +108,22 @@ Generates Cest (scenario-driven object-oriented test) file: -## Bootstrap +## SelfUpdate -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -179,15 +138,6 @@ Generates Feature file (in Gherkin): -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - ## GenerateSnapshot Generates Snapshot. @@ -200,135 +150,185 @@ If suite name is provided, an actor class will be included into placeholder -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs +## GenerateHelper -Check config: +Creates empty Helper class. -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GeneratePageObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateGroup -## DryRun +Creates empty GroupObject - extension which handles all group events. -Shows step by step execution process for scenario driven tests without actually running them. +* `codecept g:group Admin` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateSuite +Create new test suite. Requires suite name and actor name -## GenerateScenarios +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateHelper -Creates empty Helper class. +## Run -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## SelfUpdate +Load config: -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `php codecept.phar self-update` +Override config values: -@author Franck Cassedanne +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} From b3a4c029997febba46147182fe5f7c1f48647e2f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 07:13:27 +0000 Subject: [PATCH 035/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From 201c0e57b1990b126d11b689668d88bd926d1fe0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 08:18:36 +0000 Subject: [PATCH 036/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..807851d0a 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,138 +5,94 @@ title: Commands - Codeception - Documentation # Console Commands -## Init +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## CompletionFallback +Required to have `envs` path to be specified in `codeception.yml` -## Run +## ConfigValidate -Executes tests. +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept config`: check global config +* `codecept config unit`: check suite config -Verbosity modes: +Load config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Load config: +Check overriding config values (like in `run` command) -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +## GenerateStepObject -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +Generates StepObject class. You will be asked for steps you want to implement. -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## Build -## Clean +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Recursively cleans `output` directory and generated code. +* `codecept build` +* `codecept build path/to/project` -* `codecept clean` +## GherkinSteps -## Console +Prints all steps from all Gherkin contexts for a specific suite -Try to execute test commands in run-time. You may try commands before writing the test. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% endhighlight %} -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. +## Console -* `codecept g:group Admin` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## Bootstrap -Usage: +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -152,19 +108,22 @@ Generates Cest (scenario-driven object-oriented test) file: -## Bootstrap +## SelfUpdate -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -179,15 +138,6 @@ Generates Feature file (in Gherkin): -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - ## GenerateSnapshot Generates Snapshot. @@ -200,135 +150,185 @@ If suite name is provided, an actor class will be included into placeholder -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs +## GenerateHelper -Check config: +Creates empty Helper class. -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateScenarios -{% endhighlight %} +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GeneratePageObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateGroup -## DryRun +Creates empty GroupObject - extension which handles all group events. -Shows step by step execution process for scenario driven tests without actually running them. +* `codecept g:group Admin` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateSuite +Create new test suite. Requires suite name and actor name -## GenerateScenarios +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Init -## GenerateHelper -Creates empty Helper class. +## Run -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Executes tests. +Usage: +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## SelfUpdate +Load config: -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `php codecept.phar self-update` +Override config values: -@author Franck Cassedanne +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -## GenerateStepObject +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -Generates StepObject class. You will be asked for steps you want to implement. +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +{% endhighlight %} From e1c243e8a68e49ac35a9c9ef7bfb71c4513a19b2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 09:15:07 +0000 Subject: [PATCH 037/156] updated --- docs/reference/Commands.md | 340 ++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 807851d0a..cf016d09f 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,94 +5,138 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: +## Init - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +## CompletionFallback -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. -Load config: +Usage: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check overriding config values (like in `run` command) +Verbosity modes: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateStepObject +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates StepObject class. You will be asked for steps you want to implement. +Run with specific extension -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## GenerateGroup -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GherkinSnippets -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir @@ -108,22 +152,19 @@ Generates Cest (scenario-driven object-oriented test) file: -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## GenerateTest +By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -138,6 +179,15 @@ Generates Feature file (in Gherkin): +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + ## GenerateSnapshot Generates Snapshot. @@ -150,185 +200,135 @@ If suite name is provided, an actor class will be included into placeholder -## GenerateHelper +## ConfigValidate -Creates empty Helper class. +Validates and prints Codeception config. +Use it do debug Yaml configs -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GherkinSnippets +Check overriding config values (like in `run` command) -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## GenerateSuite -## DryRun +Create new test suite. Requires suite name and actor name -Shows step by step execution process for scenario driven tests without actually running them. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## Build -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## DryRun +Shows step by step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## CompletionFallback +## GenerateEnvironment +Generates empty environment configuration file into envs dir: -## Clean + * `codecept g:env firefox` -Recursively cleans `output` directory and generated code. +Required to have `envs` path to be specified in `codeception.yml` -* `codecept clean` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## Init +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Run +## GenerateHelper -Executes tests. +Creates empty Helper class. -Usage: +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## SelfUpdate -Override config values: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `php codecept.phar self-update` -Run with specific extension +@author Franck Cassedanne -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## GenerateStepObject -{% endhighlight %} +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From 7df6302b28ef39ae34dc335e1962ccef147ea69b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Feb 2025 07:13:14 +0000 Subject: [PATCH 038/156] updated --- changelog.markdown | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index a6caebafb..c26cd7701 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,20 @@ title: Codeception Changelog +### lib-innerbrowser 4.0.6: 4.0.6 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/14 07:04:31 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +## What's Changed +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-innerbrowser/pull/77 +* PHP 8.4: Fix E_STRICT deprecation by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-innerbrowser/pull/74 + + +**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/4.0.5...4.0.6 + + ### module-db 3.2.1: 3.2.1 Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/02/06 19:56:35 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -3988,15 +4002,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### lib-innerbrowser 1.2.1: Fixed _failed handling with Symfony 5 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/24 16:32:46 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - - - - ### lib-asserts 1.10.1: rerelease Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/23 21:14:50 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) From 3cec80972723707b492d6182f21ac2c653b77fc6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Feb 2025 08:18:11 +0000 Subject: [PATCH 039/156] updated --- changelog.markdown | 30 +++++++++++++++++++++--------- docs/modules/WebDriver.md | 20 ++++++++++---------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index c26cd7701..ad5acc4e2 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,27 @@ title: Codeception Changelog +### module-webdriver 4.0.3: 4.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/14 07:14:37 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) + + + +## What's Changed +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-webdriver/pull/140 +* Fix incorrect documentation of log_js_error by **[SOHELAHMED7](https://github.com/SOHELAHMED7)** in https://github.com/Codeception/module-webdriver/pull/129 +* Fix ChromeDriver links by **[blankse](https://github.com/blankse)** in https://github.com/Codeception/module-webdriver/pull/137 +* `pressKey`: Fixing `@param string|array $chars` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-webdriver/pull/138 +* Fix PHP 8.4 deprecation for E_STRICT constant by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-webdriver/pull/139 +* Update WebDriver.php: reloadPage by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-webdriver/pull/125 + +## New Contributors +* **[SOHELAHMED7](https://github.com/SOHELAHMED7)** made their first contribution in https://github.com/Codeception/module-webdriver/pull/129 +* **[blankse](https://github.com/blankse)** made their first contribution in https://github.com/Codeception/module-webdriver/pull/137 + +**Full Changelog**: https://github.com/Codeception/module-webdriver/compare/4.0.2...4.0.3 + + ### lib-innerbrowser 4.0.6: 4.0.6 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/14 07:04:31 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -3749,15 +3770,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * haveMultiple doesn't pass $name argument to factory(), because Laravel 7 does not support it anymore. -### module-webdriver 1.0.6: Fixed setCookie in w3c mode - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/03/23 17:15:52 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) - - - -Modern browsers reject cookies with singlepart domain names, the best option is not to set domain property unless explicitly specified. - - ### module-mezzio 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/152236?v=4&s=16) Slamdunk](https://github.com/Slamdunk) on 2020/03/17 11:14:58 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) diff --git a/docs/modules/WebDriver.md b/docs/modules/WebDriver.md index 6c227098a..6205d48d9 100644 --- a/docs/modules/WebDriver.md +++ b/docs/modules/WebDriver.md @@ -83,7 +83,7 @@ Tests can be executed directly through ChromeDriver or GeckoDriver (for Firefox) #### ChromeDriver -* Download and install [ChromeDriver](https://sites.google.com/chromium.org/driver/downloads?authuser=0) +* Download and install [ChromeDriver](https://sites.google.com/chromium.org/driver/downloads) * Launch ChromeDriver in a separate console window: `chromedriver --url-base=/wd/hub`. Configuration in `Acceptance.suite.yml`: @@ -104,7 +104,7 @@ modules: download.default_directory: "..." {% endhighlight %} -See here for additional [Chrome options](https://sites.google.com/a/chromium.org/chromedriver/capabilities) +See here for additional [Chrome options](https://sites.google.com/chromium.org/driver/capabilities) #### GeckoDriver @@ -250,7 +250,7 @@ modules: * `ssl_proxy` - sets ssl(https) proxy server url for testing a remote server. * `ssl_proxy_port` - sets ssl(https) proxy server port * `debug_log_entries` - how many selenium entries to print with `debugWebDriverLogs` or on fail (0 by default). -* `log_js_errors` - Set to true to include possible JavaScript to HTML report, or set to false (default) to deactivate. +* `log_js_errors` - Set to true to include possible JavaScript to HTML report, or set to false (default) to deactivate. This will only work if `debug_log_entries` is set and its value is > 0. Also this will display JS errors as comments only if test fails. * `webdriver_proxy` - sets http proxy to tunnel requests to the remote Selenium WebDriver through * `webdriver_proxy_port` - sets http proxy server port to tunnel requests to the remote Selenium WebDriver through @@ -1590,19 +1590,19 @@ In 3rd argument you can set number a seconds to wait for element to appear Presses the given key on the given element. -To specify a character and modifier (e.g. Ctrl, Alt, Shift, Meta), pass an array for `$char` with +To specify a character and modifier (e.g. Ctrl, Alt, Shift, Meta), pass an array for `$char` with the modifier as the first element and the character as the second. -For special keys, use the constants from [`Facebook\WebDriver\WebDriverKeys`](https://github.com/php-webdriver/php-webdriver/blob/main/lib/WebDriverKeys.php). +For special keys, use the constants from [Facebook\WebDriver\WebDriverKeys](https://github.com/php-webdriver/php-webdriver/blob/main/lib/WebDriverKeys.php). {% highlight php %} $I->pressKey('#page', 'a'); // => olda -$I->pressKey('#page', ['ctrl', 'a'],'new'); //=> new -$I->pressKey('#page', ['shift', '111'],'1','x'); //=> old!!!1x -$I->pressKey('descendant-or-self::*[@id='page']','u'); //=> oldu -$I->pressKey('#name', ['ctrl', 'a'], \Facebook\WebDriver\WebDriverKeys::DELETE); //=>'' +$I->pressKey('#page', ['ctrl', 'a'],'new'); // => new +$I->pressKey('#page', ['shift', '111'], '1', 'x'); // => old!!!1x +$I->pressKey('descendant-or-self::*[@id='page']', 'u'); // => oldu +$I->pressKey('#name', ['ctrl', 'a'], \Facebook\WebDriver\WebDriverKeys::DELETE); // =>'' {% endhighlight %} @@ -1611,7 +1611,7 @@ $I->pressKey('#name', ['ctrl', 'a'], \Facebook\WebDriver\WebDriverKeys::DELETE); * `return void` -Reloads the current page. +Reloads the current page. All forms will be reset, so the outcome is as if the user would press Ctrl+F5. #### resetCookie From 0b02292bb74bebe86ef7c0981df862d08c5ff221 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Feb 2025 21:12:48 +0000 Subject: [PATCH 040/156] updated --- _includes/extensions.md | 32 ++++++++--------- changelog.markdown | 42 +++++++++++++++------- docs/reference/Commands.md | 71 +++++++++++++++++++------------------- docs/reference/Module.md | 2 +- 4 files changed, 81 insertions(+), 66 deletions(-) diff --git a/_includes/extensions.md b/_includes/extensions.md index eb280dea2..9d9df2b06 100644 --- a/_includes/extensions.md +++ b/_includes/extensions.md @@ -5,7 +5,7 @@ [See Source](https://github.com/Codeception/Codeception/blob/main/ext/DotReporter.php) DotReporter provides less verbose output for test execution. -Like PHPUnit printer it prints dots "." for successful testes and "F" for failures. +Like PHPUnit printer it prints dots "." for successful tests and "F" for failures. ![](https://cloud.githubusercontent.com/assets/220264/26132800/4d23f336-3aab-11e7-81ba-2896a4c623d2.png) @@ -68,14 +68,14 @@ extensions: [See Source](https://github.com/Codeception/Codeception/blob/main/ext/Recorder.php) -Saves a screenshot of each step in acceptance tests and shows them as a slideshow on one HTML page (here's an [example](https://codeception.com/images/recorder.gif)) -Activated only for suites with WebDriver module enabled. +Saves a screenshot of each step in acceptance tests and shows them as a slideshow on one HTML page (here's an [example](https://codeception.com/images/recorder.gif)). +Works only for suites with WebDriver module enabled. The screenshots are saved to `tests/_output/record_*` directories, open `index.html` to see them as a slideshow. #### Installation -Add this to the list of enabled extensions in `codeception.yml` or `acceptance.suite.yml`: +Add this to the list of enabled extensions in `codeception.yml` or `Acceptance.suite.yml`: ``` yaml extensions: @@ -106,7 +106,7 @@ extensions: ``` #### Skipping recording of steps with annotations -It is also possible to skip recording of steps for specified tests by using the @skipRecording annotation. +It is also possible to skip recording of steps for specified tests by using the `@skipRecording` annotation. ```php /** @@ -122,7 +122,6 @@ public function testLogin(AcceptanceTester $I) - ## RunBefore [See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunBefore.php) @@ -158,7 +157,7 @@ HINT: you can use different configurations per environment. [See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunFailed.php) -Saves failed tests into tests/_output/failed in order to rerun failed tests. +Saves failed tests into `tests/_output/failed` in order to rerun failed tests. To rerun failed tests just run the `failed` group: @@ -170,9 +169,9 @@ To change failed group name add: ``` --override "extensions: config: Codeception\Extension\RunFailed: fail-group: another_group1" ``` -Remember: if you run tests and they generated custom-named fail group, to run this group, you should add override too +Remember: If you run tests and they generated custom-named fail group, to run this group, you should add override too -Starting from Codeception 2.1 **this extension is enabled by default**. +**This extension is enabled by default.** ``` yaml extensions: @@ -188,12 +187,13 @@ On each execution failed tests are logged and saved into `tests/_output/failed` [See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunProcess.php) Extension to start and stop processes per suite. -Can be used to start/stop selenium server, chromedriver, mailcatcher, etc. +Can be used to start/stop selenium server, chromedriver, [MailCatcher](https://mailcatcher.me/), etc. +Each command is executed only once, at the beginning of the test suite. To execute a command before each test, see [Before/After Attributes](https://codeception.com/docs/AdvancedUsage#BeforeAfter-Attributes). -Can be configured in suite config: +Can be enabled in suite config: ```yaml -# acceptance.suite.yml +# Acceptance.suite.yml extensions: enabled: - Codeception\Extension\RunProcess: @@ -203,8 +203,7 @@ extensions: Multiple parameters can be passed as array: ```yaml -# acceptance.suite.yml - +# Acceptance.suite.yml extensions: enabled: - Codeception\Extension\RunProcess: @@ -214,8 +213,7 @@ extensions: In the end of a suite all launched processes will be stopped. -To wait for the process to be launched use `sleep` option. -In this case you need configuration to be specified as object: +To wait for the process to be launched use `sleep` option. In this case you need configuration to be specified as object: ```yaml extensions: @@ -226,7 +224,7 @@ extensions: sleep: 5 # wait 5 seconds for processes to boot ``` -HINT: you can use different configurations per environment. +HINT: You can use different configurations per environment. diff --git a/changelog.markdown b/changelog.markdown index ad5acc4e2..5a6249c7b 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,35 @@ title: Codeception Changelog +### Codeception 5.2.0: 5.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/16 20:31:08 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* Fix FAIL message color highlighting by **[antonvolokha](https://github.com/antonvolokha)** in [#6754](https://github.com/Codeception/Codeception/issues/6754) +* Update the codebase to PHP 8.1 by **[TavoNiievez](https://github.com/TavoNiievez)** in [#6747](https://github.com/Codeception/Codeception/issues/6747) +* generate:cest: Adding `declare(strict_types=1);` and return type `void` to generated files by **[ThomasLandauer](https://github.com/ThomasLandauer)** in [#6736](https://github.com/Codeception/Codeception/issues/6736) +* Declare nullable parameter types explicitly by **[W0rma](https://github.com/W0rma)** in [#6774](https://github.com/Codeception/Codeception/issues/6774) , [#6775](https://github.com/Codeception/Codeception/issues/6775) +* chore: Included githubactions in the dependabot config ([#6471](https://github.com/Codeception/Codeception/issues/6471)) by **[SamMousa](https://github.com/SamMousa)** in [#6783](https://github.com/Codeception/Codeception/issues/6783) +* Added new option --disable-coverage-php to skip coverage.serialized report by **[adrenalinkin](https://github.com/adrenalinkin)** in [#6761](https://github.com/Codeception/Codeception/issues/6761) +* chore: add branch alias for main to fix composer install with dev deps by **[SamMousa](https://github.com/SamMousa)** in [#6787](https://github.com/Codeception/Codeception/issues/6787) +* chore(ci): prevent test CI running twice on PR branches by **[SamMousa](https://github.com/SamMousa)** in [#6788](https://github.com/Codeception/Codeception/issues/6788) +* Simplify classes by **[TavoNiievez](https://github.com/TavoNiievez)** in [#6767](https://github.com/Codeception/Codeception/issues/6767) , [#6750](https://github.com/Codeception/Codeception/issues/6750) , [#6764](https://github.com/Codeception/Codeception/issues/6764) +* PHP 8.4: `E_STRICT` deprecation by **[W0rma](https://github.com/W0rma)** in [#6802](https://github.com/Codeception/Codeception/issues/6802) +* Fix PHP 8.4 deprecation. by **[kagg-design](https://github.com/kagg-design)** in [#6811](https://github.com/Codeception/Codeception/issues/6811) +* Fix test suite names in bootstrap command by **[W0rma](https://github.com/W0rma)** in [#6813](https://github.com/Codeception/Codeception/issues/6813) +* Docs (minor) by **[ThomasLandauer](https://github.com/ThomasLandauer)** in [#6804](https://github.com/Codeception/Codeception/issues/6804) , [#6805](https://github.com/Codeception/Codeception/issues/6805) , [#6806](https://github.com/Codeception/Codeception/issues/6806) , 6807 , [#6792](https://github.com/Codeception/Codeception/issues/6792) , [#6810](https://github.com/Codeception/Codeception/issues/6810) , [#6751](https://github.com/Codeception/Codeception/issues/6751) , [#6744](https://github.com/Codeception/Codeception/issues/6744) + +## New Contributors +* **[antonvolokha](https://github.com/antonvolokha)** made their first contribution in https://github.com/Codeception/Codeception/pull/6754 +* **[adrenalinkin](https://github.com/adrenalinkin)** made their first contribution in https://github.com/Codeception/Codeception/pull/6761 +* **[kagg-design](https://github.com/kagg-design)** made their first contribution in https://github.com/Codeception/Codeception/pull/6811 + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.1.2...5.2.0 + + ### module-webdriver 4.0.3: 4.0.3 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/14 07:14:37 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1693,19 +1722,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Uses lib-xml -### Codeception 5.0.0-alpha3: 5.0.0-alpha3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 11:02:50 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Support intersection types in actions -* Introduced PSR-12 code style -* Extracted some code to modules and shared libs -* Fixed new incompatibilities with PHPUnit 10 - - - ### module-rest 3.1.0: 3.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 11:00:56 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index cf016d09f..7eab05f30 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -62,39 +62,40 @@ Arguments: Options: -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests {% endhighlight %} @@ -157,7 +158,7 @@ Generates Cest (scenario-driven object-oriented test) file: Creates default config, tests directory and sample suites for current project. Use this command to start building a test suite. -By default it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. * `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. * `codecept bootstrap --empty` - creates `tests` dir without suites @@ -261,7 +262,7 @@ Starting from Codeception 2.0 actor classes are auto-generated. Use this command ## DryRun -Shows step by step execution process for scenario driven tests without actually running them. +Shows step-by-step execution process for scenario driven tests without actually running them. * `codecept dry-run acceptance` * `codecept dry-run acceptance MyCest` diff --git a/docs/reference/Module.md b/docs/reference/Module.md index 0def25231..c3c972f37 100644 --- a/docs/reference/Module.md +++ b/docs/reference/Module.md @@ -2043,7 +2043,7 @@ HOOK to be executed when config changes with `_reconfigure`. * `param array` $array * `return array` -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L312) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L309) #### shortenMessage() From 1fb19723d6a068d21380b08ab10e94dd9b26e40e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Feb 2025 15:15:45 +0000 Subject: [PATCH 041/156] updated --- changelog.markdown | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index 5a6249c7b..b040d13b2 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,19 @@ title: Codeception Changelog +### Codeception 5.2.1: 5.2.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/20 15:01:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/Codeception/pull/6826 +* Fix missing absolute path resolving in ParamsLoader by **[garvinhicking](https://github.com/garvinhicking)** in https://github.com/Codeception/Codeception/pull/6828 + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.2.0...5.2.1 + + ### Codeception 5.2.0: 5.2.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/16 20:31:08 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -1690,17 +1703,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Read about earlier change in [CHANGELOG](https://github.com/Codeception/Codeception/blob/5.0/CHANGELOG-5.x.md). -### Codeception 4.1.31: 4.1.31 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/13 17:17:13 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* RunBefore extension prints error output and stops execution if command failed -* Action file generator: Fixed handling of intersection types -* Action file generator: Fixed handling of self and parent types - - ### module-webdriver 3.1.0: 3.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 17:08:21 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) From 5d2aa497b45f2004941329402a28060aa6022271 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 23 Feb 2025 14:13:28 +0000 Subject: [PATCH 042/156] updated --- changelog.markdown | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index b040d13b2..b3448f1a4 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,18 @@ title: Codeception Changelog +### lib-web 1.0.7: 1.0.7 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/23 14:06:56 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Declare nullable parameter types explicitly for PHP 8.4 compatibility by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/12 +* Test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/13 +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/14 + + + ### Codeception 5.2.1: 5.2.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/20 15:01:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) From 2e205dd34783bc4e7ac0172832952d0b421af853 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Feb 2025 07:14:43 +0000 Subject: [PATCH 043/156] updated --- changelog.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index b3448f1a4..50da24879 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,16 @@ title: Codeception Changelog +### module-redis 3.2.1: 3.2.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/24 06:24:43 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) + + + +* Test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-redis/pull/20 +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-redis/pull/21 + + ### lib-web 1.0.7: 1.0.7 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/23 14:06:56 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) From 62d5c3a6389d5d5f32cac0c07760ab976608cd81 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Mon, 24 Feb 2025 17:01:12 +0100 Subject: [PATCH 044/156] Update modules.yml: Fixing Mailpit logo --- _data/modules.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_data/modules.yml b/_data/modules.yml index 71f0a80d6..999b6a164 100644 --- a/_data/modules.yml +++ b/_data/modules.yml @@ -88,10 +88,9 @@ color: "#e65722" - name: Mailpit - image: https://mailpit.axllent.org/images/mailpit.svg + image: ../images/mailpit.svg link: https://github.com/koehnlein/codeception-email-mailpit description: Mailpit is a standalone local SMTP server to test email deliveries. The Codeception module provides assertions such as `$I->haveUnreadEmails();` or `$I->seeInOpenedEmailHtmlBody()`. - color: "#2C3E50" - name: MailCatcher link: https://github.com/captbaritone/codeception-mailcatcher-module From 25af270ced777f3b8642918e630e3d580c8d7e64 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Mon, 24 Feb 2025 17:02:48 +0100 Subject: [PATCH 045/156] Add files via upload --- images/mailpit.svg | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 images/mailpit.svg diff --git a/images/mailpit.svg b/images/mailpit.svg new file mode 100644 index 000000000..41fd0b1a7 --- /dev/null +++ b/images/mailpit.svg @@ -0,0 +1,9 @@ + + + + + + + + + From a09952bdcba43318a2a0ebedf0e4539dd24ae96c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Feb 2025 16:18:39 +0000 Subject: [PATCH 046/156] updated --- docs/reference/Commands.md | 260 ++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 7eab05f30..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,11 +5,70 @@ title: Commands - Codeception - Documentation # Console Commands +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + ## Init -## CompletionFallback +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## SelfUpdate + +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` @@ -102,102 +161,50 @@ Options: -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - +## CompletionFallback -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateStepObject -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateSnapshot -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest +## GenerateScenarios -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateSnapshot +## GeneratePageObject -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` @@ -225,111 +232,104 @@ Check overriding config values (like in `run` command) -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - +## GenerateHelper -## GherkinSteps +Creates empty Helper class. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## Build +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept build` -* `codecept build path/to/project` +## GenerateEnvironment -## DryRun +Generates empty environment configuration file into envs dir: -Shows step-by-step execution process for scenario driven tests without actually running them. + * `codecept g:env firefox` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Required to have `envs` path to be specified in `codeception.yml` +## Console -## GenerateScenarios +Try to execute test commands in run-time. You may try commands before writing the test. -Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateSuite -## GenerateEnvironment +Create new test suite. Requires suite name and actor name -Generates empty environment configuration file into envs dir: +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Build -## GeneratePageObject +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept build` +* `codecept build path/to/project` -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` -## GenerateHelper +## Clean -Creates empty Helper class. +Recursively cleans `output` directory and generated code. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept clean` -## SelfUpdate +## GherkinSnippets -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `php codecept.phar self-update` +Usage: -@author Franck Cassedanne +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateStepObject +## GenerateFeature -Generates StepObject class. You will be asked for steps you want to implement. +Generates Feature file (in Gherkin): -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From 6543d9439ab2b1729054ef5fc75ecd0133f4a1a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Feb 2025 17:15:58 +0000 Subject: [PATCH 047/156] updated --- docs/reference/Commands.md | 260 ++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..7eab05f30 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,70 +5,11 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - ## Init -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - - -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` +## CompletionFallback @@ -161,50 +102,102 @@ Options: -## CompletionFallback +## Clean + +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +## GenerateGroup -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSnippets -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` @@ -232,104 +225,111 @@ Check overriding config values (like in `run` command) -## GenerateHelper +## GenerateSuite -Creates empty Helper class. +Create new test suite. Requires suite name and actor name -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## Bootstrap +## GherkinSteps -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Prints all steps from all Gherkin contexts for a specific suite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +{% endhighlight %} -## GenerateEnvironment +## Build -Generates empty environment configuration file into envs dir: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - * `codecept g:env firefox` +* `codecept build` +* `codecept build path/to/project` -Required to have `envs` path to be specified in `codeception.yml` -## Console +## DryRun -Try to execute test commands in run-time. You may try commands before writing the test. +Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name +## GenerateScenarios -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GenerateEnvironment -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates empty environment configuration file into envs dir: -* `codecept build` -* `codecept build path/to/project` + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Clean +## GeneratePageObject -Recursively cleans `output` directory and generated code. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept clean` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateHelper +Creates empty Helper class. -## GherkinSnippets +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## SelfUpdate -## GenerateFeature +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Generates Feature file (in Gherkin): +* `php codecept.phar self-update` -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +@author Franck Cassedanne + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From d6f40a502cb5bcbbbce459ccd8f5d47397471af0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Feb 2025 20:16:01 +0000 Subject: [PATCH 048/156] updated --- docs/reference/Commands.md | 260 ++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 7eab05f30..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,11 +5,70 @@ title: Commands - Codeception - Documentation # Console Commands +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + ## Init -## CompletionFallback +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## SelfUpdate + +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` @@ -102,102 +161,50 @@ Options: -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - +## CompletionFallback -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateStepObject -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateSnapshot -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest +## GenerateScenarios -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateSnapshot +## GeneratePageObject -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` @@ -225,111 +232,104 @@ Check overriding config values (like in `run` command) -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - +## GenerateHelper -## GherkinSteps +Creates empty Helper class. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## Build +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept build` -* `codecept build path/to/project` +## GenerateEnvironment -## DryRun +Generates empty environment configuration file into envs dir: -Shows step-by-step execution process for scenario driven tests without actually running them. + * `codecept g:env firefox` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Required to have `envs` path to be specified in `codeception.yml` +## Console -## GenerateScenarios +Try to execute test commands in run-time. You may try commands before writing the test. -Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateSuite -## GenerateEnvironment +Create new test suite. Requires suite name and actor name -Generates empty environment configuration file into envs dir: +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Build -## GeneratePageObject +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept build` +* `codecept build path/to/project` -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` -## GenerateHelper +## Clean -Creates empty Helper class. +Recursively cleans `output` directory and generated code. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept clean` -## SelfUpdate +## GherkinSnippets -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `php codecept.phar self-update` +Usage: -@author Franck Cassedanne +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateStepObject +## GenerateFeature -Generates StepObject class. You will be asked for steps you want to implement. +Generates Feature file (in Gherkin): -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From 5fc4df9710195d698a992d943305ad91442071d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Feb 2025 21:13:39 +0000 Subject: [PATCH 049/156] updated --- docs/reference/Commands.md | 260 ++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..7eab05f30 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,70 +5,11 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - ## Init -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - - -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` +## CompletionFallback @@ -161,50 +102,102 @@ Options: -## CompletionFallback +## Clean + +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +## GenerateGroup -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSnippets -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` @@ -232,104 +225,111 @@ Check overriding config values (like in `run` command) -## GenerateHelper +## GenerateSuite -Creates empty Helper class. +Create new test suite. Requires suite name and actor name -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## Bootstrap +## GherkinSteps -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Prints all steps from all Gherkin contexts for a specific suite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +{% endhighlight %} -## GenerateEnvironment +## Build -Generates empty environment configuration file into envs dir: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - * `codecept g:env firefox` +* `codecept build` +* `codecept build path/to/project` -Required to have `envs` path to be specified in `codeception.yml` -## Console +## DryRun -Try to execute test commands in run-time. You may try commands before writing the test. +Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name +## GenerateScenarios -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GenerateEnvironment -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates empty environment configuration file into envs dir: -* `codecept build` -* `codecept build path/to/project` + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Clean +## GeneratePageObject -Recursively cleans `output` directory and generated code. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept clean` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateHelper +Creates empty Helper class. -## GherkinSnippets +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## SelfUpdate -## GenerateFeature +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Generates Feature file (in Gherkin): +* `php codecept.phar self-update` -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +@author Franck Cassedanne + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From ef90da0cd6bc812c636cc03fe84c969335caf811 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Feb 2025 01:06:48 +0000 Subject: [PATCH 050/156] updated --- docs/reference/Commands.md | 260 ++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 7eab05f30..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,11 +5,70 @@ title: Commands - Codeception - Documentation # Console Commands +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + ## Init -## CompletionFallback +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## SelfUpdate + +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` @@ -102,102 +161,50 @@ Options: -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - +## CompletionFallback -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateStepObject -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateSnapshot -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest +## GenerateScenarios -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateSnapshot +## GeneratePageObject -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` @@ -225,111 +232,104 @@ Check overriding config values (like in `run` command) -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - +## GenerateHelper -## GherkinSteps +Creates empty Helper class. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## Build +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept build` -* `codecept build path/to/project` +## GenerateEnvironment -## DryRun +Generates empty environment configuration file into envs dir: -Shows step-by-step execution process for scenario driven tests without actually running them. + * `codecept g:env firefox` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Required to have `envs` path to be specified in `codeception.yml` +## Console -## GenerateScenarios +Try to execute test commands in run-time. You may try commands before writing the test. -Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateSuite -## GenerateEnvironment +Create new test suite. Requires suite name and actor name -Generates empty environment configuration file into envs dir: +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Build -## GeneratePageObject +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept build` +* `codecept build path/to/project` -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` -## GenerateHelper +## Clean -Creates empty Helper class. +Recursively cleans `output` directory and generated code. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept clean` -## SelfUpdate +## GherkinSnippets -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `php codecept.phar self-update` +Usage: -@author Franck Cassedanne +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateStepObject +## GenerateFeature -Generates StepObject class. You will be asked for steps you want to implement. +Generates Feature file (in Gherkin): -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From 5027bdae29d41b685ee98338f86b9d09df489593 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Feb 2025 02:48:35 +0000 Subject: [PATCH 051/156] updated --- docs/reference/Commands.md | 260 ++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..7eab05f30 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,70 +5,11 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - ## Init -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - - -## SelfUpdate - -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . - -* `php codecept.phar self-update` - -@author Franck Cassedanne - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` +## CompletionFallback @@ -161,50 +102,102 @@ Options: -## CompletionFallback +## Clean + +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GenerateStepObject -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +## GenerateGroup -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` -## GenerateScenarios -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSnippets -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` @@ -232,104 +225,111 @@ Check overriding config values (like in `run` command) -## GenerateHelper +## GenerateSuite -Creates empty Helper class. +Create new test suite. Requires suite name and actor name -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## Bootstrap +## GherkinSteps -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Prints all steps from all Gherkin contexts for a specific suite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +{% endhighlight %} -## GenerateEnvironment +## Build -Generates empty environment configuration file into envs dir: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - * `codecept g:env firefox` +* `codecept build` +* `codecept build path/to/project` -Required to have `envs` path to be specified in `codeception.yml` -## Console +## DryRun -Try to execute test commands in run-time. You may try commands before writing the test. +Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## GenerateSuite -Create new test suite. Requires suite name and actor name +## GenerateScenarios -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## Build +## GenerateEnvironment -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates empty environment configuration file into envs dir: -* `codecept build` -* `codecept build path/to/project` + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Clean +## GeneratePageObject -Recursively cleans `output` directory and generated code. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept clean` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateHelper +Creates empty Helper class. -## GherkinSnippets +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## SelfUpdate -## GenerateFeature +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Generates Feature file (in Gherkin): +* `php codecept.phar self-update` -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +@author Franck Cassedanne + + + +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions From 1b8e84513f8f13ec5fd644534cfdf144754272fd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Feb 2025 10:16:37 +0000 Subject: [PATCH 052/156] updated --- docs/reference/Commands.md | 260 ++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 7eab05f30..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,11 +5,70 @@ title: Commands - Codeception - Documentation # Console Commands +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + ## Init -## CompletionFallback +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## SelfUpdate + +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . + +* `php codecept.phar self-update` + +@author Franck Cassedanne + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` @@ -102,102 +161,50 @@ Options: -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - +## CompletionFallback -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateStepObject -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateSnapshot -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest +## GenerateScenarios -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateSnapshot +## GeneratePageObject -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` @@ -225,111 +232,104 @@ Check overriding config values (like in `run` command) -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - +## GenerateHelper -## GherkinSteps +Creates empty Helper class. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## Build +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept build` -* `codecept build path/to/project` +## GenerateEnvironment -## DryRun +Generates empty environment configuration file into envs dir: -Shows step-by-step execution process for scenario driven tests without actually running them. + * `codecept g:env firefox` -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Required to have `envs` path to be specified in `codeception.yml` +## Console -## GenerateScenarios +Try to execute test commands in run-time. You may try commands before writing the test. -Generates user-friendly text scenarios from scenario-driven tests (Cest). +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateSuite -## GenerateEnvironment +Create new test suite. Requires suite name and actor name -Generates empty environment configuration file into envs dir: +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Build -## GeneratePageObject +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept build` +* `codecept build path/to/project` -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` -## GenerateHelper +## Clean -Creates empty Helper class. +Recursively cleans `output` directory and generated code. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept clean` -## SelfUpdate +## GherkinSnippets -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `php codecept.phar self-update` +Usage: -@author Franck Cassedanne +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateStepObject +## GenerateFeature -Generates StepObject class. You will be asked for steps you want to implement. +Generates Feature file (in Gherkin): -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From e9e507293731c784f476f03076c2762a41b3dea3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Feb 2025 15:16:17 +0000 Subject: [PATCH 053/156] updated --- changelog.markdown | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 50da24879..01d8bc7e4 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,45 @@ title: Codeception Changelog +### module-yii2 v2.0.0: v2.0.0 + +Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/02/26 15:02:27 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) + + + +# [2.0.0](https://github.com/Codeception/module-yii2/compare/v1.1.12...v2.0.0) (2025-02-26) + + +### Bug Fixes + +* call fixtures method ([5ff8868](https://github.com/Codeception/module-yii2/commit/5ff88682d0a9e2c0d8044bca04b85009ceb1c81e)) +* **ci:** github token name ([e045ef5](https://github.com/Codeception/module-yii2/commit/e045ef59bff449c4ba92ee5ba4eb2a670b5f6b4f)) +* **ci:** use dry run for automated release ([d8111f0](https://github.com/Codeception/module-yii2/commit/d8111f00cb5e1fe5395f0b255e53ff5eb31bba56)) +* **cs:** add rules for docblocks ([0d98125](https://github.com/Codeception/module-yii2/commit/0d981258ef962f1bd3cbe948bba29221631a272f)) +* **cs:** indent in phpdoc ([97610ed](https://github.com/Codeception/module-yii2/commit/97610ed08b341ab33c37ba4b9d49409eaef51438)) +* dont add mails that were not sent ([7adc7f7](https://github.com/Codeception/module-yii2/commit/7adc7f7bda798139818853569c9b1d3fd3d5d9cf)) +* load mailmethod config ([d536116](https://github.com/Codeception/module-yii2/commit/d53611637e9ce5291bd13ea1a5704f60828cd12c)) +* phpstan types ([ab5ccc5](https://github.com/Codeception/module-yii2/commit/ab5ccc555c1907b7d19253a6435433f35bb76fe5)) +* recreate baseline ([f9131bd](https://github.com/Codeception/module-yii2/commit/f9131bdf8f9b59192f20152a90a8c716c7fa8157)) +* remove localeurls dependency and test case ([3bba227](https://github.com/Codeception/module-yii2/commit/3bba2271fb23ea145ff3dab666044a07599ac5c7)) +* remove unused dep ([e763dee](https://github.com/Codeception/module-yii2/commit/e763dee616f1b75da68e8fe4a940ce8a99292ae2)) +* run phpstan after codeception build ([9cff2c0](https://github.com/Codeception/module-yii2/commit/9cff2c0549fd380e5ad78e5537945acd97d9eae6)) +* **sa:** use Assert::fail so that phpstan understand code doesn't continue ([117117e](https://github.com/Codeception/module-yii2/commit/117117e6cb6c4b5030b4072c5de34660973a1661)) +* use runtimeexception when applicable ([4df941f](https://github.com/Codeception/module-yii2/commit/4df941fb8e49179eff1c5cec0d011843c71e5177)) +* variable rename ([619fb2d](https://github.com/Codeception/module-yii2/commit/619fb2d13074183a8d7b52b443348e075825292d)) + + +### Features + +* allow mails to be intercepted using events ([dca7c44](https://github.com/Codeception/module-yii2/commit/dca7c446877d1e4143db9deb86a499df40af59ef)) +* drop php8.1 php8.2 ([0b08f64](https://github.com/Codeception/module-yii2/commit/0b08f6481a93807dd7e9ce8b8ab22e937b25e923)) +* Merge pull request [[#119](https://github.com/Codeception/module-yii2/issues/119)](https://github.com/Codeception/module-yii2/issues/119) from TavoNiievez/php_features ([49393a4](https://github.com/Codeception/module-yii2/commit/49393a454bcfaa323fd5cbdd3b51b3f01dfeb063)) + + + + + + ### module-redis 3.2.1: 3.2.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/24 06:24:43 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) From 6066b15f4d592a882807994a8f10963a52fced53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 27 Feb 2025 09:15:45 +0000 Subject: [PATCH 054/156] updated --- changelog.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 01d8bc7e4..cd84beeb7 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,24 @@ title: Codeception Changelog +### module-yii2 v2.0.1: v2.0.1 + +Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/02/27 08:26:23 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) + + + +## [2.0.1](https://github.com/Codeception/module-yii2/compare/v2.0.0...v2.0.1) (2025-02-27) + + +### Bug Fixes + +* check using isset instead of !== null for possibly non-existent property ([e30e595](https://github.com/Codeception/module-yii2/commit/e30e595d19ac059305dd2ff78ceb2df2c0ee621f)) + + + + + + ### module-yii2 v2.0.0: v2.0.0 Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/02/26 15:02:27 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) From 36c9d28ecca2d4137037c8a8549093e4ceb9cab5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Mar 2025 16:16:29 +0000 Subject: [PATCH 055/156] updated --- changelog.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index cd84beeb7..a849749fe 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,24 @@ title: Codeception Changelog +### module-yii2 v2.0.2: v2.0.2 + +Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/03/02 16:01:43 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) + + + +## [2.0.2](https://github.com/Codeception/module-yii2/compare/v2.0.1...v2.0.2) (2025-03-02) + + +### Bug Fixes + +* improve exception handling and code consistency ([d72f144](https://github.com/Codeception/module-yii2/commit/d72f1446146bed998de2c2df9e6f2da3228883c8)) + + + + + + ### module-yii2 v2.0.1: v2.0.1 Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/02/27 08:26:23 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) From 18cd7f223568a15be1c2b5262e0e880d03787c85 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 3 Mar 2025 08:20:26 +0000 Subject: [PATCH 056/156] updated --- changelog.markdown | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index a849749fe..51a5c1c27 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,21 @@ title: Codeception Changelog +### module-db 3.2.2: 3.2.2 + +Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/03/03 08:10:59 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed +* fix: properly quote table names with schema definition [#84](https://github.com/Codeception/module-db/issues/84) by **[sabee-bb](https://github.com/sabee-bb)** in https://github.com/Codeception/module-db/pull/86 + +## New Contributors +* **[sabee-bb](https://github.com/sabee-bb)** made their first contribution in https://github.com/Codeception/module-db/pull/86 + +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.2.1...3.2.2 + + ### module-yii2 v2.0.2: v2.0.2 Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/03/02 16:01:43 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) From 7e2b825b59e623b92adfabab7d47d145a14ac2c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Mar 2025 18:20:00 +0000 Subject: [PATCH 057/156] updated --- changelog.markdown | 555 --------------------------------------------- 1 file changed, 555 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index 51a5c1c27..abd88f028 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -109,18 +109,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-redis/pull/21 -### lib-web 1.0.7: 1.0.7 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/23 14:06:56 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Declare nullable parameter types explicitly for PHP 8.4 compatibility by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/12 -* Test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/13 -* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/14 - - - ### Codeception 5.2.1: 5.2.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/20 15:01:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -269,93 +257,6 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - Improved typing (@SamMousa) -### module-symfony 3.5.0: 3.5.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/11/14 05:59:41 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -# 🎉 Release 3.5.0 - -🆕 **New Assertions** - -you can now use all Symfony assertions directly in Codeception with the `$I->` syntax. - -- Browser assertions: - -``` -assertBrowserCookieValueSame -assertBrowserHasCookie -assertBrowserNotHasCookie -assertRequestAttributeValueSame -assertResponseCookieValueSame -assertResponseFormatSame -assertResponseHasCookie -assertResponseHasHeader -assertResponseHeaderNotSame -assertResponseHeaderSame -assertResponseIsSuccessful -assertResponseIsUnprocessable -assertResponseNotHasCookie -assertResponseNotHasHeader -assertResponseRedirects -assertResponseStatusCodeSame -``` - -- DomCrawler assertions: - -``` -assertCheckboxChecked -assertCheckboxNotChecked -assertInputValueNotSame -assertInputValueSame -assertPageTitleContains -assertPageTitleSame -assertSelectorExists -assertSelectorNotExists -assertSelectorTextContains -assertSelectorTextNotContains -assertSelectorTextSame -``` - -- HttpClient assertions: -``` -assertHttpClientRequest -assertHttpClientRequestCount -assertNotHttpClientRequest -``` - -- Mailer assertions: - -``` -assertEmailCount -assertEmailIsQueued -assertEmailIsNotQueued -assertQueuedEmailCount -``` - - -- Form assertions: - -``` -assertFormValue -assertNoFormValue -``` - -🔧 Other Changes -* `cache_router` documentation enhancement by **[rtwent](https://github.com/rtwent)** in https://github.com/Codeception/module-symfony/pull/195 -* Simplify module logic in https://github.com/Codeception/module-symfony/pull/196 -* PHP 8.4 compatibility: nullable types and tests by **[W0rma](https://github.com/W0rma)** in [#197](https://github.com/Codeception/module-symfony/issues/197) and [#201](https://github.com/Codeception/module-symfony/issues/201) - -🚀 Enjoy the new features and keep building better tests! - - -### New Contributors -* **[rtwent](https://github.com/rtwent)** made their first contribution in https://github.com/Codeception/module-symfony/pull/195 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.4.0...3.5.0 - - ### lib-innerbrowser 4.0.5: 4.0.5 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/09/13 05:15:37 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -425,25 +326,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-rest/compare/3.3.2...3.4.0 -### module-symfony 3.4.0: 3.4.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/06/09 13:34:44 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Added Symfony Validator assertions in https://github.com/Codeception/module-symfony/pull/189 -* Require `tests/bootstrap.php` if exists, to load all necessary `.env` files in https://github.com/Codeception/module-symfony/pull/190 -* Added `amLoggedInWithToken` method by **[codedge](https://github.com/codedge)** in https://github.com/Codeception/module-symfony/pull/182 -* `grabParameter`: Adding info about `bind` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/193 -* Added tests for Symfony 7.1 in https://github.com/Codeception/module-symfony/pull/194 - -## New Contributors -* **[codedge](https://github.com/codedge)** made their first contribution in https://github.com/Codeception/module-symfony/pull/182 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.2...3.4.0 - - ### module-db 3.1.4: 3.1.4 Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2024/05/16 20:15:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -471,32 +353,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-doctrine2/compare/3.0.3...3.0.4 -### module-symfony 3.3.2: 3.3.2 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/18 15:08:50 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Fix: runSymfonyConsoleCommand ignores specific options in https://github.com/Codeception/module-symfony/pull/188 - - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.1...3.3.2 - - -### module-symfony 3.3.1: 3.3.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/15 20:36:03 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Renaming Doctrine2 to Doctrine by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/184 -* Ignore fragments when checking routes by **[cs278](https://github.com/cs278)** in https://github.com/Codeception/module-symfony/pull/185 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.0...3.3.1 - - ### Codeception 5.1.2: 5.1.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/03/07 07:22:27 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -588,17 +444,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dependency on PHPUnit -### lib-web 1.0.6: 1.0.6 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/06 20:50:54 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Support PHPUnit 11 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-web/pull/11 -* Adding details to `grabAttributeFrom()` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/10 - - - ### Codeception 5.1.0: 5.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/04 13:52:44 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -619,15 +464,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support PHPUnit 11 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-innerbrowser/pull/67 -### lib-web 1.0.5: 1.0.5 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/01/13 11:56:59 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Fixing Markdown Code Syntax by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/9 - - ### module-db 3.1.2: 3.1.2 Released by [![](https://avatars.githubusercontent.com/u/1256298?v=4&s=16) sergeyklay](https://github.com/sergeyklay) on 2024/01/12 08:19:37 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -643,23 +479,6 @@ Released by [![](https://avatars.githubusercontent.com/u/1256298?v=4&s=16) serge **Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.1...3.1.2 -### module-symfony 3.3.0: 3.3.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/11 22:17:26 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Improved support for PHP 8.1, removed support for PHP 8.0 -* Symfony 6.4 Support ( https://github.com/Codeception/module-symfony/pull/177 ) -* Fix return type of `grabSecurityService` for compatibility with Symfony 7.0 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-symfony/pull/178 -* Test on Symfony 7.0 ( https://github.com/Codeception/module-symfony/pull/180 ) -* Minor formating by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/179 - - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.2.0...3.3.0 - - ### module-yii2 1.1.10: 1.1.10 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2024/01/10 05:57:11 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -670,25 +489,6 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - [#91](https://github.com/Codeception/module-yii2/issues/91): Fix parallel sessions with `$I->haveFriend()` when no session is active (@michaelarnauts) -### module-symfony 3.2.0: 3.2.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/02 03:14:29 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Deprecate event triggered assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/169 -* Update event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/168 -* Add seeEvent/dontSeeEvent event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/173 -* Various improvements by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/171 -* EventsAssertionsTrait refactor and Symfony 6.3 Support by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/175 - -## New Contributors -* **[xEdelweiss](https://github.com/xEdelweiss)** made his first contribution in https://github.com/Codeception/module-symfony/pull/169 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.1.1...3.2.0 - - ### Codeception 5.0.13: 5.0.13 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/22 19:46:56 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -731,15 +531,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support symfony/finder v7 -### lib-web 1.0.4: 1.0.4 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:38:48 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Support Symfony 7 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-web/pull/8 - - ### module-db 3.1.1: 3.1.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:34:57 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -759,16 +550,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support Symfony 7.x by **[pfuhrmann](https://github.com/pfuhrmann)** in https://github.com/Codeception/lib-innerbrowser/pull/66 -### lib-web 1.0.3: 1.0.3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/11/27 06:43:46 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Minor: Newer array syntax by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/6 - - - ### lib-innerbrowser 4.0.1: 4.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/11/16 16:25:42 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -844,15 +625,6 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - [#88](https://github.com/Codeception/module-yii2/issues/88): Enable object override to InitDbFixture during FixturesStore initialization (@PoohOka) -### lib-web 1.0.2: 1.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 20:33:22 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Mentioning `` tag requirement by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/4 - - ### module-doctrine2 3.0.3: 3.0.3 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 19:38:46 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) @@ -1001,15 +773,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fix deprecated string interpolation by **[Kolyunya](https://github.com/Kolyunya)** in https://github.com/Codeception/module-doctrine2/pull/59 -### module-symfony 3.1.1: 3.1.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:50:11 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* Allow installation of lib-innerbrowser v4 to support PHPUnit 10. - - ### module-webdriver 4.0.0: 4.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 22:06:31 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1574,19 +1337,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Declared more types in method signatures -### module-symfony 3.1.0: 3.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2022/05/27 22:41:40 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Symfony 6.0 support: Session Assertions by **[semaz](https://github.com/semaz)** in https://github.com/Codeception/module-symfony/pull/157 and **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/158 -* Symfony 6.0 Support: Form Assertions by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/158 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.0.0...3.1.0 - - ### module-mongodb 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/05/27 06:42:29 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -1715,15 +1465,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays -### lib-web 1.0.1: 1.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/09 08:19:47 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays and match seeCheckboxIsChecked - - ### Codeception 5.0.0-RC2: 5.0.0-RC2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/08 07:05:05 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -1778,15 +1519,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support for Codeception 5, thanks to **[W0rma](https://github.com/W0rma)** -### module-symfony 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/16 08:53:07 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* Support for Codeception 5 - - ### module-filesystem 2.0.2: 2.0.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:52:49 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) @@ -1873,15 +1605,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### lib-web 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 08:38:48 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - - - - ### lib-innerbrowser 3.0.1: 3.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/06 10:41:21 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -2191,17 +1914,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo * Update dependencies by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-ftp/pull/6 -### module-symfony 2.1.1: 2.1.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:41:02 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed - -* Update dependencies by **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/149 - - ### module-laminas 1.3.1: 1.3.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:39:53 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -2296,30 +2008,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * seeInRedis displays a difference between expected value and actual value -### module-symfony 2.1.0: 2.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:18:21 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed - -By **[TavoNiievez](https://github.com/TavoNiievez)**: -* PHP 7.4 or higher is required. -* Support PHP 8.1 -* Updated code base to PHP 7.4 ( https://github.com/Codeception/module-symfony/pull/146 ) -* Fix broken links in docs ( https://github.com/Codeception/module-symfony/pull/142 ) -* Encapsulate the Client ( https://github.com/Codeception/module-symfony/pull/140 ) - -By **[ThomasLandauer](https://github.com/ThomasLandauer)**: - -* Improving error message for `public` services ( https://github.com/Codeception/module-symfony/pull/145 ) -* Updating Cest file location ( https://github.com/Codeception/module-symfony/pull/144 ) -* Changing `Symfony.php` -> trait ( https://github.com/Codeception/module-symfony/pull/143 ) - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/2.0.5...2.1.0 - - ### module-asserts 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:06:26 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -2884,50 +2572,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo - add link to changelog in readme ([#24](https://github.com/Codeception/module-laravel/issues/24)) by **[Arhell](https://github.com/Arhell)** -### module-symfony 2.0.5: 2.0.5 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/07/07 01:17:57 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -Added assertions for Symfony Mime component ([#139](https://github.com/Codeception/module-symfony/issues/139)): - -- `assertEmailAddressContains` -- `assertEmailAttachmentCount` -- `assertEmailHasHeader` -- `assertEmailHeaderNotSame` -- `assertEmailHeaderSame` -- `assertEmailHtmlBodyContains` -- `assertEmailHtmlBodyNotContains` -- `assertEmailNotHasHeader` -- `assertEmailTextBodyContains` -- `assertEmailTextBodyNotContains` - - -### module-symfony 2.0.4: 2.0.4 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/06/07 06:16:58 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -- New method: `$I->goToLogoutPath();` -- `$I->logout();` is now an alias for `$I->logoutProgrammatically();` - -- Added changelog link to readme.md ([#136](https://github.com/Codeception/module-symfony/issues/136)) by **[Arhell](https://github.com/Arhell)** - - - - -### module-symfony 2.0.3: 2.0.3 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/06/01 01:51:37 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -- Added Symfony 5.3 compatibility ([#133](https://github.com/Codeception/module-symfony/issues/133)). -- Added new method: `$I->seeRequestTimeIsLessThan()` ([#132](https://github.com/Codeception/module-symfony/issues/132)). - - ### module-yii2 1.1.3: 1.1.3 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2021/05/24 20:06:33 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -2990,19 +2634,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Improved code quality [#37](https://github.com/Codeception/lib-innerbrowser/issues/37) -### module-symfony 2.0.2: 2.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/04/16 13:39:49 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -Logical changes by **[mrsombre](https://github.com/mrsombre)** : -- Fix Doctrine Connection service alias ([#129](https://github.com/Codeception/module-symfony/issues/129)) - -Documentation changes by **[ThomasLandauer](https://github.com/ThomasLandauer)** : -- `submitSymfonyForm()`: Mentioning `name` attribute ([#128](https://github.com/Codeception/module-symfony/issues/128)) - - ### module-phalcon4 v1.0.6: v1.0.6 Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/04/13 21:30:04 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) @@ -3043,22 +2674,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib See [#6](https://github.com/Codeception/module-redis/issues/6) -### module-symfony 2.0.1: 2.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/03/28 15:48:38 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -Minor changes in documentation by **[ThomasLandauer](https://github.com/ThomasLandauer)** : -- Added info from the '*[Codeception for Symfony](https://codeception.com/for/symfony)*' page ([#98](https://github.com/Codeception/module-symfony/issues/98)) -- Explaining the `stopFollowingRedirects()` restriction for email ([#118](https://github.com/Codeception/module-symfony/issues/118)) -- Added 'See also' in related email functions ([#122](https://github.com/Codeception/module-symfony/issues/122)) -- Standardize `"@example.com"` as domain in documentation ([#124](https://github.com/Codeception/module-symfony/issues/124)) -- Mentioning Symfony Mailer requirement ([#126](https://github.com/Codeception/module-symfony/issues/126)) -- Changing Fail message for Symfony Mailer ([#127](https://github.com/Codeception/module-symfony/issues/127)) - - - ### module-amqp 1.1.0: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/21 15:29:11 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) @@ -3096,24 +2711,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Append query params to URL for HEAD requests -### module-symfony 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/02/12 22:31:22 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* **New:** - * Added Twig assertions: [`seeCurrentTemplateIs`](https://codeception.com/docs/modules/Symfony#seeCurrentTemplateIs), [`seeRenderedTemplate`](https://codeception.com/docs/modules/Symfony#seeRenderedTemplate) and [`dontSeeRenderedTemplate`](https://codeception.com/docs/modules/Symfony#dontSeeRenderedTemplate). - * The [`grabSentEmails`](https://codeception.com/docs/modules/Symfony#grabSentEmails) and [`grabLastSentEmail`](https://codeception.com/docs/modules/Symfony#grabLastSentEmail) functions were added. - * Added [`SeeOrphanEvent`](https://codeception.com/docs/modules/Symfony#seeOrphanEvent) and [`dontSeeOrphanEvent`](https://codeception.com/docs/modules/Symfony#dontSeeOrphanEvent) assertions. - * The `$url` parameter is now optional in the [`seePageIsAvailable`](https://codeception.com/docs/modules/Symfony#seePageIsAvailable) assertion. -* **BC:** - * `Symfony 3.4` support removed. `Symfony 4.4` or higher is now required. - * Support for [`Swift Mailer`](https://symfony.com/doc/current/email.html) was dropped in favor of [`Symfony Mailer`](https://symfony.com/doc/current/mailer.html); the [`mailer`](https://github.com/Codeception/module-symfony/pull/9/files) configuration parameter was removed. - -> If you are already using `Symfony 4.4` or higher it should not be necessary to make changes to your tests to update! - - ### module-phalcon4 v1.0.5: v1.0.5 Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/02/10 22:09:30 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) @@ -3268,28 +2865,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo Support PHP 8 *(Depends on Laravel libraries actually supporting PHP 8)* by **[Naktibalda](https://github.com/Naktibalda)** -### module-symfony 1.6.0: 1.6.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/20 16:52:03 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * dontSeeEventTriggered - * seeFormErrorMessages - * seeUserHasRoles - -* Remembered authentication methods now also verify the Cookie generated ([#81](https://github.com/Codeception/module-symfony/issues/81)) -* Fixed time metric when running test with `--debug` ([#77](https://github.com/Codeception/module-symfony/issues/77)) - -If you're interested in contributing to this module and didn't know where to start, a [contribution guide is now available](https://github.com/Codeception/module-symfony/blob/master/CONTRIBUTING.md), thanks to **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** ([#79](https://github.com/Codeception/module-symfony/issues/79)). - -**BC:** Removed support for `PHP 7.1` and `PHP 7.2`. - -> Minor changes: ([#65](https://github.com/Codeception/module-symfony/issues/65)) ([#78](https://github.com/Codeception/module-symfony/issues/78)) - - - ### module-db 1.1.0: Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/12/20 13:38:20 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -3299,43 +2874,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Add support for IS NOT NULL in database assertions [#12](https://github.com/Codeception/module-db/issues/12) -### module-symfony 1.5.0: 1.5.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/11 20:50:16 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New method by **[ThomasLandauer](https://github.com/ThomasLandauer)**: - * dontSeeInSession - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * dontSeeRememberedAuthentication - * grabNumRecords - * seeEventTriggered - * seeRememberedAuthentication - * seeSessionHasValues - * persistPermanentService - -* Now you can run test for all the methods of this module in https://github.com/Codeception/symfony-module-tests . - -* **BC:** Remove PHP 7.0 support ([#69](https://github.com/Codeception/module-symfony/issues/69)), code standards updated to PHP 7.1+ ([#75](https://github.com/Codeception/module-symfony/issues/75)) -* **BC:** Removed parameter flags in `seeAuthentication`, `dontSeeAuthentication` and `persistService`, use `seeRememberedAuthentication`, `dontSeeRememberedAuthentication` and `persistPermanentService` instead. - -> Minor logical change in [#74](https://github.com/Codeception/module-symfony/issues/74). - - -### module-symfony 1.4.2: 1.4.2 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/26 12:56:36 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* Support PHP 8 by **[Naktibalda](https://github.com/Naktibalda)** - -> Minor non-logical changes in [#57](https://github.com/Codeception/module-symfony/issues/57) and [#62](https://github.com/Codeception/module-symfony/issues/62). - - - ### module-mongodb 1.1.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/26 07:20:07 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -3354,15 +2892,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-symfony 1.4.1: 1.4.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/25 19:31:47 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* Minor logic fixes ([#58](https://github.com/Codeception/module-symfony/issues/58)), ([#59](https://github.com/Codeception/module-symfony/issues/59)), and ([#60](https://github.com/Codeception/module-symfony/issues/60)) by **[TavoNiievez](https://github.com/TavoNiievez)** - - ### module-laminas 1.0.0: First release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/25 07:58:15 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -3391,42 +2920,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-symfony 1.4.0: 1.4.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/24 16:56:31 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * seeFormErrorMessage ([#50](https://github.com/Codeception/module-symfony/issues/50)) - * dontSeeFormErrors function ([#49](https://github.com/Codeception/module-symfony/issues/49)) - * seeFormHasErrors function ([#48](https://github.com/Codeception/module-symfony/issues/48)) - -* Minor logic fixes ([#51](https://github.com/Codeception/module-symfony/issues/51)), ([#47](https://github.com/Codeception/module-symfony/issues/47)), ([#44](https://github.com/Codeception/module-symfony/issues/44)), ([#41](https://github.com/Codeception/module-symfony/issues/41)) and ([#56](https://github.com/Codeception/module-symfony/issues/56)). - - -### module-symfony 1.3.0: 1.3.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/16 16:52:18 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * grabRepository ([#27](https://github.com/Codeception/module-symfony/issues/27)) - * seeUserPasswordDoesNotNeedRehash ([#29](https://github.com/Codeception/module-symfony/issues/29)) - * grabParameter ([#30](https://github.com/Codeception/module-symfony/issues/30)) - * submitSymfonyForm ([#32](https://github.com/Codeception/module-symfony/issues/32)) - * seePageIsAvailable ([#33](https://github.com/Codeception/module-symfony/issues/33)) - * seePageRedirectsTo ([#33](https://github.com/Codeception/module-symfony/issues/33)) - -* Supports vlucas/phpdotenv v5 ([#28](https://github.com/Codeception/module-symfony/issues/28)) -* Minor logic fixes ([#35](https://github.com/Codeception/module-symfony/issues/35)), ([#36](https://github.com/Codeception/module-symfony/issues/36)), ([#37](https://github.com/Codeception/module-symfony/issues/37)) and ([#38](https://github.com/Codeception/module-symfony/issues/38)) - -* Improved documentation of the 'Parts' feature by **[ThomasLandauer](https://github.com/ThomasLandauer)** ([#40](https://github.com/Codeception/module-symfony/issues/40)) - -* **BC**: Removed support for php 5.6 and Symfony 2.8 ([#39](https://github.com/Codeception/module-symfony/issues/39)) - - ### module-webdriver 1.1.4: Documentation improvements Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/16 07:24:08 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3500,27 +2993,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-symfony 1.2.0: 1.2.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/31 18:41:28 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * amLoggedInAs - * logout - * seeInSession - * seeAuthentication - * dontSeeAuthentication - * seeUserHasRole - * amOnAction - * seeCurrentActionIs - * seeNumRecords - -* Supports vlucas/phpdotenv ^3.6 and ^4.1 -* Improved description and error messages of grabService and seeEmailIsSent by **[ThomasLandauer](https://github.com/ThomasLandauer)** - - ### module-memcache 1.0.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/28 13:30:19 / [Repository](https://github.com/Codeception/module-memcache) / [Releases](https://github.com/Codeception/module-memcache/releases) @@ -3725,15 +3197,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib [#5](https://github.com/Codeception/lib-asserts/issues/5) by **[TavoNiievez](https://github.com/TavoNiievez)** -### module-symfony 1.1.1: Fixed seeEmailIsSent - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/08/28 07:06:19 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -[#9](https://github.com/Codeception/module-symfony/issues/9) by **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** - - ### module-webdriver 1.1.1: Multibyte characters are allowed in build artefact filenames Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/08/28 07:01:59 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3863,15 +3326,6 @@ This version depends on phpunit-wrapper and works with PHPUnit 5 - 9, codeception-5 branch can be revived when we actually have Codeception 5. -### module-symfony 1.1.0: runSymfonyConsoleCommand - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/04/05 14:11:53 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* runSymfonyConsoleCommand works with arguments, options and also console input - - ### module-webdriver 1.0.7: [switchToIFrame] fixed Undefined variable: els error Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/04/01 10:19:18 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -4234,15 +3688,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-symfony 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:13 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - - - - ### module-rest 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) From 180e646e4694576da9e34c4a825d819479384944 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Mar 2025 19:11:46 +0000 Subject: [PATCH 058/156] updated --- changelog.markdown | 555 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 555 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index abd88f028..51a5c1c27 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -109,6 +109,18 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-redis/pull/21 +### lib-web 1.0.7: 1.0.7 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/23 14:06:56 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Declare nullable parameter types explicitly for PHP 8.4 compatibility by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/12 +* Test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/13 +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/14 + + + ### Codeception 5.2.1: 5.2.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/20 15:01:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -257,6 +269,93 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - Improved typing (@SamMousa) +### module-symfony 3.5.0: 3.5.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/11/14 05:59:41 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +# 🎉 Release 3.5.0 + +🆕 **New Assertions** + +you can now use all Symfony assertions directly in Codeception with the `$I->` syntax. + +- Browser assertions: + +``` +assertBrowserCookieValueSame +assertBrowserHasCookie +assertBrowserNotHasCookie +assertRequestAttributeValueSame +assertResponseCookieValueSame +assertResponseFormatSame +assertResponseHasCookie +assertResponseHasHeader +assertResponseHeaderNotSame +assertResponseHeaderSame +assertResponseIsSuccessful +assertResponseIsUnprocessable +assertResponseNotHasCookie +assertResponseNotHasHeader +assertResponseRedirects +assertResponseStatusCodeSame +``` + +- DomCrawler assertions: + +``` +assertCheckboxChecked +assertCheckboxNotChecked +assertInputValueNotSame +assertInputValueSame +assertPageTitleContains +assertPageTitleSame +assertSelectorExists +assertSelectorNotExists +assertSelectorTextContains +assertSelectorTextNotContains +assertSelectorTextSame +``` + +- HttpClient assertions: +``` +assertHttpClientRequest +assertHttpClientRequestCount +assertNotHttpClientRequest +``` + +- Mailer assertions: + +``` +assertEmailCount +assertEmailIsQueued +assertEmailIsNotQueued +assertQueuedEmailCount +``` + + +- Form assertions: + +``` +assertFormValue +assertNoFormValue +``` + +🔧 Other Changes +* `cache_router` documentation enhancement by **[rtwent](https://github.com/rtwent)** in https://github.com/Codeception/module-symfony/pull/195 +* Simplify module logic in https://github.com/Codeception/module-symfony/pull/196 +* PHP 8.4 compatibility: nullable types and tests by **[W0rma](https://github.com/W0rma)** in [#197](https://github.com/Codeception/module-symfony/issues/197) and [#201](https://github.com/Codeception/module-symfony/issues/201) + +🚀 Enjoy the new features and keep building better tests! + + +### New Contributors +* **[rtwent](https://github.com/rtwent)** made their first contribution in https://github.com/Codeception/module-symfony/pull/195 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.4.0...3.5.0 + + ### lib-innerbrowser 4.0.5: 4.0.5 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/09/13 05:15:37 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -326,6 +425,25 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-rest/compare/3.3.2...3.4.0 +### module-symfony 3.4.0: 3.4.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/06/09 13:34:44 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Added Symfony Validator assertions in https://github.com/Codeception/module-symfony/pull/189 +* Require `tests/bootstrap.php` if exists, to load all necessary `.env` files in https://github.com/Codeception/module-symfony/pull/190 +* Added `amLoggedInWithToken` method by **[codedge](https://github.com/codedge)** in https://github.com/Codeception/module-symfony/pull/182 +* `grabParameter`: Adding info about `bind` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/193 +* Added tests for Symfony 7.1 in https://github.com/Codeception/module-symfony/pull/194 + +## New Contributors +* **[codedge](https://github.com/codedge)** made their first contribution in https://github.com/Codeception/module-symfony/pull/182 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.2...3.4.0 + + ### module-db 3.1.4: 3.1.4 Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2024/05/16 20:15:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -353,6 +471,32 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-doctrine2/compare/3.0.3...3.0.4 +### module-symfony 3.3.2: 3.3.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/18 15:08:50 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Fix: runSymfonyConsoleCommand ignores specific options in https://github.com/Codeception/module-symfony/pull/188 + + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.1...3.3.2 + + +### module-symfony 3.3.1: 3.3.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/15 20:36:03 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Renaming Doctrine2 to Doctrine by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/184 +* Ignore fragments when checking routes by **[cs278](https://github.com/cs278)** in https://github.com/Codeception/module-symfony/pull/185 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.0...3.3.1 + + ### Codeception 5.1.2: 5.1.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/03/07 07:22:27 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -444,6 +588,17 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dependency on PHPUnit +### lib-web 1.0.6: 1.0.6 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/06 20:50:54 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Support PHPUnit 11 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-web/pull/11 +* Adding details to `grabAttributeFrom()` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/10 + + + ### Codeception 5.1.0: 5.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/04 13:52:44 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -464,6 +619,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support PHPUnit 11 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-innerbrowser/pull/67 +### lib-web 1.0.5: 1.0.5 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/01/13 11:56:59 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Fixing Markdown Code Syntax by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/9 + + ### module-db 3.1.2: 3.1.2 Released by [![](https://avatars.githubusercontent.com/u/1256298?v=4&s=16) sergeyklay](https://github.com/sergeyklay) on 2024/01/12 08:19:37 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -479,6 +643,23 @@ Released by [![](https://avatars.githubusercontent.com/u/1256298?v=4&s=16) serge **Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.1...3.1.2 +### module-symfony 3.3.0: 3.3.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/11 22:17:26 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Improved support for PHP 8.1, removed support for PHP 8.0 +* Symfony 6.4 Support ( https://github.com/Codeception/module-symfony/pull/177 ) +* Fix return type of `grabSecurityService` for compatibility with Symfony 7.0 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-symfony/pull/178 +* Test on Symfony 7.0 ( https://github.com/Codeception/module-symfony/pull/180 ) +* Minor formating by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/179 + + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.2.0...3.3.0 + + ### module-yii2 1.1.10: 1.1.10 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2024/01/10 05:57:11 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -489,6 +670,25 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - [#91](https://github.com/Codeception/module-yii2/issues/91): Fix parallel sessions with `$I->haveFriend()` when no session is active (@michaelarnauts) +### module-symfony 3.2.0: 3.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/02 03:14:29 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Deprecate event triggered assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/169 +* Update event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/168 +* Add seeEvent/dontSeeEvent event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/173 +* Various improvements by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/171 +* EventsAssertionsTrait refactor and Symfony 6.3 Support by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/175 + +## New Contributors +* **[xEdelweiss](https://github.com/xEdelweiss)** made his first contribution in https://github.com/Codeception/module-symfony/pull/169 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.1.1...3.2.0 + + ### Codeception 5.0.13: 5.0.13 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/22 19:46:56 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -531,6 +731,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support symfony/finder v7 +### lib-web 1.0.4: 1.0.4 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:38:48 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Support Symfony 7 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-web/pull/8 + + ### module-db 3.1.1: 3.1.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:34:57 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -550,6 +759,16 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support Symfony 7.x by **[pfuhrmann](https://github.com/pfuhrmann)** in https://github.com/Codeception/lib-innerbrowser/pull/66 +### lib-web 1.0.3: 1.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/11/27 06:43:46 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Minor: Newer array syntax by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/6 + + + ### lib-innerbrowser 4.0.1: 4.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/11/16 16:25:42 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -625,6 +844,15 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - [#88](https://github.com/Codeception/module-yii2/issues/88): Enable object override to InitDbFixture during FixturesStore initialization (@PoohOka) +### lib-web 1.0.2: 1.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 20:33:22 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Mentioning `` tag requirement by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/4 + + ### module-doctrine2 3.0.3: 3.0.3 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 19:38:46 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) @@ -773,6 +1001,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fix deprecated string interpolation by **[Kolyunya](https://github.com/Kolyunya)** in https://github.com/Codeception/module-doctrine2/pull/59 +### module-symfony 3.1.1: 3.1.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:50:11 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* Allow installation of lib-innerbrowser v4 to support PHPUnit 10. + + ### module-webdriver 4.0.0: 4.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 22:06:31 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1337,6 +1574,19 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Declared more types in method signatures +### module-symfony 3.1.0: 3.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2022/05/27 22:41:40 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Symfony 6.0 support: Session Assertions by **[semaz](https://github.com/semaz)** in https://github.com/Codeception/module-symfony/pull/157 and **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/158 +* Symfony 6.0 Support: Form Assertions by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/158 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.0.0...3.1.0 + + ### module-mongodb 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/05/27 06:42:29 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -1465,6 +1715,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays +### lib-web 1.0.1: 1.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/09 08:19:47 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays and match seeCheckboxIsChecked + + ### Codeception 5.0.0-RC2: 5.0.0-RC2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/08 07:05:05 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -1519,6 +1778,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support for Codeception 5, thanks to **[W0rma](https://github.com/W0rma)** +### module-symfony 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/16 08:53:07 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* Support for Codeception 5 + + ### module-filesystem 2.0.2: 2.0.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:52:49 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) @@ -1605,6 +1873,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### lib-web 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 08:38:48 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + + + + ### lib-innerbrowser 3.0.1: 3.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/06 10:41:21 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -1914,6 +2191,17 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo * Update dependencies by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-ftp/pull/6 +### module-symfony 2.1.1: 2.1.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:41:02 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed + +* Update dependencies by **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/149 + + ### module-laminas 1.3.1: 1.3.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:39:53 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -2008,6 +2296,30 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * seeInRedis displays a difference between expected value and actual value +### module-symfony 2.1.0: 2.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:18:21 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed + +By **[TavoNiievez](https://github.com/TavoNiievez)**: +* PHP 7.4 or higher is required. +* Support PHP 8.1 +* Updated code base to PHP 7.4 ( https://github.com/Codeception/module-symfony/pull/146 ) +* Fix broken links in docs ( https://github.com/Codeception/module-symfony/pull/142 ) +* Encapsulate the Client ( https://github.com/Codeception/module-symfony/pull/140 ) + +By **[ThomasLandauer](https://github.com/ThomasLandauer)**: + +* Improving error message for `public` services ( https://github.com/Codeception/module-symfony/pull/145 ) +* Updating Cest file location ( https://github.com/Codeception/module-symfony/pull/144 ) +* Changing `Symfony.php` -> trait ( https://github.com/Codeception/module-symfony/pull/143 ) + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/2.0.5...2.1.0 + + ### module-asserts 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:06:26 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -2572,6 +2884,50 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo - add link to changelog in readme ([#24](https://github.com/Codeception/module-laravel/issues/24)) by **[Arhell](https://github.com/Arhell)** +### module-symfony 2.0.5: 2.0.5 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/07/07 01:17:57 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +Added assertions for Symfony Mime component ([#139](https://github.com/Codeception/module-symfony/issues/139)): + +- `assertEmailAddressContains` +- `assertEmailAttachmentCount` +- `assertEmailHasHeader` +- `assertEmailHeaderNotSame` +- `assertEmailHeaderSame` +- `assertEmailHtmlBodyContains` +- `assertEmailHtmlBodyNotContains` +- `assertEmailNotHasHeader` +- `assertEmailTextBodyContains` +- `assertEmailTextBodyNotContains` + + +### module-symfony 2.0.4: 2.0.4 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/06/07 06:16:58 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +- New method: `$I->goToLogoutPath();` +- `$I->logout();` is now an alias for `$I->logoutProgrammatically();` + +- Added changelog link to readme.md ([#136](https://github.com/Codeception/module-symfony/issues/136)) by **[Arhell](https://github.com/Arhell)** + + + + +### module-symfony 2.0.3: 2.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/06/01 01:51:37 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +- Added Symfony 5.3 compatibility ([#133](https://github.com/Codeception/module-symfony/issues/133)). +- Added new method: `$I->seeRequestTimeIsLessThan()` ([#132](https://github.com/Codeception/module-symfony/issues/132)). + + ### module-yii2 1.1.3: 1.1.3 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2021/05/24 20:06:33 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -2634,6 +2990,19 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Improved code quality [#37](https://github.com/Codeception/lib-innerbrowser/issues/37) +### module-symfony 2.0.2: 2.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/04/16 13:39:49 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +Logical changes by **[mrsombre](https://github.com/mrsombre)** : +- Fix Doctrine Connection service alias ([#129](https://github.com/Codeception/module-symfony/issues/129)) + +Documentation changes by **[ThomasLandauer](https://github.com/ThomasLandauer)** : +- `submitSymfonyForm()`: Mentioning `name` attribute ([#128](https://github.com/Codeception/module-symfony/issues/128)) + + ### module-phalcon4 v1.0.6: v1.0.6 Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/04/13 21:30:04 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) @@ -2674,6 +3043,22 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib See [#6](https://github.com/Codeception/module-redis/issues/6) +### module-symfony 2.0.1: 2.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/03/28 15:48:38 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +Minor changes in documentation by **[ThomasLandauer](https://github.com/ThomasLandauer)** : +- Added info from the '*[Codeception for Symfony](https://codeception.com/for/symfony)*' page ([#98](https://github.com/Codeception/module-symfony/issues/98)) +- Explaining the `stopFollowingRedirects()` restriction for email ([#118](https://github.com/Codeception/module-symfony/issues/118)) +- Added 'See also' in related email functions ([#122](https://github.com/Codeception/module-symfony/issues/122)) +- Standardize `"@example.com"` as domain in documentation ([#124](https://github.com/Codeception/module-symfony/issues/124)) +- Mentioning Symfony Mailer requirement ([#126](https://github.com/Codeception/module-symfony/issues/126)) +- Changing Fail message for Symfony Mailer ([#127](https://github.com/Codeception/module-symfony/issues/127)) + + + ### module-amqp 1.1.0: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/21 15:29:11 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) @@ -2711,6 +3096,24 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Append query params to URL for HEAD requests +### module-symfony 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/02/12 22:31:22 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* **New:** + * Added Twig assertions: [`seeCurrentTemplateIs`](https://codeception.com/docs/modules/Symfony#seeCurrentTemplateIs), [`seeRenderedTemplate`](https://codeception.com/docs/modules/Symfony#seeRenderedTemplate) and [`dontSeeRenderedTemplate`](https://codeception.com/docs/modules/Symfony#dontSeeRenderedTemplate). + * The [`grabSentEmails`](https://codeception.com/docs/modules/Symfony#grabSentEmails) and [`grabLastSentEmail`](https://codeception.com/docs/modules/Symfony#grabLastSentEmail) functions were added. + * Added [`SeeOrphanEvent`](https://codeception.com/docs/modules/Symfony#seeOrphanEvent) and [`dontSeeOrphanEvent`](https://codeception.com/docs/modules/Symfony#dontSeeOrphanEvent) assertions. + * The `$url` parameter is now optional in the [`seePageIsAvailable`](https://codeception.com/docs/modules/Symfony#seePageIsAvailable) assertion. +* **BC:** + * `Symfony 3.4` support removed. `Symfony 4.4` or higher is now required. + * Support for [`Swift Mailer`](https://symfony.com/doc/current/email.html) was dropped in favor of [`Symfony Mailer`](https://symfony.com/doc/current/mailer.html); the [`mailer`](https://github.com/Codeception/module-symfony/pull/9/files) configuration parameter was removed. + +> If you are already using `Symfony 4.4` or higher it should not be necessary to make changes to your tests to update! + + ### module-phalcon4 v1.0.5: v1.0.5 Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/02/10 22:09:30 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) @@ -2865,6 +3268,28 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo Support PHP 8 *(Depends on Laravel libraries actually supporting PHP 8)* by **[Naktibalda](https://github.com/Naktibalda)** +### module-symfony 1.6.0: 1.6.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/20 16:52:03 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * dontSeeEventTriggered + * seeFormErrorMessages + * seeUserHasRoles + +* Remembered authentication methods now also verify the Cookie generated ([#81](https://github.com/Codeception/module-symfony/issues/81)) +* Fixed time metric when running test with `--debug` ([#77](https://github.com/Codeception/module-symfony/issues/77)) + +If you're interested in contributing to this module and didn't know where to start, a [contribution guide is now available](https://github.com/Codeception/module-symfony/blob/master/CONTRIBUTING.md), thanks to **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** ([#79](https://github.com/Codeception/module-symfony/issues/79)). + +**BC:** Removed support for `PHP 7.1` and `PHP 7.2`. + +> Minor changes: ([#65](https://github.com/Codeception/module-symfony/issues/65)) ([#78](https://github.com/Codeception/module-symfony/issues/78)) + + + ### module-db 1.1.0: Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/12/20 13:38:20 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -2874,6 +3299,43 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Add support for IS NOT NULL in database assertions [#12](https://github.com/Codeception/module-db/issues/12) +### module-symfony 1.5.0: 1.5.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/11 20:50:16 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New method by **[ThomasLandauer](https://github.com/ThomasLandauer)**: + * dontSeeInSession + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * dontSeeRememberedAuthentication + * grabNumRecords + * seeEventTriggered + * seeRememberedAuthentication + * seeSessionHasValues + * persistPermanentService + +* Now you can run test for all the methods of this module in https://github.com/Codeception/symfony-module-tests . + +* **BC:** Remove PHP 7.0 support ([#69](https://github.com/Codeception/module-symfony/issues/69)), code standards updated to PHP 7.1+ ([#75](https://github.com/Codeception/module-symfony/issues/75)) +* **BC:** Removed parameter flags in `seeAuthentication`, `dontSeeAuthentication` and `persistService`, use `seeRememberedAuthentication`, `dontSeeRememberedAuthentication` and `persistPermanentService` instead. + +> Minor logical change in [#74](https://github.com/Codeception/module-symfony/issues/74). + + +### module-symfony 1.4.2: 1.4.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/26 12:56:36 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* Support PHP 8 by **[Naktibalda](https://github.com/Naktibalda)** + +> Minor non-logical changes in [#57](https://github.com/Codeception/module-symfony/issues/57) and [#62](https://github.com/Codeception/module-symfony/issues/62). + + + ### module-mongodb 1.1.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/26 07:20:07 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -2892,6 +3354,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-symfony 1.4.1: 1.4.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/25 19:31:47 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* Minor logic fixes ([#58](https://github.com/Codeception/module-symfony/issues/58)), ([#59](https://github.com/Codeception/module-symfony/issues/59)), and ([#60](https://github.com/Codeception/module-symfony/issues/60)) by **[TavoNiievez](https://github.com/TavoNiievez)** + + ### module-laminas 1.0.0: First release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/25 07:58:15 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -2920,6 +3391,42 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-symfony 1.4.0: 1.4.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/24 16:56:31 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * seeFormErrorMessage ([#50](https://github.com/Codeception/module-symfony/issues/50)) + * dontSeeFormErrors function ([#49](https://github.com/Codeception/module-symfony/issues/49)) + * seeFormHasErrors function ([#48](https://github.com/Codeception/module-symfony/issues/48)) + +* Minor logic fixes ([#51](https://github.com/Codeception/module-symfony/issues/51)), ([#47](https://github.com/Codeception/module-symfony/issues/47)), ([#44](https://github.com/Codeception/module-symfony/issues/44)), ([#41](https://github.com/Codeception/module-symfony/issues/41)) and ([#56](https://github.com/Codeception/module-symfony/issues/56)). + + +### module-symfony 1.3.0: 1.3.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/16 16:52:18 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * grabRepository ([#27](https://github.com/Codeception/module-symfony/issues/27)) + * seeUserPasswordDoesNotNeedRehash ([#29](https://github.com/Codeception/module-symfony/issues/29)) + * grabParameter ([#30](https://github.com/Codeception/module-symfony/issues/30)) + * submitSymfonyForm ([#32](https://github.com/Codeception/module-symfony/issues/32)) + * seePageIsAvailable ([#33](https://github.com/Codeception/module-symfony/issues/33)) + * seePageRedirectsTo ([#33](https://github.com/Codeception/module-symfony/issues/33)) + +* Supports vlucas/phpdotenv v5 ([#28](https://github.com/Codeception/module-symfony/issues/28)) +* Minor logic fixes ([#35](https://github.com/Codeception/module-symfony/issues/35)), ([#36](https://github.com/Codeception/module-symfony/issues/36)), ([#37](https://github.com/Codeception/module-symfony/issues/37)) and ([#38](https://github.com/Codeception/module-symfony/issues/38)) + +* Improved documentation of the 'Parts' feature by **[ThomasLandauer](https://github.com/ThomasLandauer)** ([#40](https://github.com/Codeception/module-symfony/issues/40)) + +* **BC**: Removed support for php 5.6 and Symfony 2.8 ([#39](https://github.com/Codeception/module-symfony/issues/39)) + + ### module-webdriver 1.1.4: Documentation improvements Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/16 07:24:08 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2993,6 +3500,27 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-symfony 1.2.0: 1.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/31 18:41:28 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * amLoggedInAs + * logout + * seeInSession + * seeAuthentication + * dontSeeAuthentication + * seeUserHasRole + * amOnAction + * seeCurrentActionIs + * seeNumRecords + +* Supports vlucas/phpdotenv ^3.6 and ^4.1 +* Improved description and error messages of grabService and seeEmailIsSent by **[ThomasLandauer](https://github.com/ThomasLandauer)** + + ### module-memcache 1.0.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/28 13:30:19 / [Repository](https://github.com/Codeception/module-memcache) / [Releases](https://github.com/Codeception/module-memcache/releases) @@ -3197,6 +3725,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib [#5](https://github.com/Codeception/lib-asserts/issues/5) by **[TavoNiievez](https://github.com/TavoNiievez)** +### module-symfony 1.1.1: Fixed seeEmailIsSent + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/08/28 07:06:19 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +[#9](https://github.com/Codeception/module-symfony/issues/9) by **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** + + ### module-webdriver 1.1.1: Multibyte characters are allowed in build artefact filenames Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/08/28 07:01:59 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3326,6 +3863,15 @@ This version depends on phpunit-wrapper and works with PHPUnit 5 - 9, codeception-5 branch can be revived when we actually have Codeception 5. +### module-symfony 1.1.0: runSymfonyConsoleCommand + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/04/05 14:11:53 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* runSymfonyConsoleCommand works with arguments, options and also console input + + ### module-webdriver 1.0.7: [switchToIFrame] fixed Undefined variable: els error Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/04/01 10:19:18 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3688,6 +4234,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-symfony 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:13 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + + + + ### module-rest 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) From 2f8a1295bb1988dd09395d8e907c49a504bf8008 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Mar 2025 10:15:43 +0000 Subject: [PATCH 059/156] updated --- changelog.markdown | 2060 ++------------------------------------------ 1 file changed, 93 insertions(+), 1967 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index 51a5c1c27..f631789a9 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,21 +9,6 @@ title: Codeception Changelog -### module-db 3.2.2: 3.2.2 - -Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/03/03 08:10:59 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -## What's Changed -* fix: properly quote table names with schema definition [#84](https://github.com/Codeception/module-db/issues/84) by **[sabee-bb](https://github.com/sabee-bb)** in https://github.com/Codeception/module-db/pull/86 - -## New Contributors -* **[sabee-bb](https://github.com/sabee-bb)** made their first contribution in https://github.com/Codeception/module-db/pull/86 - -**Full Changelog**: https://github.com/Codeception/module-db/compare/3.2.1...3.2.2 - - ### module-yii2 v2.0.2: v2.0.2 Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/03/02 16:01:43 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -109,60 +94,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-redis/pull/21 -### lib-web 1.0.7: 1.0.7 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/23 14:06:56 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Declare nullable parameter types explicitly for PHP 8.4 compatibility by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/12 -* Test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/13 -* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/14 - - - -### Codeception 5.2.1: 5.2.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/20 15:01:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -## What's Changed -* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/Codeception/pull/6826 -* Fix missing absolute path resolving in ParamsLoader by **[garvinhicking](https://github.com/garvinhicking)** in https://github.com/Codeception/Codeception/pull/6828 - -**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.2.0...5.2.1 - - -### Codeception 5.2.0: 5.2.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/16 20:31:08 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -## What's Changed -* Fix FAIL message color highlighting by **[antonvolokha](https://github.com/antonvolokha)** in [#6754](https://github.com/Codeception/Codeception/issues/6754) -* Update the codebase to PHP 8.1 by **[TavoNiievez](https://github.com/TavoNiievez)** in [#6747](https://github.com/Codeception/Codeception/issues/6747) -* generate:cest: Adding `declare(strict_types=1);` and return type `void` to generated files by **[ThomasLandauer](https://github.com/ThomasLandauer)** in [#6736](https://github.com/Codeception/Codeception/issues/6736) -* Declare nullable parameter types explicitly by **[W0rma](https://github.com/W0rma)** in [#6774](https://github.com/Codeception/Codeception/issues/6774) , [#6775](https://github.com/Codeception/Codeception/issues/6775) -* chore: Included githubactions in the dependabot config ([#6471](https://github.com/Codeception/Codeception/issues/6471)) by **[SamMousa](https://github.com/SamMousa)** in [#6783](https://github.com/Codeception/Codeception/issues/6783) -* Added new option --disable-coverage-php to skip coverage.serialized report by **[adrenalinkin](https://github.com/adrenalinkin)** in [#6761](https://github.com/Codeception/Codeception/issues/6761) -* chore: add branch alias for main to fix composer install with dev deps by **[SamMousa](https://github.com/SamMousa)** in [#6787](https://github.com/Codeception/Codeception/issues/6787) -* chore(ci): prevent test CI running twice on PR branches by **[SamMousa](https://github.com/SamMousa)** in [#6788](https://github.com/Codeception/Codeception/issues/6788) -* Simplify classes by **[TavoNiievez](https://github.com/TavoNiievez)** in [#6767](https://github.com/Codeception/Codeception/issues/6767) , [#6750](https://github.com/Codeception/Codeception/issues/6750) , [#6764](https://github.com/Codeception/Codeception/issues/6764) -* PHP 8.4: `E_STRICT` deprecation by **[W0rma](https://github.com/W0rma)** in [#6802](https://github.com/Codeception/Codeception/issues/6802) -* Fix PHP 8.4 deprecation. by **[kagg-design](https://github.com/kagg-design)** in [#6811](https://github.com/Codeception/Codeception/issues/6811) -* Fix test suite names in bootstrap command by **[W0rma](https://github.com/W0rma)** in [#6813](https://github.com/Codeception/Codeception/issues/6813) -* Docs (minor) by **[ThomasLandauer](https://github.com/ThomasLandauer)** in [#6804](https://github.com/Codeception/Codeception/issues/6804) , [#6805](https://github.com/Codeception/Codeception/issues/6805) , [#6806](https://github.com/Codeception/Codeception/issues/6806) , 6807 , [#6792](https://github.com/Codeception/Codeception/issues/6792) , [#6810](https://github.com/Codeception/Codeception/issues/6810) , [#6751](https://github.com/Codeception/Codeception/issues/6751) , [#6744](https://github.com/Codeception/Codeception/issues/6744) - -## New Contributors -* **[antonvolokha](https://github.com/antonvolokha)** made their first contribution in https://github.com/Codeception/Codeception/pull/6754 -* **[adrenalinkin](https://github.com/adrenalinkin)** made their first contribution in https://github.com/Codeception/Codeception/pull/6761 -* **[kagg-design](https://github.com/kagg-design)** made their first contribution in https://github.com/Codeception/Codeception/pull/6811 - -**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.1.2...5.2.0 - - ### module-webdriver 4.0.3: 4.0.3 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/14 07:14:37 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -184,58 +115,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib **Full Changelog**: https://github.com/Codeception/module-webdriver/compare/4.0.2...4.0.3 -### lib-innerbrowser 4.0.6: 4.0.6 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/14 07:04:31 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -## What's Changed -* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-innerbrowser/pull/77 -* PHP 8.4: Fix E_STRICT deprecation by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-innerbrowser/pull/74 - - -**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/4.0.5...4.0.6 - - -### module-db 3.2.1: 3.2.1 - -Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/02/06 19:56:35 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -## What's Changed -* fix: allow uppercase table names by quoting the table name when fetching the primary key of a table in PostgreSQL by **[jandrusku](https://github.com/jandrusku)** in https://github.com/Codeception/module-db/pull/82 - -## New Contributors -* **[jandrusku](https://github.com/jandrusku)** made their first contribution in https://github.com/Codeception/module-db/pull/82 - -**Full Changelog**: https://github.com/Codeception/module-db/compare/3.2.0...3.2.1 - - -### module-db 3.2.0: 3.2.0 - -Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/01/31 22:25:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -## What's Changed -* test: Run test against PHP 8.3 by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/71 -* docs: Use short array syntax for consistency by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/72 -* feat: Configure nullable types explicitly by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/73 -* test: /opt/mssql-tools/bin/sqlcmd tool not found in given path by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/80 -* test: Run test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/77 -* test: Avoid deprecated direct access to driver and dbh property by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/81 -* docs: Fix yaml format in PHPDoc and remove duplication by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-db/pull/78 -* chore: Remove unnecessary files from Composer package by **[s1lver](https://github.com/s1lver)** in https://github.com/Codeception/module-db/pull/83 - -## New Contributors -* **[ThomasLandauer](https://github.com/ThomasLandauer)** made their first contribution in https://github.com/Codeception/module-db/pull/78 -* **[s1lver](https://github.com/s1lver)** made their first contribution in https://github.com/Codeception/module-db/pull/83 - -**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.4...3.2.0 - - ### module-laravel 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/01/13 11:42:45 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) @@ -269,112 +148,6 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - Improved typing (@SamMousa) -### module-symfony 3.5.0: 3.5.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/11/14 05:59:41 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -# 🎉 Release 3.5.0 - -🆕 **New Assertions** - -you can now use all Symfony assertions directly in Codeception with the `$I->` syntax. - -- Browser assertions: - -``` -assertBrowserCookieValueSame -assertBrowserHasCookie -assertBrowserNotHasCookie -assertRequestAttributeValueSame -assertResponseCookieValueSame -assertResponseFormatSame -assertResponseHasCookie -assertResponseHasHeader -assertResponseHeaderNotSame -assertResponseHeaderSame -assertResponseIsSuccessful -assertResponseIsUnprocessable -assertResponseNotHasCookie -assertResponseNotHasHeader -assertResponseRedirects -assertResponseStatusCodeSame -``` - -- DomCrawler assertions: - -``` -assertCheckboxChecked -assertCheckboxNotChecked -assertInputValueNotSame -assertInputValueSame -assertPageTitleContains -assertPageTitleSame -assertSelectorExists -assertSelectorNotExists -assertSelectorTextContains -assertSelectorTextNotContains -assertSelectorTextSame -``` - -- HttpClient assertions: -``` -assertHttpClientRequest -assertHttpClientRequestCount -assertNotHttpClientRequest -``` - -- Mailer assertions: - -``` -assertEmailCount -assertEmailIsQueued -assertEmailIsNotQueued -assertQueuedEmailCount -``` - - -- Form assertions: - -``` -assertFormValue -assertNoFormValue -``` - -🔧 Other Changes -* `cache_router` documentation enhancement by **[rtwent](https://github.com/rtwent)** in https://github.com/Codeception/module-symfony/pull/195 -* Simplify module logic in https://github.com/Codeception/module-symfony/pull/196 -* PHP 8.4 compatibility: nullable types and tests by **[W0rma](https://github.com/W0rma)** in [#197](https://github.com/Codeception/module-symfony/issues/197) and [#201](https://github.com/Codeception/module-symfony/issues/201) - -🚀 Enjoy the new features and keep building better tests! - - -### New Contributors -* **[rtwent](https://github.com/rtwent)** made their first contribution in https://github.com/Codeception/module-symfony/pull/195 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.4.0...3.5.0 - - -### lib-innerbrowser 4.0.5: 4.0.5 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/09/13 05:15:37 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Fix name of unsetHttpHeader method [#71](https://github.com/Codeception/lib-innerbrowser/issues/71) - - -### lib-innerbrowser 4.0.4: 4.0.4 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/09/13 05:14:55 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Declare nullable parameter types explicitly by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-innerbrowser/pull/70 -* InnerBrowser.php: Deprecate `deleteHeader` in favor of `unsetHeader` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-innerbrowser/pull/69 - - ### module-webdriver 4.0.2: 4.0.2 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/08/10 00:21:53 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -425,39 +198,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-rest/compare/3.3.2...3.4.0 -### module-symfony 3.4.0: 3.4.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/06/09 13:34:44 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Added Symfony Validator assertions in https://github.com/Codeception/module-symfony/pull/189 -* Require `tests/bootstrap.php` if exists, to load all necessary `.env` files in https://github.com/Codeception/module-symfony/pull/190 -* Added `amLoggedInWithToken` method by **[codedge](https://github.com/codedge)** in https://github.com/Codeception/module-symfony/pull/182 -* `grabParameter`: Adding info about `bind` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/193 -* Added tests for Symfony 7.1 in https://github.com/Codeception/module-symfony/pull/194 - -## New Contributors -* **[codedge](https://github.com/codedge)** made their first contribution in https://github.com/Codeception/module-symfony/pull/182 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.2...3.4.0 - - -### module-db 3.1.4: 3.1.4 - -Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2024/05/16 20:15:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -## What's Changed -* Support ODBC 18 in tests by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/66 -* Validate PSR12 codestyle with PHPCS [#69](https://github.com/Codeception/module-db/issues/69) by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/70 - - -**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.3...3.1.4 - - ### module-doctrine2 3.0.4: 3.0.4 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/04/04 16:33:24 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) @@ -471,67 +211,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-doctrine2/compare/3.0.3...3.0.4 -### module-symfony 3.3.2: 3.3.2 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/18 15:08:50 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Fix: runSymfonyConsoleCommand ignores specific options in https://github.com/Codeception/module-symfony/pull/188 - - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.1...3.3.2 - - -### module-symfony 3.3.1: 3.3.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/15 20:36:03 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Renaming Doctrine2 to Doctrine by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/184 -* Ignore fragments when checking routes by **[cs278](https://github.com/cs278)** in https://github.com/Codeception/module-symfony/pull/185 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.0...3.3.1 - - -### Codeception 5.1.2: 5.1.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/03/07 07:22:27 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Prevent unrelated error from being displayed if a scenario step has failed by **[craig-mcmahon](https://github.com/craig-mcmahon)** in [#6743](https://github.com/Codeception/Codeception/issues/6743) -* Replace Laravel5 with Laravel module in module installation suggestion by **[W0rma](https://github.com/W0rma)** in [#6742](https://github.com/Codeception/Codeception/issues/6742) - - -### module-db 3.1.3: 3.1.3 - -Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2024/03/04 19:29:12 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -## What's Changed -* [bugfix] [#49](https://github.com/Codeception/module-db/issues/49) Fix last insert id return type in case of dblib (3.x) by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/56 - -## New Contributors -* **[szhajdu](https://github.com/szhajdu)** made their first contribution in https://github.com/Codeception/module-db/pull/56 - -**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.2...3.1.3 - - -### Codeception 5.1.1: 5.1.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/23 21:53:22 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Reimplemented coverage:exclude option for PHPUnit 11 in [#6739](https://github.com/Codeception/Codeception/issues/6739) -* Improved output of Bootstrap command by **[ThomasLandauer](https://github.com/ThomasLandauer)** in [#6735](https://github.com/Codeception/Codeception/issues/6735) - - ### module-doctrine 3.1.0: 3.1.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/02/17 22:38:06 / [Repository](https://github.com/Codeception/module-doctrine) / [Releases](https://github.com/Codeception/module-doctrine/releases) @@ -588,443 +267,192 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dependency on PHPUnit -### lib-web 1.0.6: 1.0.6 +### module-yii2 1.1.10: 1.1.10 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/06 20:50:54 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) +Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2024/01/10 05:57:11 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) -* Support PHPUnit 11 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-web/pull/11 -* Adding details to `grabAttributeFrom()` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/10 +- [#93](https://github.com/Codeception/module-yii2/issues/93): Fix symfony/browser-kit incompatibility (@jafaripur) +- [#91](https://github.com/Codeception/module-yii2/issues/91): Fix parallel sessions with `$I->haveFriend()` when no session is active (@michaelarnauts) +### module-phpbrowser 3.0.1: 3.0.1 -### Codeception 5.1.0: 5.1.0 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:46:06 / [Repository](https://github.com/Codeception/module-phpbrowser) / [Releases](https://github.com/Codeception/module-phpbrowser/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/04 13:52:44 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) +* Support for symfony/browser-kit v7 -* Support PHPUnit 11 - -Note: PHPUnit 11 does not support excluding files from code coverage report -### lib-innerbrowser 4.0.3: 4.0.3 +### lib-xml 1.0.2: 1.0.2 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/02 20:37:41 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:33:31 / [Repository](https://github.com/Codeception/lib-xml) / [Releases](https://github.com/Codeception/lib-xml/releases) -* Support PHPUnit 11 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-innerbrowser/pull/67 +* Support symfony/css-selector v7 -### lib-web 1.0.5: 1.0.5 +### module-filesystem 3.0.1: 3.0.1 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/01/13 11:56:59 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:24:04 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) -* Fixing Markdown Code Syntax by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/9 +* Support symfony/finder v7 -### module-db 3.1.2: 3.1.2 +### module-mezzio 4.0.2: 4.0.2 -Released by [![](https://avatars.githubusercontent.com/u/1256298?v=4&s=16) sergeyklay](https://github.com/sergeyklay) on 2024/01/12 08:19:37 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) +Released by [![](https://avatars.githubusercontent.com/u/152236?v=4&s=16) Slamdunk](https://github.com/Slamdunk) on 2023/09/22 05:57:54 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) ## What's Changed -* Fix Db::executeQuery() for null parameter by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/63 +* Added support for diactoros v3. by **[luiscunhaafricainternetgroup](https://github.com/luiscunhaafricainternetgroup)** in https://github.com/Codeception/module-mezzio/pull/17 ## New Contributors -* **[W0rma](https://github.com/W0rma)** made their first contribution in https://github.com/Codeception/module-db/pull/63 +* **[luiscunhaafricainternetgroup](https://github.com/luiscunhaafricainternetgroup)** made their first contribution in https://github.com/Codeception/module-mezzio/pull/17 -**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.1...3.1.2 +**Full Changelog**: https://github.com/Codeception/module-mezzio/compare/4.0.1...4.0.2 -### module-symfony 3.3.0: 3.3.0 +### module-yii2 1.1.9: 1.1.9 -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/11 22:17:26 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) +Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2023/06/16 03:52:10 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) -## What's Changed -* Improved support for PHP 8.1, removed support for PHP 8.0 -* Symfony 6.4 Support ( https://github.com/Codeception/module-symfony/pull/177 ) -* Fix return type of `grabSecurityService` for compatibility with Symfony 7.0 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-symfony/pull/178 -* Test on Symfony 7.0 ( https://github.com/Codeception/module-symfony/pull/180 ) -* Minor formating by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/179 - - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.2.0...3.3.0 +- [#85](https://github.com/Codeception/module-yii2/issues/85): Fix the case for "yii" namespace in phpdoc (@ilyaplot) +- [#86](https://github.com/Codeception/module-yii2/issues/86): Use correct type declaration for amOnPage method (@erickskrauch) +- [#88](https://github.com/Codeception/module-yii2/issues/88): Enable object override to InitDbFixture during FixturesStore initialization (@PoohOka) -### module-yii2 1.1.10: 1.1.10 +### module-doctrine2 3.0.3: 3.0.3 -Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2024/01/10 05:57:11 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 19:38:46 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) -- [#93](https://github.com/Codeception/module-yii2/issues/93): Fix symfony/browser-kit incompatibility (@jafaripur) -- [#91](https://github.com/Codeception/module-yii2/issues/91): Fix parallel sessions with `$I->haveFriend()` when no session is active (@michaelarnauts) +* Adding recommendation for Symfony users by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/69 -### module-symfony 3.2.0: 3.2.0 +### module-doctrine2 3.0.2: 3.0.2 -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/02 03:14:29 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/18 18:36:57 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) -## What's Changed -* Deprecate event triggered assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/169 -* Update event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/168 -* Add seeEvent/dontSeeEvent event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/173 -* Various improvements by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/171 -* EventsAssertionsTrait refactor and Symfony 6.3 Support by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/175 - -## New Contributors -* **[xEdelweiss](https://github.com/xEdelweiss)** made his first contribution in https://github.com/Codeception/module-symfony/pull/169 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.1.1...3.2.0 +* Documentation updates [#67](https://github.com/Codeception/module-doctrine2/issues/67) and [#68](https://github.com/Codeception/module-doctrine2/issues/68) by **[ThomasLandauer](https://github.com/ThomasLandauer)** -### Codeception 5.0.13: 5.0.13 +### module-rest 2.0.3: 2.0.3 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/22 19:46:56 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/10 19:24:26 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) -* Add actor to Cest tests dataProviders by **[weeg](https://github.com/weeg)** in [#6696](https://github.com/Codeception/Codeception/issues/6696) -* Support symfony 7 by **[W0rma](https://github.com/W0rma)** in [#6723](https://github.com/Codeception/Codeception/issues/6723) -* Avoid infinite loop while waiting for all running tests to finish by **[MarcelBolten](https://github.com/MarcelBolten)** in [#6710](https://github.com/Codeception/Codeception/issues/6710) -* Add missing "Attribute::IS_REPEATABLE" to DataProvider attribute by **[Fahl-Design](https://github.com/Fahl-Design)** in [#6715](https://github.com/Codeception/Codeception/issues/6715) -* Support binary data intest examples by **[pongee](https://github.com/pongee)** in [#6708](https://github.com/Codeception/Codeception/issues/6708) -* Improve rendering of $I->assertThat step by **[jtheuerkauf](https://github.com/jtheuerkauf)** in [#6719](https://github.com/Codeception/Codeception/issues/6719) +* Support softcreatr/jsonpath ^0.8 -### module-phpbrowser 3.0.1: 3.0.1 +### module-yii2 1.1.8: 1.1.8 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:46:06 / [Repository](https://github.com/Codeception/module-phpbrowser) / [Releases](https://github.com/Codeception/module-phpbrowser/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:54:49 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) -* Support for symfony/browser-kit v7 +* Fix last commit error by **[sunnyphp](https://github.com/sunnyphp)** in https://github.com/Codeception/module-yii2/pull/73 +* update links by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-yii2/pull/75 +* PHP 8.1: parse_str(): Passing null to parameter `[#1](https://github.com/Codeception/module-yii2/issues/1)` ($string) of type string is deprecated by **[uaoleg](https://github.com/uaoleg)** in https://github.com/Codeception/module-yii2/pull/80 +* Upgrade dependencies to support PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/module-yii2/pull/82 -### lib-xml 1.0.2: 1.0.2 +### lib-asserts 2.1.0: 2.1.0 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:33:31 / [Repository](https://github.com/Codeception/lib-xml) / [Releases](https://github.com/Codeception/lib-xml/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:37:43 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) -* Support symfony/css-selector v7 +* Reimplement property assertions removed from PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-asserts/pull/12 +* Use FQN in PHPDoc type hints for classes and interfaces by **[Sweetchuck](https://github.com/Sweetchuck)** in https://github.com/Codeception/lib-asserts/pull/11 + + -### module-filesystem 3.0.1: 3.0.1 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:24:04 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) +### module-rest 3.3.2: 3.3.2 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 18:16:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) -* Support symfony/finder v7 +* Reverted method signature changes accidentally released in 3.3.1 -### lib-web 1.0.4: 1.0.4 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:38:48 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) +### module-mezzio 4.0.1: 4.0.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:57:42 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) -* Support Symfony 7 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-web/pull/8 +* Support codeception/lib-innerbrowser v4 -### module-db 3.1.1: 3.1.1 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:34:57 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) +### module-laravel 3.1.1: 3.1.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:44:51 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) -* Fix dump loading (adds advice to increase pcre.backtrack_limit) by **[rizort](https://github.com/rizort)** in https://github.com/Codeception/module-db/pull/46 -* [bugfix] [#47](https://github.com/Codeception/module-db/issues/47) Malformed UTF-8 characters, possibly incorrectly encoded by **[cybd](https://github.com/cybd)** in https://github.com/Codeception/module-db/pull/48 +* Support codeception/lib-innerbrowser v4 -### lib-innerbrowser 4.0.2: 4.0.2 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:28:55 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) +### module-lumen 3.0.1: 3.0.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:43:17 / [Repository](https://github.com/Codeception/module-lumen) / [Releases](https://github.com/Codeception/module-lumen/releases) -* Support Symfony 7.x by **[pfuhrmann](https://github.com/pfuhrmann)** in https://github.com/Codeception/lib-innerbrowser/pull/66 +* Support codeception/lib-innerbrowser v4 -### lib-web 1.0.3: 1.0.3 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/11/27 06:43:46 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) +### module-laminas 3.0.2: 3.0.2 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:36:25 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) -* Minor: Newer array syntax by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/6 +* Support codeception/lib-innerbrowser v4 -### lib-innerbrowser 4.0.1: 4.0.1 +### module-rest 3.3.1: 3.3.1 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/11/16 16:25:42 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:26:47 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) -* Use FQN for public methods by **[erickskrauch](https://github.com/erickskrauch)** in https://github.com/Codeception/lib-innerbrowser/pull/63 -* Fix numeric key in form by **[janfejtek](https://github.com/janfejtek)** in https://github.com/Codeception/lib-innerbrowser/pull/64 +* Support codeception/lib-innerbrowser v4 -### Codeception 5.0.12: 5.0.12 +### module-doctrine2 3.0.1: 3.0.1 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/10/15 18:28:39 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:55:15 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) -* Wait for all tests to finish before accessing the serialized test results by **[MarcelBolten](https://github.com/MarcelBolten)** in [#6702](https://github.com/Codeception/Codeception/issues/6702) -* Updated Support Ukraine link in version string +* Fix deprecated string interpolation by **[Kolyunya](https://github.com/Kolyunya)** in https://github.com/Codeception/module-doctrine2/pull/59 -### module-mezzio 4.0.2: 4.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/152236?v=4&s=16) Slamdunk](https://github.com/Slamdunk) on 2023/09/22 05:57:54 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) - - - -## What's Changed -* Added support for diactoros v3. by **[luiscunhaafricainternetgroup](https://github.com/luiscunhaafricainternetgroup)** in https://github.com/Codeception/module-mezzio/pull/17 - -## New Contributors -* **[luiscunhaafricainternetgroup](https://github.com/luiscunhaafricainternetgroup)** made their first contribution in https://github.com/Codeception/module-mezzio/pull/17 - -**Full Changelog**: https://github.com/Codeception/module-mezzio/compare/4.0.1...4.0.2 - - -### Codeception 5.0.11: 5.0.11 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/08/22 06:53:38 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -## What's Changed -* fix sharding for empty tests file by **[SamMousa](https://github.com/SamMousa)** in https://github.com/Codeception/Codeception/pull/6667 -* Add AllowDynamicProperties attribute to Unit by **[erickskrauch](https://github.com/erickskrauch)** in https://github.com/Codeception/Codeception/pull/6666 -* Include mock expectations in assertion count by **[rene-bos](https://github.com/rene-bos)** in https://github.com/Codeception/Codeception/pull/6672 -* Allow multiple test dependencies by **[mbrodala](https://github.com/mbrodala)** in https://github.com/Codeception/Codeception/pull/6676 -* Fix JUnitReporter compatibility with PHPUnit 10.3 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/Codeception/pull/6685 - -## New Contributors -* **[rene-bos](https://github.com/rene-bos)** made their first contribution in https://github.com/Codeception/Codeception/pull/6672 -* **[mbrodala](https://github.com/mbrodala)** made their first contribution in https://github.com/Codeception/Codeception/pull/6676 - -**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.0.10...5.0.11 - - -### module-phalcon5 v2.0.1: v2.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2023/08/03 17:54:06 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) - - - -Fixed getRawBody() return type [[#8](https://github.com/Codeception/module-phalcon5/issues/8)](https://github.com/Codeception/module-phalcon5/issues/8) - - -### module-yii2 1.1.9: 1.1.9 - -Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2023/06/16 03:52:10 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) - - - -- [#85](https://github.com/Codeception/module-yii2/issues/85): Fix the case for "yii" namespace in phpdoc (@ilyaplot) -- [#86](https://github.com/Codeception/module-yii2/issues/86): Use correct type declaration for amOnPage method (@erickskrauch) -- [#88](https://github.com/Codeception/module-yii2/issues/88): Enable object override to InitDbFixture during FixturesStore initialization (@PoohOka) - - -### lib-web 1.0.2: 1.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 20:33:22 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Mentioning `` tag requirement by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/4 - - -### module-doctrine2 3.0.3: 3.0.3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 19:38:46 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -* Adding recommendation for Symfony users by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/69 - - -### module-doctrine2 3.0.2: 3.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/18 18:36:57 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -* Documentation updates [#67](https://github.com/Codeception/module-doctrine2/issues/67) and [#68](https://github.com/Codeception/module-doctrine2/issues/68) by **[ThomasLandauer](https://github.com/ThomasLandauer)** - - -### Codeception 5.0.10: 5.0.10 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/14 07:27:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* JUnitReporter: Fixed compatibility with PHPUnit 10.0.16 [#6656](https://github.com/Codeception/Codeception/issues/6656) -* Recorder extension: Fixed type error [#6643](https://github.com/Codeception/Codeception/issues/6643) by **[thomashohn](https://github.com/thomashohn)** -* Validate test filter pattern without warning [#6641](https://github.com/Codeception/Codeception/issues/6641) by **[dmitryuk](https://github.com/dmitryuk)** - - -### module-rest 2.0.3: 2.0.3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/10 19:24:26 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) - - - -* Support softcreatr/jsonpath ^0.8 - - -### Codeception 5.0.9: 5.0.9 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/11 14:42:09 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* JUnitReporter: Do not set 'useless' testsuite attribute in strict mode [#6635](https://github.com/Codeception/Codeception/issues/6635) by **[gileri](https://github.com/gileri)** -* Fixed static $defaultName deprecated in _completion command [#6633](https://github.com/Codeception/Codeception/issues/6633) by **[dmitryuk](https://github.com/dmitryuk)** -* Replaced object property assertions removed from PHPUnit 10 - - - -### module-yii2 1.1.8: 1.1.8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:54:49 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) - - - -* Fix last commit error by **[sunnyphp](https://github.com/sunnyphp)** in https://github.com/Codeception/module-yii2/pull/73 -* update links by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-yii2/pull/75 -* PHP 8.1: parse_str(): Passing null to parameter `[#1](https://github.com/Codeception/module-yii2/issues/1)` ($string) of type string is deprecated by **[uaoleg](https://github.com/uaoleg)** in https://github.com/Codeception/module-yii2/pull/80 -* Upgrade dependencies to support PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/module-yii2/pull/82 - - - -### lib-asserts 2.1.0: 2.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:37:43 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) - - - -* Reimplement property assertions removed from PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-asserts/pull/12 -* Use FQN in PHPDoc type hints for classes and interfaces by **[Sweetchuck](https://github.com/Sweetchuck)** in https://github.com/Codeception/lib-asserts/pull/11 - - - - - -### module-rest 3.3.2: 3.3.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 18:16:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) - - - -* Reverted method signature changes accidentally released in 3.3.1 - - -### module-soap 3.0.1: 3.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 07:08:01 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) - - - -* Updated dependencies - - -### module-mezzio 4.0.1: 4.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:57:42 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) - - - -* Support codeception/lib-innerbrowser v4 - - -### module-laravel 3.1.1: 3.1.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:44:51 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) - - - -* Support codeception/lib-innerbrowser v4 - - -### module-lumen 3.0.1: 3.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:43:17 / [Repository](https://github.com/Codeception/module-lumen) / [Releases](https://github.com/Codeception/module-lumen/releases) - - - -* Support codeception/lib-innerbrowser v4 - - -### module-laminas 3.0.2: 3.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:36:25 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) - - - -* Support codeception/lib-innerbrowser v4 - - -### module-rest 3.3.1: 3.3.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:26:47 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) - - - -* Support codeception/lib-innerbrowser v4 - - -### module-doctrine2 3.0.1: 3.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:55:15 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -* Fix deprecated string interpolation by **[Kolyunya](https://github.com/Kolyunya)** in https://github.com/Codeception/module-doctrine2/pull/59 - - -### module-symfony 3.1.1: 3.1.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:50:11 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* Allow installation of lib-innerbrowser v4 to support PHPUnit 10. - - -### module-webdriver 4.0.0: 4.0.0 +### module-webdriver 4.0.0: 4.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 22:06:31 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) -* Supports PHPUnit 10 - - -### Codeception 5.0.8: 5.0.8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 21:58:10 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - * Supports PHPUnit 10 @@ -1037,29 +465,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * 3.x versions are compatible with PHPUnit 9 only -### lib-innerbrowser 4.0.0: 4.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 19:33:48 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Support for PHPUnit 10 - - -### Codeception 5.0.7: 5.0.7 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/01/14 20:06:31 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Disabled phpcs checks in generated action files [#6621](https://github.com/Codeception/Codeception/issues/6621) -* `$I->wantTo()` no longer changes test title at runtime [#6622](https://github.com/Codeception/Codeception/issues/6622) -* Display correct failed step when failures and errors happened during test run [#6623](https://github.com/Codeception/Codeception/issues/6623) -* Fixed indentation of `step_decorators` in config files generated by `bootstrap` [#6624](https://github.com/Codeception/Codeception/issues/6624) -* Enabled `Conditional`, `Retry` and `tryTo` decorators in acceptance suite generated by `bootstrap` [#6624](https://github.com/Codeception/Codeception/issues/6624) -* Improved handling of anonymous classes in parser [#6626](https://github.com/Codeception/Codeception/issues/6626) - - ### module-redis 3.1.0: 3.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/01/13 21:20:53 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -1078,55 +483,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Unset SHELL_VERBOSITY environment variable before execution of command [#13](https://github.com/Codeception/module-cli/issues/13) -### Codeception 5.0.6: 5.0.6 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/12/28 14:20:04 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Fixed `canSee` assertions in Unit format [#6610](https://github.com/Codeception/Codeception/issues/6610) -* `tryTo` methods must return boolean result [#6614](https://github.com/Codeception/Codeception/issues/6614) -* Fixed various issues with handling of `@skip` and `@incomplete` annotations and attributes in Cest format [#6617](https://github.com/Codeception/Codeception/issues/6617) -* Stopped adding `__mocked` field to mocks created by Stub library [#6620](https://github.com/Codeception/Codeception/issues/6620) -* Fixed deprecated string syntax in Run command [#6618](https://github.com/Codeception/Codeception/issues/6618) by **[shtiher-pp](https://github.com/shtiher-pp)** - - -### module-db 3.1.0: 3.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/12/03 10:23:12 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -* Implemented `grabEntryFromDatabase` and `grabEntriesFromDatabase` methods by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/43 -* Improved handling of auto_increment field in `haveInDatabase` tear down by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/44 -* Add docker elements to ease local testing by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/42 - - - -### module-db 2.1.0: 2.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/12/03 10:22:30 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -* Implemented `grabEntryFromDatabase` and `grabEntriesFromDatabase` methods by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/43 -* Improved handling of auto_increment field in `haveInDatabase` tear down by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/44 -* Add docker elements to ease local testing by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/42 - - - -### Codeception 5.0.5: 5.0.5 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/11/20 11:33:41 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Don't disable test shuffling when --shard option is used ([#6605](https://github.com/Codeception/Codeception/issues/6605)) -* Provided typed signatures for attributes ([#6600](https://github.com/Codeception/Codeception/issues/6600)) by **[mdoelker](https://github.com/mdoelker)** -* Support for Attributes in generated Actions files ([#6593](https://github.com/Codeception/Codeception/issues/6593)) by **[yesdevnull](https://github.com/yesdevnull)** -* Fixed expectNotToPerformAssertions in unit tests ([#6602](https://github.com/Codeception/Codeception/issues/6602)) by **[yesdevnull](https://github.com/yesdevnull)** - - ### module-laminas 3.0.1: 3.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/11/20 11:03:09 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -1158,20 +514,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### Codeception 5.0.4: 5.0.4 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/10/30 19:21:03 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Execute FailFast subscriber before module _failed hooks [#6586](https://github.com/Codeception/Codeception/issues/6586) by **[yesdevnull](https://github.com/yesdevnull)** -* Fixed parsing of **[skip](https://github.com/skip)** annotation [#6596](https://github.com/Codeception/Codeception/issues/6596) -* Undeprecated untyped method arguments in Cest format [#6591](https://github.com/Codeception/Codeception/issues/6591) -* Removed unnecessary overrides of $resultAggregator property in Unit format and TestCaseWrapper [#6590](https://github.com/Codeception/Codeception/issues/6590) -* Print failure/error/warning/skipped/incomplete messages in HTML reports [#6595](https://github.com/Codeception/Codeception/issues/6595) -* Fixed counting of successful tests [#6595](https://github.com/Codeception/Codeception/issues/6595) - - ### module-webdriver 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/10/15 19:26:14 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1181,33 +523,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Optionally suppress cookie debug output in seeCookie(), dontSeeCookie(), resetCookie() and loadSessionSnapshot() methods by **[lolli42](https://github.com/lolli42)** in https://github.com/Codeception/module-webdriver/pull/111 -### lib-innerbrowser 3.1.3: 3.1.3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/10/03 15:36:06 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -## What's Changed -* fix: checkbox handling by **[SamMousa](https://github.com/SamMousa)** in https://github.com/Codeception/lib-innerbrowser/pull/60 - - -**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/3.1.2...3.1.3 - - -### Codeception 5.0.3: 5.0.3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/09/30 15:48:28 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Fixed passing test result to dependent tests in unit tests ([#6580](https://github.com/Codeception/Codeception/issues/6580)) -* Fixed `TypeError` when **[coversNothing](https://github.com/coversNothing)** annotation is used by Slamdunk ([#6582](https://github.com/Codeception/Codeception/issues/6582)) -* `codecept init unit` creates `tests/Support` directory ([#6578](https://github.com/Codeception/Codeception/issues/6578)) -* Fixed phar file url in `self-update` command by **[voku](https://github.com/voku)** ([#6563](https://github.com/Codeception/Codeception/issues/6563)) -* Added message how to exit Codeception console by **[ThomasLandauer](https://github.com/ThomasLandauer)** ([#6561](https://github.com/Codeception/Codeception/issues/6561)) -* Improved compatibility with PHPUnit 10 - - ### lib-asserts 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/09/27 06:20:36 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) @@ -1264,39 +579,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Improved handling of boolean and null values in xpath methods ([#88](https://github.com/Codeception/module-rest/issues/88)) by **[pamoller](https://github.com/pamoller)** -### Codeception 5.0.2: 5.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/08/20 18:24:07 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Fixed remote code coverage for namespaced suites ([#6533](https://github.com/Codeception/Codeception/issues/6533)) -* Fixed data provider in abstract Cest class **[p-golovin](https://github.com/p-golovin)** ([#6560](https://github.com/Codeception/Codeception/issues/6560)) -* Fixed issue when include groups and test groups empty **[geega](https://github.com/geega)** ([#6557](https://github.com/Codeception/Codeception/issues/6557)) - - -### Codeception 5.0.1: 5.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/08/13 16:49:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Propagate --ext and --override parameters to included test suites by **[calvinalkan](https://github.com/calvinalkan)** ([#6536](https://github.com/Codeception/Codeception/issues/6536)) -* Fixed false negative message about stecman/symfony-console-completion package by **[geega](https://github.com/geega)** ([#6541](https://github.com/Codeception/Codeception/issues/6541)) -* Fixed a number of issues in template functionality ([#6552](https://github.com/Codeception/Codeception/issues/6552)) -* Fixed DataProvider, to properly load dataProviders from abstract classes by **[Basster](https://github.com/Basster)** ([#6549](https://github.com/Codeception/Codeception/issues/6549)) - - -### Codeception 4.2.2: 4.2.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/08/13 13:56:22 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Propagate --ext and --override parameters to included test suites ([#6536](https://github.com/Codeception/Codeception/issues/6536)) -* Fixed false negative message about stecman/symfony-console-completion package ([#6541](https://github.com/Codeception/Codeception/issues/6541)) - - ### module-rest 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/08/13 12:18:30 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -1325,86 +607,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * 2.5 branch makes Codeception 5 compatible with Symfony 4.4 components -### Codeception 5.0.0: 5.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/28 08:41:10 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -#### 5.0.0 - -[Blog post](https://codeception.com/07-28-2022/codeception-5.html) - -Summary of all differences from Codeception 4 - -##### Added - -* Basic attribute support -* `--shard`, `--grep`, `--filter` options -* Test can be filtered by data provider case number or name -* Tests of all formats are reported as useless if they perform no assertions and `reports_useless_tests` setting is enabled -* Array of variables can be passed to all `pause` functions/methods -* Dynamic configuration with parameters can use arrays and other non-string types ([#6409](https://github.com/Codeception/Codeception/issues/6409)) -* `codecept_pause` function and `$this->pause()` in unit tests ([#6387](https://github.com/Codeception/Codeception/issues/6387)) -* Interactive console is executed in the scope of paused test class. -* New code coverage settings: - - `path_coverage` - enables path and branch coverage - - `strict_covers_annotation` - marks test as risky if it has `@covers` annotation but executes some other code - - `ignore_deprecated_code` - doesn't collect code coverage for code having `@deprecated` annotation - - `disable_code_coverage_ignore` - ignores `@codeCoverageIgnore`, `@codeCoverageIgnoreStart` and `@codeCoverageIgnoreEnd` annotations -* Optional value to `fail-fast` option -* Dynamic configuration with parameters can use arrays and other non-string types - -##### Changed - -* PHPUnit is no longer the engine of Codeception, but TestCase format is still supported and assertions are still used -* Generators create namespaced test suites by default -* Replaced Hoa Console with PsySH in `codecept console` -* Used Symfony VarDumper in `codecept_debug` -* Fixed DotReporter output format -* Module `after` and `failed` hooks are executed in reverse order -* Introduced strict typing and other features of PHP 7 and 8. -* Cest format can use data providers from other classes -* Fixed injecting dependencies to actor in Cest and Gherkin formats [#6506](https://github.com/Codeception/Codeception/issues/6506) -* Variadic parameters can be skipped in dependency injection [#6505](https://github.com/Codeception/Codeception/issues/6505) -* Deprecated untyped method arguments in Cest format [#6521](https://github.com/Codeception/Codeception/issues/6521) - -##### Removed - -* `JSON` and `TAP` report formats -* Code coverage blacklist functionality -* `generate:cept` command (`Cept` format itself is deprecated) -* Deprecated class aliases: - - Codeception\TestCase\Test - - Codeception\Platform\Group - - Codeception\Platform\Group - - Codeception\TestCase -* Settings - - `log_incomplete_skipped` - - `paths.log` (replaced by `paths.output`) - - Suite setting `class_name` (replaced by `actor`) - - Global setting `actor` (replaced by `actor_prefix`) -* `Configuration::logDir` method (replaced by `Configuration::outputDir` in 2.0) -* Custom reporters implementing TestListener are no longer supported and must be converted to Extensions - -##### Supported versions - -* PHP 8 -* PHPUnit 9 (prepared for upcoming PHPUnit 10) -* Symfony 4.4 - 6.x - - -### Codeception 5.0.0-RC8: 5.0.0-RC8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/28 08:25:46 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Deprecated untyped method arguments in Cest format [#6521](https://github.com/Codeception/Codeception/issues/6521) -* Improved code style of generated files [#6522](https://github.com/Codeception/Codeception/issues/6522) -* Removed "Powered by PHPUnit" message [#6520](https://github.com/Codeception/Codeception/issues/6520) - - ### module-webdriver 3.1.2: 3.1.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/27 09:10:01 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1423,25 +625,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fix type error in PHP 8.1 when converting ms to sec [#103](https://github.com/Codeception/module-webdriver/issues/103) -### Codeception 5.0.0-RC7: 5.0.0-RC7 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/22 05:52:09 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Fixed injecting dependencies to actor in Cest and Gherkin formats [#6506](https://github.com/Codeception/Codeception/issues/6506) -* Variadic parameters can be skipped in dependency injection [#6505](https://github.com/Codeception/Codeception/issues/6505) - - -### module-datafactory 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/18 16:39:04 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - -* Support for Codeception 5.0 - - ### module-yii2 1.1.7: 1.1.7 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/15 18:10:54 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -1451,62 +634,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fix compatibility with Codeception 5.0.0-RC6 [#72](https://github.com/Codeception/module-yii2/issues/72) -### Codeception 5.0.0-RC6: 5.0.0-RC6 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/12 07:13:56 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Added new attributes (Prepare, Env, BeforeClass,AfterClass, Given, When, Then) -* Class level attributes are applied to all methods -* Codeception attributes are supported in unit tests -* Cest format can use data providers from other classes - - - -### Codeception 5.0.0-RC5: 5.0.0-RC5 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/28 06:42:39 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Substitute invalid UTF-8 characters in debug and step output by **[SamoylenkoSU](https://github.com/SamoylenkoSU)** ([#6483](https://github.com/Codeception/Codeception/issues/6483)) - - -### Codeception 5.0.0-RC4: 5.0.0-RC4 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/22 07:03:20 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Implemented basic attribute support ([#6449](https://github.com/Codeception/Codeception/issues/6449)) by **[DavertMik](https://github.com/DavertMik)** -* Significantly reduced dependencies on PHPUnit -* Replaced PHPUnit\Framework\TestResult with ResultAggregator -* Added assertionCount method to ResultAggregator -* DotReporter prints standard result summary ([#6441](https://github.com/Codeception/Codeception/issues/6441)) by **[Orchestrator404](https://github.com/Orchestrator404)** -* Fixed DotReporter output format -* Fixed fetching remote code coverage data ([#6448](https://github.com/Codeception/Codeception/issues/6448)) -* Loading .env file must not override existing environment variables ([#6477](https://github.com/Codeception/Codeception/issues/6477)) -* All changes from 4.2.0 and 4.2.1: - * Improved multi-application experience, allow filtering suites by name ([#6435](https://github.com/Codeception/Codeception/issues/6435)) by **[calvinalkan](https://github.com/calvinalkan)** - * Configuration override is passed to included suites ([#5978](https://github.com/Codeception/Codeception/issues/5978)) by **[calvinalkan](https://github.com/calvinalkan)** - * Made dry-run command work with module methods having return types ([#6470](https://github.com/Codeception/Codeception/issues/6470)) - * Support for expectError/Warning/Notice/Deprecation methods in unit tests (Requires PHPUnit 8.4+) - * Implemented new setting `convert_deprecations_to_exceptions` ([#6469](https://github.com/Codeception/Codeception/issues/6469)) - * Action file generator: Do not return when return type is never ([#6462](https://github.com/Codeception/Codeception/issues/6462)) - * Execute setupBeforeClass/tearDownAfterClass only once ([#6481](https://github.com/Codeception/Codeception/issues/6481)) - - -### Codeception 4.2.1: 4.2.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/22 06:26:08 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Execute setupBeforeClass/tearDownAfterClass only once ([#6481](https://github.com/Codeception/Codeception/issues/6481)) -* Handle action with intersection return type correctly in dry-run command - - ### module-yii2 1.1.6: 1.1.6 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2022/06/21 11:05:32 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -1518,44 +645,6 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark -### Codeception 4.2.0: 4.2.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/16 05:51:13 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Improved multi-application experience, allow filtering suites by name ([#6435](https://github.com/Codeception/Codeception/issues/6435)) by **[calvinalkan](https://github.com/calvinalkan)** -* Configuration override is passed to included suites ([#5978](https://github.com/Codeception/Codeception/issues/5978)) by **[calvinalkan](https://github.com/calvinalkan)** -* Made dry-run command work with module methods having return types ([#6470](https://github.com/Codeception/Codeception/issues/6470)) -* Support for expectError/Warning/Notice/Deprecation methods in unit tests (Requires PHPUnit 8.4+) -* Implemented new setting `convert_deprecations_to_exceptions` ([#6469](https://github.com/Codeception/Codeception/issues/6469)) -* Action file generator: Do not return when return type is never ([#6462](https://github.com/Codeception/Codeception/issues/6462)) -* Backported test.useless event from Codeception 5.0 ([#6459](https://github.com/Codeception/Codeception/issues/6459)) - - -### module-phalcon5 v2.0.0: v2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2022/06/03 15:20:26 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) - - - -Supports PHP versions: 8.0, 8.1 - -* Use of Codeception v5+ -* Use of Phalcon 5.0.0RC1+ -* Corrected namespaces -* Cosmetic changes - - -### module-sequence 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/05/31 05:48:59 / [Repository](https://github.com/Codeception/module-sequence) / [Releases](https://github.com/Codeception/module-sequence/releases) - - - -* Support for Codeception 5 - - ### module-queue 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/05/30 06:22:13 / [Repository](https://github.com/Codeception/module-queue) / [Releases](https://github.com/Codeception/module-queue/releases) @@ -1574,19 +663,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Declared more types in method signatures -### module-symfony 3.1.0: 3.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2022/05/27 22:41:40 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed -* Symfony 6.0 support: Session Assertions by **[semaz](https://github.com/semaz)** in https://github.com/Codeception/module-symfony/pull/157 and **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/158 -* Symfony 6.0 Support: Form Assertions by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/158 - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.0.0...3.1.0 - - ### module-mongodb 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/05/27 06:42:29 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -1674,18 +750,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Updated dependencies -### Codeception 5.0.0-RC3: 5.0.0-RC3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/22 10:32:33 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Fix incorrect type declaration in InitTemplate by **[ziadoz](https://github.com/ziadoz)** -* Stricter check for phpdotenv v5 (older versions are not supported) -* Throw exception if actor setting is missing in suite configuration -* Use correct types in ParamsLoader and Configuration classes, avoid type errors - - ### module-laravel 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/20 10:13:08 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) @@ -1696,16 +760,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Only Laravel 8 is supported -### lib-innerbrowser 3.1.2: 3.1.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/09 08:51:34 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays -* Fixed formatting of Crawler and CrawlerNot constraint failure messages - - ### module-webdriver 3.1.1: 3.1.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/09 08:33:11 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1715,33 +769,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays -### lib-web 1.0.1: 1.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/09 08:19:47 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - -* Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays and match seeCheckboxIsChecked - - -### Codeception 5.0.0-RC2: 5.0.0-RC2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/08 07:05:05 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Added `--shard`, `--grep`, `--filter` options ([#6399](https://github.com/Codeception/Codeception/issues/6399)) -* Added new code coverage settings ([#6423](https://github.com/Codeception/Codeception/issues/6423)) -* Dynamic configuration with parameters can use arrays and other non-string types ([#6409](https://github.com/Codeception/Codeception/issues/6409)) -* Introduced `codecept_pause` function and `$this->pause()` in unit tests ([#6387](https://github.com/Codeception/Codeception/issues/6387)) -* Interactive console is executed in the scope of paused test class. -* Array of variables can be passed to all `pause` functions/methods -* Replaced Hoa Console with PsySH in `codecept console` -* Used Symfony VarDumper in `codecept_debug` ([#6406](https://github.com/Codeception/Codeception/issues/6406)) -* Fixed type error in code coverage exclude filter by **[W0rma](https://github.com/W0rma)** -* Fix type error in Recorder extension - - ### module-rest 2.0.2: 2.0.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/30 05:43:05 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -1769,192 +796,70 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support for Codeception 5 -### module-amqp 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/20 09:26:33 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) - - - -* Support for Codeception 5, thanks to **[W0rma](https://github.com/W0rma)** - - -### module-symfony 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/16 08:53:07 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* Support for Codeception 5 - - -### module-filesystem 2.0.2: 2.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:52:49 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) - - - -* Improved error handling [#19](https://github.com/Codeception/module-filesystem/issues/19) - - -### module-filesystem 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:51:07 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) - - - -* Support for Codeception 5 - - -### Codeception 5.0.0-RC1: 5.0.0-RC1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/13 18:42:02 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Use PHPUnit 9 until PHPUnit 10 is released. -* Read about earlier change in [CHANGELOG](https://github.com/Codeception/Codeception/blob/5.0/CHANGELOG-5.x.md). - - -### module-webdriver 3.1.0: 3.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 17:08:21 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) - - - -* Moved WebDriver constraints from codeception/codeception -* Moved code shared with lib-innerbrowser to codeception/lib-web -* Improved code style - - -### module-soap 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 16:39:18 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) - - - -* Compatibility with Codeception 5 -* Uses lib-xml - - -### module-rest 3.1.0: 3.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 11:00:56 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) - - - -* Moved JSON constraints from codeception/codeception to module-rest -* XML related code shared with SOAP module was moved to codeception/lib-xml - - -### lib-innerbrowser 3.1.1: 3.1.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 10:36:11 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Fix constraint names - - -### lib-innerbrowser 3.1.0: 3.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 10:18:41 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Extracted constraints , exception and interfaces shared with module-webdriver to codeception/lib-web - - -### lib-xml 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 10:04:52 / [Repository](https://github.com/Codeception/lib-xml) / [Releases](https://github.com/Codeception/lib-xml/releases) - - - - - - -### lib-web 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 08:38:48 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) - - - - - - -### lib-innerbrowser 3.0.1: 3.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/06 10:41:21 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Raised lowest supported version of symfony 4 components to avoid deprecation warnings on PHP 8. - +### module-amqp 3.0.0: 3.0.0 -### module-db 1.2.0: 1.2.0 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/20 09:26:33 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/05 19:47:19 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) +* Support for Codeception 5, thanks to **[W0rma](https://github.com/W0rma)** -* Add `skip_cleanup_if_failed` option for not cleaning up failed tests -* Null safety in destructor [#30](https://github.com/Codeception/module-db/issues/30) by **[Archanium](https://github.com/Archanium)** +### module-filesystem 2.0.2: 2.0.2 -### module-db 2.0.2: 2.0.2 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:52:49 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/05 19:36:19 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) +* Improved error handling [#19](https://github.com/Codeception/module-filesystem/issues/19) -* Add `skip_cleanup_if_failed` option for not cleaning up failed tests -* Null safety in destructor [#30](https://github.com/Codeception/module-db/issues/30) by **[Archanium](https://github.com/Archanium)** +### module-filesystem 3.0.0: 3.0.0 -### module-db 3.0.1: 3.0.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:51:07 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/05 19:29:02 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) +* Support for Codeception 5 -* Add `skip_cleanup_if_failed` option for not cleaning up failed tests -* Null safety in destructor [#30](https://github.com/Codeception/module-db/issues/30) by **[Archanium](https://github.com/Archanium)** +### module-webdriver 3.1.0: 3.1.0 -### module-redis 3.0.0: 3.0.0 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 17:08:21 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:41:06 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) +* Moved WebDriver constraints from codeception/codeception +* Moved code shared with lib-innerbrowser to codeception/lib-web +* Improved code style -* Support for Codeception 5 +### module-rest 3.1.0: 3.1.0 -### module-db 1.1.1: 1.1.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 11:00:56 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:06:05 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) +* Moved JSON constraints from codeception/codeception to module-rest +* XML related code shared with SOAP module was moved to codeception/lib-xml -* Fix Sqlite primary key column detection on PHP 8.1 +### lib-xml 1.0.0: Initial release -### module-db 2.0.1: 2.0.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 10:04:52 / [Repository](https://github.com/Codeception/lib-xml) / [Releases](https://github.com/Codeception/lib-xml/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:05:36 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) -* Fix Sqlite primary key column detection on PHP 8.1 -### module-db 3.0.0: 3.0.0 +### module-redis 3.0.0: 3.0.0 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:03:37 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:41:06 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) -* Codeception 5 support +* Support for Codeception 5 ### module-mezzio 4.0.0: 4.0.0 @@ -2021,28 +926,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Update to min php8 ([#70](https://github.com/Codeception/module-rest/issues/70)) by **[pbojan](https://github.com/pbojan)** -### lib-innerbrowser 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/19 18:36:23 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Compatibility with Codeception 5 - - -### lib-innerbrowser 2.0.2: 2.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2022/02/01 17:42:05 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -## What's Changed -* Prevent "Uncaught TypeError: explode(): Argument [#2](https://github.com/Codeception/lib-innerbrowser/issues/2) ($string) must be of type string, null given" by **[Fahl-Design](https://github.com/Fahl-Design)** in https://github.com/Codeception/lib-innerbrowser/pull/47 -* Fix compatibility with symfony/dom-crawler < 5.3.0-BETA-1 by **[nrocy](https://github.com/nrocy)** in https://github.com/Codeception/lib-innerbrowser/pull/50 - -**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/2.0.1...2.0.2 - - ### module-doctrine2 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/01/28 18:34:39 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) @@ -2074,15 +957,6 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark -### module-soap 2.0.2: 2.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/01/06 17:03:47 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) - - - -* Fixed type of client property - - ### module-webdriver 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/12/29 16:57:38 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2150,15 +1024,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo * **Small bug fix**: Fix some types (https://github.com/Codeception/module-phpbrowser/pull/21) -### lib-innerbrowser 2.0.1: 2.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/21 02:04:00 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Update dependencies (https://github.com/Codeception/lib-innerbrowser/pull/48) - - ### module-redis 1.4.1: 1.4.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/21 02:02:03 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -2191,17 +1056,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo * Update dependencies by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-ftp/pull/6 -### module-symfony 2.1.1: 2.1.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:41:02 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed - -* Update dependencies by **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/149 - - ### module-laminas 1.3.1: 1.3.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:39:53 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -2213,17 +1067,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo * Update dependencies by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-laminas/pull/21 -### module-soap 2.0.1: 2.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:37:02 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) - - - -## What's Changed - -* Update dependencies by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-soap/pull/13 - - ### module-phpbrowser 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:26:57 / [Repository](https://github.com/Codeception/module-phpbrowser) / [Releases](https://github.com/Codeception/module-phpbrowser/releases) @@ -2269,24 +1112,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/lib-asserts/compare/1.13.2...2.0.0 -### module-phalcon5 v1.0.1: v1.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2021/12/16 13:04:49 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) - - - -Corrections for Packagist descriptions and PHP minimum version - - -### module-phalcon5 v1.0.0: v1.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2021/12/15 18:51:06 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) - - - -Initial release of the Codeception module for Phalcon 5. - - ### module-redis 1.4.0: 1.4.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/12/13 06:06:22 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -2296,30 +1121,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * seeInRedis displays a difference between expected value and actual value -### module-symfony 2.1.0: 2.1.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:18:21 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -## What's Changed - -By **[TavoNiievez](https://github.com/TavoNiievez)**: -* PHP 7.4 or higher is required. -* Support PHP 8.1 -* Updated code base to PHP 7.4 ( https://github.com/Codeception/module-symfony/pull/146 ) -* Fix broken links in docs ( https://github.com/Codeception/module-symfony/pull/142 ) -* Encapsulate the Client ( https://github.com/Codeception/module-symfony/pull/140 ) - -By **[ThomasLandauer](https://github.com/ThomasLandauer)**: - -* Improving error message for `public` services ( https://github.com/Codeception/module-symfony/pull/145 ) -* Updating Cest file location ( https://github.com/Codeception/module-symfony/pull/144 ) -* Changing `Symfony.php` -> trait ( https://github.com/Codeception/module-symfony/pull/143 ) - -**Full Changelog**: https://github.com/Codeception/module-symfony/compare/2.0.5...2.1.0 - - ### module-asserts 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:06:26 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -2337,23 +1138,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-asserts/compare/1.3.1...2.0.0 -### module-datafactory 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:00:26 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - -## What's Changed - -* PHP 7.4 or higher is required. -* Support PHP 8.1 -* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-datafactory/pull/9 and https://github.com/Codeception/module-datafactory/pull/14 -* Documentation changes by **[DavertMik](https://github.com/DavertMik)** in https://github.com/Codeception/module-datafactory/pull/11 -* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-datafactory/pull/13 - -**Full Changelog**: https://github.com/Codeception/module-datafactory/compare/1.1.0...2.0.0 - - ### module-mongodb 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 14:55:38 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -2369,22 +1153,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-mongodb/compare/1.1.1...2.0.0 -### module-sequence 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 14:36:31 / [Repository](https://github.com/Codeception/module-sequence) / [Releases](https://github.com/Codeception/module-sequence/releases) - - - -## What's Changed - -* PHP 7.4 or higher is required. -* Support PHP 8.1 -* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-sequence/pull/4 -* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-sequence/pull/3 - -**Full Changelog**: https://github.com/Codeception/module-sequence/compare/1.0.1...2.0.0 - - ### module-webdriver 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 14:34:27 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2576,37 +1344,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-laminas/compare/1.2.1...1.3.0 -### module-db 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:38:52 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -## What's Changed - -* PHP 7.4 or higher is required. -* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-db/pull/26 -* Replace `Codeception\Util\Stub` with `Codeception\Stub` in tests by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/module-db/pull/13 -* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-db/pull/24 - -**Full Changelog**: https://github.com/Codeception/module-db/compare/1.1.0...2.0.0 - - -### module-soap 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:35:42 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) - - - -## What's Changed - -* PHP 7.4 or higher is required. -* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-soap/pull/8 and https://github.com/Codeception/module-soap/pull/12 -* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-soap/pull/11 - -**Full Changelog**: https://github.com/Codeception/module-soap/compare/1.0.1...2.0.0 - - ### module-rest 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:27:57 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -2637,21 +1374,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-phpbrowser/compare/1.0.2...2.0.0 -### lib-innerbrowser 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:16:00 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -## What's Changed - -* PHP 7.4 or higher is required. -* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/lib-innerbrowser/pull/45 -* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/lib-innerbrowser/pull/43 - -**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/1.5.0...2.0.0 - - ### module-yii2 1.1.4: 1.1.4 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2021/11/26 05:58:14 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -2845,16 +1567,6 @@ $I->seeNumberOfTabs(2); ``` -### lib-innerbrowser 1.5.1: 1.5.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/08/30 15:40:07 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -- Fix symfony/dom-crawler 5.3 deprecation ([#41](https://github.com/Codeception/lib-innerbrowser/issues/41)) by **[simonhammes](https://github.com/simonhammes)** -- Require Codeception 4.x by **[TavoNiievez](https://github.com/TavoNiievez)** - - ### module-webdriver 1.3.0: Add new option webdriver_proxy Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/08/22 07:22:29 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2884,50 +1596,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo - add link to changelog in readme ([#24](https://github.com/Codeception/module-laravel/issues/24)) by **[Arhell](https://github.com/Arhell)** -### module-symfony 2.0.5: 2.0.5 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/07/07 01:17:57 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -Added assertions for Symfony Mime component ([#139](https://github.com/Codeception/module-symfony/issues/139)): - -- `assertEmailAddressContains` -- `assertEmailAttachmentCount` -- `assertEmailHasHeader` -- `assertEmailHeaderNotSame` -- `assertEmailHeaderSame` -- `assertEmailHtmlBodyContains` -- `assertEmailHtmlBodyNotContains` -- `assertEmailNotHasHeader` -- `assertEmailTextBodyContains` -- `assertEmailTextBodyNotContains` - - -### module-symfony 2.0.4: 2.0.4 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/06/07 06:16:58 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -- New method: `$I->goToLogoutPath();` -- `$I->logout();` is now an alias for `$I->logoutProgrammatically();` - -- Added changelog link to readme.md ([#136](https://github.com/Codeception/module-symfony/issues/136)) by **[Arhell](https://github.com/Arhell)** - - - - -### module-symfony 2.0.3: 2.0.3 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/06/01 01:51:37 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -- Added Symfony 5.3 compatibility ([#133](https://github.com/Codeception/module-symfony/issues/133)). -- Added new method: `$I->seeRequestTimeIsLessThan()` ([#132](https://github.com/Codeception/module-symfony/issues/132)). - - ### module-yii2 1.1.3: 1.1.3 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2021/05/24 20:06:33 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -2937,20 +1605,6 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - Add ability to specify application class in config ([#48](https://github.com/Codeception/module-yii2/issues/48)) -### module-phalcon4 v1.0.7: v1.0.7 - -Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/05/18 18:21:15 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) - - - -Updated code base to PHP 7.2 ([#14](https://github.com/Codeception/module-phalcon4/issues/14)): -- Added strict types -- Added return types -- Added some type hints -- Removed unnecessary qualifiers -- sha1 by default instead of md5. - - ### module-lumen 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/04/29 14:24:58 / [Repository](https://github.com/Codeception/module-lumen) / [Releases](https://github.com/Codeception/module-lumen/releases) @@ -2979,39 +1633,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Revert change implemented in 1.3.0 -### lib-innerbrowser 1.5.0: Hidden field, delete requests, code quality - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/04/23 07:01:58 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Submit value of hidden field if checkbox is unchecked and matching hidden field exists [#36](https://github.com/Codeception/lib-innerbrowser/issues/36) -* Send request body in DELETE requests (partially reverts change made in 1.4.2) [#38](https://github.com/Codeception/lib-innerbrowser/issues/38) -* Improved code quality [#37](https://github.com/Codeception/lib-innerbrowser/issues/37) - - -### module-symfony 2.0.2: 2.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/04/16 13:39:49 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -Logical changes by **[mrsombre](https://github.com/mrsombre)** : -- Fix Doctrine Connection service alias ([#129](https://github.com/Codeception/module-symfony/issues/129)) - -Documentation changes by **[ThomasLandauer](https://github.com/ThomasLandauer)** : -- `submitSymfonyForm()`: Mentioning `name` attribute ([#128](https://github.com/Codeception/module-symfony/issues/128)) - - -### module-phalcon4 v1.0.6: v1.0.6 - -Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/04/13 21:30:04 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) - - - -* Fixed Request service redefinition ([#7](https://github.com/Codeception/module-phalcon4/issues/7)) - - ### module-rest 1.3.0: 1.3.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/04/08 08:28:48 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -3025,15 +1646,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Other documentation improvements -### lib-innerbrowser 1.4.2: Don't set request body for DELETE and OPTIONS requests - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/04/06 05:29:20 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - - - - ### module-redis 1.1.0: Allow more parameters to be sent to Predis Client Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/31 16:04:36 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -3043,22 +1655,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib See [#6](https://github.com/Codeception/module-redis/issues/6) -### module-symfony 2.0.1: 2.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/03/28 15:48:38 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -Minor changes in documentation by **[ThomasLandauer](https://github.com/ThomasLandauer)** : -- Added info from the '*[Codeception for Symfony](https://codeception.com/for/symfony)*' page ([#98](https://github.com/Codeception/module-symfony/issues/98)) -- Explaining the `stopFollowingRedirects()` restriction for email ([#118](https://github.com/Codeception/module-symfony/issues/118)) -- Added 'See also' in related email functions ([#122](https://github.com/Codeception/module-symfony/issues/122)) -- Standardize `"@example.com"` as domain in documentation ([#124](https://github.com/Codeception/module-symfony/issues/124)) -- Mentioning Symfony Mailer requirement ([#126](https://github.com/Codeception/module-symfony/issues/126)) -- Changing Fail message for Symfony Mailer ([#127](https://github.com/Codeception/module-symfony/issues/127)) - - - ### module-amqp 1.1.0: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/21 15:29:11 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) @@ -3069,24 +1665,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support php-amqplib v3 -### module-datafactory 1.1.0: Added Custom Store - -Released by [![](https://avatars.githubusercontent.com/u/220264?v=4&s=16) DavertMik](https://github.com/DavertMik) on 2021/03/16 19:42:52 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - -Custom Store can be used for Data Factory. See [#2](https://github.com/Codeception/module-datafactory/issues/2) - - -### lib-innerbrowser 1.4.1: Fix grabTextFrom TypeError - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/02 08:03:49 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Fix Type Error on PHP 8 when array is passed to grabTextFrom[#30](https://github.com/Codeception/lib-innerbrowser/issues/30) - - ### module-rest 1.2.8: Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/02 06:51:05 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -3096,43 +1674,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Append query params to URL for HEAD requests -### module-symfony 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/02/12 22:31:22 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* **New:** - * Added Twig assertions: [`seeCurrentTemplateIs`](https://codeception.com/docs/modules/Symfony#seeCurrentTemplateIs), [`seeRenderedTemplate`](https://codeception.com/docs/modules/Symfony#seeRenderedTemplate) and [`dontSeeRenderedTemplate`](https://codeception.com/docs/modules/Symfony#dontSeeRenderedTemplate). - * The [`grabSentEmails`](https://codeception.com/docs/modules/Symfony#grabSentEmails) and [`grabLastSentEmail`](https://codeception.com/docs/modules/Symfony#grabLastSentEmail) functions were added. - * Added [`SeeOrphanEvent`](https://codeception.com/docs/modules/Symfony#seeOrphanEvent) and [`dontSeeOrphanEvent`](https://codeception.com/docs/modules/Symfony#dontSeeOrphanEvent) assertions. - * The `$url` parameter is now optional in the [`seePageIsAvailable`](https://codeception.com/docs/modules/Symfony#seePageIsAvailable) assertion. -* **BC:** - * `Symfony 3.4` support removed. `Symfony 4.4` or higher is now required. - * Support for [`Swift Mailer`](https://symfony.com/doc/current/email.html) was dropped in favor of [`Symfony Mailer`](https://symfony.com/doc/current/mailer.html); the [`mailer`](https://github.com/Codeception/module-symfony/pull/9/files) configuration parameter was removed. - -> If you are already using `Symfony 4.4` or higher it should not be necessary to make changes to your tests to update! - - -### module-phalcon4 v1.0.5: v1.0.5 - -Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/02/10 22:09:30 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) - - - -Changed -* Removed limitation of PHP 8.0 version in composer.json - - -### lib-innerbrowser 1.4.0: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/29 18:19:08 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Added redirect methods https://github.com/Codeception/lib-innerbrowser/pull/29 - - ### module-lumen 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/01/19 05:02:29 / [Repository](https://github.com/Codeception/module-lumen) / [Releases](https://github.com/Codeception/module-lumen/releases) @@ -3152,24 +1693,14 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo > **Minor change**: Adding link to "central" parts explanation ([#4](https://github.com/Codeception/module-lumen/issues/4)) by **[ThomasLandauer](https://github.com/ThomasLandauer)**. -### module-webdriver 1.2.0: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/17 19:30:29 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) - - - -* Implemented makeElementScreenshot by **[Blaimi](https://github.com/Blaimi)** -* Documentation improvements - - -### lib-innerbrowser 1.3.6: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/17 11:25:06 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) +### module-webdriver 1.2.0: +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/17 19:30:29 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) -* Don't set request body for HEAD requests [#26](https://github.com/Codeception/lib-innerbrowser/issues/26) +* Implemented makeElementScreenshot by **[Blaimi](https://github.com/Blaimi)** +* Documentation improvements ### module-phalcon 1.1.0: @@ -3182,24 +1713,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fix: `$cookie->setSecure()` always as boolean [#6](https://github.com/Codeception/module-phalcon/issues/6) -### lib-innerbrowser 1.3.5: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/02 19:01:35 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Fixed filling of fields that are linked to form using `form` attribute https://github.com/Codeception/Codeception/issues/6022 - - -### module-datafactory 1.0.1: PHP8 support - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/12/30 15:56:46 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - - - - ### module-laravel 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/29 20:52:27 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) @@ -3268,74 +1781,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo Support PHP 8 *(Depends on Laravel libraries actually supporting PHP 8)* by **[Naktibalda](https://github.com/Naktibalda)** -### module-symfony 1.6.0: 1.6.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/20 16:52:03 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * dontSeeEventTriggered - * seeFormErrorMessages - * seeUserHasRoles - -* Remembered authentication methods now also verify the Cookie generated ([#81](https://github.com/Codeception/module-symfony/issues/81)) -* Fixed time metric when running test with `--debug` ([#77](https://github.com/Codeception/module-symfony/issues/77)) - -If you're interested in contributing to this module and didn't know where to start, a [contribution guide is now available](https://github.com/Codeception/module-symfony/blob/master/CONTRIBUTING.md), thanks to **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** ([#79](https://github.com/Codeception/module-symfony/issues/79)). - -**BC:** Removed support for `PHP 7.1` and `PHP 7.2`. - -> Minor changes: ([#65](https://github.com/Codeception/module-symfony/issues/65)) ([#78](https://github.com/Codeception/module-symfony/issues/78)) - - - -### module-db 1.1.0: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/12/20 13:38:20 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -Add support for IS NOT NULL in database assertions [#12](https://github.com/Codeception/module-db/issues/12) - - -### module-symfony 1.5.0: 1.5.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/11 20:50:16 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New method by **[ThomasLandauer](https://github.com/ThomasLandauer)**: - * dontSeeInSession - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * dontSeeRememberedAuthentication - * grabNumRecords - * seeEventTriggered - * seeRememberedAuthentication - * seeSessionHasValues - * persistPermanentService - -* Now you can run test for all the methods of this module in https://github.com/Codeception/symfony-module-tests . - -* **BC:** Remove PHP 7.0 support ([#69](https://github.com/Codeception/module-symfony/issues/69)), code standards updated to PHP 7.1+ ([#75](https://github.com/Codeception/module-symfony/issues/75)) -* **BC:** Removed parameter flags in `seeAuthentication`, `dontSeeAuthentication` and `persistService`, use `seeRememberedAuthentication`, `dontSeeRememberedAuthentication` and `persistPermanentService` instead. - -> Minor logical change in [#74](https://github.com/Codeception/module-symfony/issues/74). - - -### module-symfony 1.4.2: 1.4.2 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/26 12:56:36 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* Support PHP 8 by **[Naktibalda](https://github.com/Naktibalda)** - -> Minor non-logical changes in [#57](https://github.com/Codeception/module-symfony/issues/57) and [#62](https://github.com/Codeception/module-symfony/issues/62). - - - ### module-mongodb 1.1.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/26 07:20:07 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -3354,15 +1799,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-symfony 1.4.1: 1.4.1 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/25 19:31:47 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* Minor logic fixes ([#58](https://github.com/Codeception/module-symfony/issues/58)), ([#59](https://github.com/Codeception/module-symfony/issues/59)), and ([#60](https://github.com/Codeception/module-symfony/issues/60)) by **[TavoNiievez](https://github.com/TavoNiievez)** - - ### module-laminas 1.0.0: First release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/25 07:58:15 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -3391,42 +1827,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-symfony 1.4.0: 1.4.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/24 16:56:31 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * seeFormErrorMessage ([#50](https://github.com/Codeception/module-symfony/issues/50)) - * dontSeeFormErrors function ([#49](https://github.com/Codeception/module-symfony/issues/49)) - * seeFormHasErrors function ([#48](https://github.com/Codeception/module-symfony/issues/48)) - -* Minor logic fixes ([#51](https://github.com/Codeception/module-symfony/issues/51)), ([#47](https://github.com/Codeception/module-symfony/issues/47)), ([#44](https://github.com/Codeception/module-symfony/issues/44)), ([#41](https://github.com/Codeception/module-symfony/issues/41)) and ([#56](https://github.com/Codeception/module-symfony/issues/56)). - - -### module-symfony 1.3.0: 1.3.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/16 16:52:18 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * grabRepository ([#27](https://github.com/Codeception/module-symfony/issues/27)) - * seeUserPasswordDoesNotNeedRehash ([#29](https://github.com/Codeception/module-symfony/issues/29)) - * grabParameter ([#30](https://github.com/Codeception/module-symfony/issues/30)) - * submitSymfonyForm ([#32](https://github.com/Codeception/module-symfony/issues/32)) - * seePageIsAvailable ([#33](https://github.com/Codeception/module-symfony/issues/33)) - * seePageRedirectsTo ([#33](https://github.com/Codeception/module-symfony/issues/33)) - -* Supports vlucas/phpdotenv v5 ([#28](https://github.com/Codeception/module-symfony/issues/28)) -* Minor logic fixes ([#35](https://github.com/Codeception/module-symfony/issues/35)), ([#36](https://github.com/Codeception/module-symfony/issues/36)), ([#37](https://github.com/Codeception/module-symfony/issues/37)) and ([#38](https://github.com/Codeception/module-symfony/issues/38)) - -* Improved documentation of the 'Parts' feature by **[ThomasLandauer](https://github.com/ThomasLandauer)** ([#40](https://github.com/Codeception/module-symfony/issues/40)) - -* **BC**: Removed support for php 5.6 and Symfony 2.8 ([#39](https://github.com/Codeception/module-symfony/issues/39)) - - ### module-webdriver 1.1.4: Documentation improvements Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/16 07:24:08 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3455,15 +1855,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Catch MappingException thrown by Doctrine 2.9 -### module-soap 1.0.1: Support PHP 8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/07 20:10:24 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) - - - - - - ### module-rest 1.2.7: Fix deprecation error Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/04 17:06:31 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -3491,36 +1882,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-sequence 1.0.1: Support PHP 8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/31 19:03:32 / [Repository](https://github.com/Codeception/module-sequence) / [Releases](https://github.com/Codeception/module-sequence/releases) - - - - - - -### module-symfony 1.2.0: 1.2.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/31 18:41:28 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: - * amLoggedInAs - * logout - * seeInSession - * seeAuthentication - * dontSeeAuthentication - * seeUserHasRole - * amOnAction - * seeCurrentActionIs - * seeNumRecords - -* Supports vlucas/phpdotenv ^3.6 and ^4.1 -* Improved description and error messages of grabService and seeEmailIsSent by **[ThomasLandauer](https://github.com/ThomasLandauer)** - - ### module-memcache 1.0.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/28 13:30:19 / [Repository](https://github.com/Codeception/module-memcache) / [Releases](https://github.com/Codeception/module-memcache/releases) @@ -3604,16 +1965,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Use wrapper methods to avoid PHPUnit 9 deprecation messages and keep it working with PHPUnit 10 -### module-db 1.0.2: PHP8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/23 18:22:43 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -* Support PHP 8 (no code changes) -* Require stable version of codeception/codeception - - ### module-cli 1.0.4: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/23 17:52:08 / [Repository](https://github.com/Codeception/module-cli) / [Releases](https://github.com/Codeception/module-cli/releases) @@ -3624,15 +1975,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Deleted local copy of generated documentation -### lib-innerbrowser 1.3.4: Support PHP 8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/22 06:23:10 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -No code changes - - ### module-asserts 1.3.1: PHP8 support Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/21 16:49:39 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -3652,16 +1994,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib No code changes -### lib-innerbrowser 1.3.3: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/11 19:05:11 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Added missing http codes. -* Improved documentation of Ajax methods - - ### module-webdriver 1.1.2: Documentation improvements Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/11 18:55:38 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3725,15 +2057,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib [#5](https://github.com/Codeception/lib-asserts/issues/5) by **[TavoNiievez](https://github.com/TavoNiievez)** -### module-symfony 1.1.1: Fixed seeEmailIsSent - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/08/28 07:06:19 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -[#9](https://github.com/Codeception/module-symfony/issues/9) by **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** - - ### module-webdriver 1.1.1: Multibyte characters are allowed in build artefact filenames Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/08/28 07:01:59 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3764,16 +2087,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Validation errors for haveRecord method [#10](https://github.com/Codeception/module-yii2/issues/10) by **[ianikanov](https://github.com/ianikanov)** -### module-phalcon4 v1.0.4: v1.0.4 - -Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/08/26 09:34:29 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) - - - -Fixed -- Session To Use Session Manager - - ### module-rest 1.2.1: Documentation updates Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/07/05 15:46:13 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -3792,16 +2105,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### lib-innerbrowser 1.3.2: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/07/05 14:22:41 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* Updated (dont)seeCurrentUrlMatches methods to use wrapper method instead of deprecated assert(Not)RegExp method. -* Fixed various code smells reported by PhpStorm - - ### module-webdriver 1.1.0: switchToFrame Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/05/31 08:52:02 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3863,15 +2166,6 @@ This version depends on phpunit-wrapper and works with PHPUnit 5 - 9, codeception-5 branch can be revived when we actually have Codeception 5. -### module-symfony 1.1.0: runSymfonyConsoleCommand - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/04/05 14:11:53 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - -* runSymfonyConsoleCommand works with arguments, options and also console input - - ### module-webdriver 1.0.7: [switchToIFrame] fixed Undefined variable: els error Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/04/01 10:19:18 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3931,15 +2225,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### lib-innerbrowser 1.3.1: PHPUnit9 compatibility - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/02/20 14:52:13 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* proceedSeeInField casts value to string before comparison - - ### lib-asserts 1.11.0: Support PHPUnit 9 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/02/11 10:46:55 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) @@ -3994,16 +2279,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib [#3](https://github.com/Codeception/module-yii2/issues/3) by **[mytskine](https://github.com/mytskine)** -### module-zf2 1.0.3: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/29 15:19:36 / [Repository](https://github.com/Codeception/module-zf2) / [Releases](https://github.com/Codeception/module-zf2/releases) - - - -* Use doctrine entitymanager from config -* Add persisted services before bootstrap - - ### module-queue 1.1.0: Implemented driver for Pheanstalk 4 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/28 13:23:15 / [Repository](https://github.com/Codeception/module-queue) / [Releases](https://github.com/Codeception/module-queue/releases) @@ -4022,33 +2297,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib [#7](https://github.com/Codeception/module-rest/issues/7) by **[svycka](https://github.com/svycka)** -### lib-innerbrowser 1.3.0: Allow to add or remove server parameters - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/27 09:33:02 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - -* [#5](https://github.com/Codeception/lib-innerbrowser/issues/5) by **[svycka](https://github.com/svycka)** - - -### module-zf2 1.0.2: Empty request content can't be null - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/23 17:55:51 / [Repository](https://github.com/Codeception/module-zf2) / [Releases](https://github.com/Codeception/module-zf2/releases) - - - -[#2](https://github.com/Codeception/module-zf2/issues/2) - - -### module-zf2 1.0.1: Add Server parameters to ZendRequest - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/22 15:14:48 / [Repository](https://github.com/Codeception/module-zf2) / [Releases](https://github.com/Codeception/module-zf2/releases) - - - - - - ### module-apc 1.0.1: Removed requirement for ext-apc from composer.json Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/21 07:45:14 / [Repository](https://github.com/Codeception/module-apc) / [Releases](https://github.com/Codeception/module-apc/releases) @@ -4067,56 +2315,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-phalcon4 1.0.3: v1.0.3 - -Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/01/11 17:02:24 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) - - - -Fixed -- Dependencies - - -### module-phalcon4 1.0.2: v1.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/01/07 12:32:16 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) - - - -Fixed -- Replacing service in DI from functional test not working - - -### module-phalcon4 1.0.1: v1.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/01/06 11:26:42 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) - - - -Removed composer.lock -Updated dependencies -Updated SQL schema -Updated DocBlocks - - -### module-phalcon4 1.0.0: v1.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/01/06 09:32:56 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) - - - -Initial release of the Codeception module for Phalcon 4. - - -### module-db 1.0.1: Mysql: use single quotes for string value in getPrimaryKey - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/12/08 18:03:36 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - -Fixes some compatibility issue with MariaDB https://github.com/Codeception/Codeception/issues/5778 - - ### module-filesystem 1.0.2: Support symfony/finder 5 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/12/04 17:14:16 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) @@ -4126,24 +2324,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### lib-innerbrowser 1.2.3: Symfony 5: catch another exception - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/26 16:50:50 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - - - - -### lib-innerbrowser 1.2.2: Really fixed _failed handling with Symfony 5 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/24 16:43:52 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) - - - - - - ### lib-asserts 1.10.1: rerelease Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/23 21:14:50 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) @@ -4234,15 +2414,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-symfony 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:13 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) - - - - - - ### module-rest 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -4288,15 +2459,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-db 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:27:01 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) - - - - - - ### module-phalcon 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:02:04 / [Repository](https://github.com/Codeception/module-phalcon) / [Releases](https://github.com/Codeception/module-phalcon/releases) @@ -4307,33 +2469,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Use columnMap by retrieving record id if needed -### module-zf2 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:24:38 / [Repository](https://github.com/Codeception/module-zf2) / [Releases](https://github.com/Codeception/module-zf2/releases) - - - - - - -### module-sequence 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:24:11 / [Repository](https://github.com/Codeception/module-sequence) / [Releases](https://github.com/Codeception/module-sequence/releases) - - - - - - -### module-soap 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:23:56 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) - - - - - - ### module-redis 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:23:43 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -4388,15 +2523,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-datafactory 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:07:51 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - - - - ### module-cli 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:07:08 / [Repository](https://github.com/Codeception/module-cli) / [Releases](https://github.com/Codeception/module-cli/releases) From 3e391ac1ef5e1ed8227558c4bd3e8874487d0fee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Mar 2025 11:12:39 +0000 Subject: [PATCH 060/156] updated --- changelog.markdown | 2062 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1968 insertions(+), 94 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index f631789a9..51a5c1c27 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,21 @@ title: Codeception Changelog +### module-db 3.2.2: 3.2.2 + +Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/03/03 08:10:59 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed +* fix: properly quote table names with schema definition [#84](https://github.com/Codeception/module-db/issues/84) by **[sabee-bb](https://github.com/sabee-bb)** in https://github.com/Codeception/module-db/pull/86 + +## New Contributors +* **[sabee-bb](https://github.com/sabee-bb)** made their first contribution in https://github.com/Codeception/module-db/pull/86 + +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.2.1...3.2.2 + + ### module-yii2 v2.0.2: v2.0.2 Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/03/02 16:01:43 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -94,6 +109,60 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-redis/pull/21 +### lib-web 1.0.7: 1.0.7 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/23 14:06:56 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Declare nullable parameter types explicitly for PHP 8.4 compatibility by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/12 +* Test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/13 +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-web/pull/14 + + + +### Codeception 5.2.1: 5.2.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/20 15:01:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/Codeception/pull/6826 +* Fix missing absolute path resolving in ParamsLoader by **[garvinhicking](https://github.com/garvinhicking)** in https://github.com/Codeception/Codeception/pull/6828 + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.2.0...5.2.1 + + +### Codeception 5.2.0: 5.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/02/16 20:31:08 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* Fix FAIL message color highlighting by **[antonvolokha](https://github.com/antonvolokha)** in [#6754](https://github.com/Codeception/Codeception/issues/6754) +* Update the codebase to PHP 8.1 by **[TavoNiievez](https://github.com/TavoNiievez)** in [#6747](https://github.com/Codeception/Codeception/issues/6747) +* generate:cest: Adding `declare(strict_types=1);` and return type `void` to generated files by **[ThomasLandauer](https://github.com/ThomasLandauer)** in [#6736](https://github.com/Codeception/Codeception/issues/6736) +* Declare nullable parameter types explicitly by **[W0rma](https://github.com/W0rma)** in [#6774](https://github.com/Codeception/Codeception/issues/6774) , [#6775](https://github.com/Codeception/Codeception/issues/6775) +* chore: Included githubactions in the dependabot config ([#6471](https://github.com/Codeception/Codeception/issues/6471)) by **[SamMousa](https://github.com/SamMousa)** in [#6783](https://github.com/Codeception/Codeception/issues/6783) +* Added new option --disable-coverage-php to skip coverage.serialized report by **[adrenalinkin](https://github.com/adrenalinkin)** in [#6761](https://github.com/Codeception/Codeception/issues/6761) +* chore: add branch alias for main to fix composer install with dev deps by **[SamMousa](https://github.com/SamMousa)** in [#6787](https://github.com/Codeception/Codeception/issues/6787) +* chore(ci): prevent test CI running twice on PR branches by **[SamMousa](https://github.com/SamMousa)** in [#6788](https://github.com/Codeception/Codeception/issues/6788) +* Simplify classes by **[TavoNiievez](https://github.com/TavoNiievez)** in [#6767](https://github.com/Codeception/Codeception/issues/6767) , [#6750](https://github.com/Codeception/Codeception/issues/6750) , [#6764](https://github.com/Codeception/Codeception/issues/6764) +* PHP 8.4: `E_STRICT` deprecation by **[W0rma](https://github.com/W0rma)** in [#6802](https://github.com/Codeception/Codeception/issues/6802) +* Fix PHP 8.4 deprecation. by **[kagg-design](https://github.com/kagg-design)** in [#6811](https://github.com/Codeception/Codeception/issues/6811) +* Fix test suite names in bootstrap command by **[W0rma](https://github.com/W0rma)** in [#6813](https://github.com/Codeception/Codeception/issues/6813) +* Docs (minor) by **[ThomasLandauer](https://github.com/ThomasLandauer)** in [#6804](https://github.com/Codeception/Codeception/issues/6804) , [#6805](https://github.com/Codeception/Codeception/issues/6805) , [#6806](https://github.com/Codeception/Codeception/issues/6806) , 6807 , [#6792](https://github.com/Codeception/Codeception/issues/6792) , [#6810](https://github.com/Codeception/Codeception/issues/6810) , [#6751](https://github.com/Codeception/Codeception/issues/6751) , [#6744](https://github.com/Codeception/Codeception/issues/6744) + +## New Contributors +* **[antonvolokha](https://github.com/antonvolokha)** made their first contribution in https://github.com/Codeception/Codeception/pull/6754 +* **[adrenalinkin](https://github.com/adrenalinkin)** made their first contribution in https://github.com/Codeception/Codeception/pull/6761 +* **[kagg-design](https://github.com/kagg-design)** made their first contribution in https://github.com/Codeception/Codeception/pull/6811 + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.1.2...5.2.0 + + ### module-webdriver 4.0.3: 4.0.3 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/14 07:14:37 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -115,6 +184,58 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib **Full Changelog**: https://github.com/Codeception/module-webdriver/compare/4.0.2...4.0.3 +### lib-innerbrowser 4.0.6: 4.0.6 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/02/14 07:04:31 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +## What's Changed +* Support PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-innerbrowser/pull/77 +* PHP 8.4: Fix E_STRICT deprecation by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-innerbrowser/pull/74 + + +**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/4.0.5...4.0.6 + + +### module-db 3.2.1: 3.2.1 + +Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/02/06 19:56:35 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed +* fix: allow uppercase table names by quoting the table name when fetching the primary key of a table in PostgreSQL by **[jandrusku](https://github.com/jandrusku)** in https://github.com/Codeception/module-db/pull/82 + +## New Contributors +* **[jandrusku](https://github.com/jandrusku)** made their first contribution in https://github.com/Codeception/module-db/pull/82 + +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.2.0...3.2.1 + + +### module-db 3.2.0: 3.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/01/31 22:25:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed +* test: Run test against PHP 8.3 by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/71 +* docs: Use short array syntax for consistency by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/72 +* feat: Configure nullable types explicitly by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/73 +* test: /opt/mssql-tools/bin/sqlcmd tool not found in given path by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/80 +* test: Run test against PHP 8.4 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/77 +* test: Avoid deprecated direct access to driver and dbh property by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/81 +* docs: Fix yaml format in PHPDoc and remove duplication by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-db/pull/78 +* chore: Remove unnecessary files from Composer package by **[s1lver](https://github.com/s1lver)** in https://github.com/Codeception/module-db/pull/83 + +## New Contributors +* **[ThomasLandauer](https://github.com/ThomasLandauer)** made their first contribution in https://github.com/Codeception/module-db/pull/78 +* **[s1lver](https://github.com/s1lver)** made their first contribution in https://github.com/Codeception/module-db/pull/83 + +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.4...3.2.0 + + ### module-laravel 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/01/13 11:42:45 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) @@ -148,6 +269,112 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - Improved typing (@SamMousa) +### module-symfony 3.5.0: 3.5.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/11/14 05:59:41 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +# 🎉 Release 3.5.0 + +🆕 **New Assertions** + +you can now use all Symfony assertions directly in Codeception with the `$I->` syntax. + +- Browser assertions: + +``` +assertBrowserCookieValueSame +assertBrowserHasCookie +assertBrowserNotHasCookie +assertRequestAttributeValueSame +assertResponseCookieValueSame +assertResponseFormatSame +assertResponseHasCookie +assertResponseHasHeader +assertResponseHeaderNotSame +assertResponseHeaderSame +assertResponseIsSuccessful +assertResponseIsUnprocessable +assertResponseNotHasCookie +assertResponseNotHasHeader +assertResponseRedirects +assertResponseStatusCodeSame +``` + +- DomCrawler assertions: + +``` +assertCheckboxChecked +assertCheckboxNotChecked +assertInputValueNotSame +assertInputValueSame +assertPageTitleContains +assertPageTitleSame +assertSelectorExists +assertSelectorNotExists +assertSelectorTextContains +assertSelectorTextNotContains +assertSelectorTextSame +``` + +- HttpClient assertions: +``` +assertHttpClientRequest +assertHttpClientRequestCount +assertNotHttpClientRequest +``` + +- Mailer assertions: + +``` +assertEmailCount +assertEmailIsQueued +assertEmailIsNotQueued +assertQueuedEmailCount +``` + + +- Form assertions: + +``` +assertFormValue +assertNoFormValue +``` + +🔧 Other Changes +* `cache_router` documentation enhancement by **[rtwent](https://github.com/rtwent)** in https://github.com/Codeception/module-symfony/pull/195 +* Simplify module logic in https://github.com/Codeception/module-symfony/pull/196 +* PHP 8.4 compatibility: nullable types and tests by **[W0rma](https://github.com/W0rma)** in [#197](https://github.com/Codeception/module-symfony/issues/197) and [#201](https://github.com/Codeception/module-symfony/issues/201) + +🚀 Enjoy the new features and keep building better tests! + + +### New Contributors +* **[rtwent](https://github.com/rtwent)** made their first contribution in https://github.com/Codeception/module-symfony/pull/195 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.4.0...3.5.0 + + +### lib-innerbrowser 4.0.5: 4.0.5 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/09/13 05:15:37 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Fix name of unsetHttpHeader method [#71](https://github.com/Codeception/lib-innerbrowser/issues/71) + + +### lib-innerbrowser 4.0.4: 4.0.4 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/09/13 05:14:55 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Declare nullable parameter types explicitly by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-innerbrowser/pull/70 +* InnerBrowser.php: Deprecate `deleteHeader` in favor of `unsetHeader` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-innerbrowser/pull/69 + + ### module-webdriver 4.0.2: 4.0.2 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/08/10 00:21:53 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -198,6 +425,39 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-rest/compare/3.3.2...3.4.0 +### module-symfony 3.4.0: 3.4.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/06/09 13:34:44 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Added Symfony Validator assertions in https://github.com/Codeception/module-symfony/pull/189 +* Require `tests/bootstrap.php` if exists, to load all necessary `.env` files in https://github.com/Codeception/module-symfony/pull/190 +* Added `amLoggedInWithToken` method by **[codedge](https://github.com/codedge)** in https://github.com/Codeception/module-symfony/pull/182 +* `grabParameter`: Adding info about `bind` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/193 +* Added tests for Symfony 7.1 in https://github.com/Codeception/module-symfony/pull/194 + +## New Contributors +* **[codedge](https://github.com/codedge)** made their first contribution in https://github.com/Codeception/module-symfony/pull/182 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.2...3.4.0 + + +### module-db 3.1.4: 3.1.4 + +Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2024/05/16 20:15:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed +* Support ODBC 18 in tests by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/66 +* Validate PSR12 codestyle with PHPCS [#69](https://github.com/Codeception/module-db/issues/69) by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/70 + + +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.3...3.1.4 + + ### module-doctrine2 3.0.4: 3.0.4 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/04/04 16:33:24 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) @@ -211,6 +471,67 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-doctrine2/compare/3.0.3...3.0.4 +### module-symfony 3.3.2: 3.3.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/18 15:08:50 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Fix: runSymfonyConsoleCommand ignores specific options in https://github.com/Codeception/module-symfony/pull/188 + + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.1...3.3.2 + + +### module-symfony 3.3.1: 3.3.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/15 20:36:03 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Renaming Doctrine2 to Doctrine by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/184 +* Ignore fragments when checking routes by **[cs278](https://github.com/cs278)** in https://github.com/Codeception/module-symfony/pull/185 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.0...3.3.1 + + +### Codeception 5.1.2: 5.1.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/03/07 07:22:27 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Prevent unrelated error from being displayed if a scenario step has failed by **[craig-mcmahon](https://github.com/craig-mcmahon)** in [#6743](https://github.com/Codeception/Codeception/issues/6743) +* Replace Laravel5 with Laravel module in module installation suggestion by **[W0rma](https://github.com/W0rma)** in [#6742](https://github.com/Codeception/Codeception/issues/6742) + + +### module-db 3.1.3: 3.1.3 + +Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2024/03/04 19:29:12 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed +* [bugfix] [#49](https://github.com/Codeception/module-db/issues/49) Fix last insert id return type in case of dblib (3.x) by **[szhajdu](https://github.com/szhajdu)** in https://github.com/Codeception/module-db/pull/56 + +## New Contributors +* **[szhajdu](https://github.com/szhajdu)** made their first contribution in https://github.com/Codeception/module-db/pull/56 + +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.2...3.1.3 + + +### Codeception 5.1.1: 5.1.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/23 21:53:22 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Reimplemented coverage:exclude option for PHPUnit 11 in [#6739](https://github.com/Codeception/Codeception/issues/6739) +* Improved output of Bootstrap command by **[ThomasLandauer](https://github.com/ThomasLandauer)** in [#6735](https://github.com/Codeception/Codeception/issues/6735) + + ### module-doctrine 3.1.0: 3.1.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/02/17 22:38:06 / [Repository](https://github.com/Codeception/module-doctrine) / [Releases](https://github.com/Codeception/module-doctrine/releases) @@ -267,189 +588,440 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dependency on PHPUnit -### module-yii2 1.1.10: 1.1.10 +### lib-web 1.0.6: 1.0.6 -Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2024/01/10 05:57:11 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/06 20:50:54 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) -- [#93](https://github.com/Codeception/module-yii2/issues/93): Fix symfony/browser-kit incompatibility (@jafaripur) -- [#91](https://github.com/Codeception/module-yii2/issues/91): Fix parallel sessions with `$I->haveFriend()` when no session is active (@michaelarnauts) +* Support PHPUnit 11 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-web/pull/11 +* Adding details to `grabAttributeFrom()` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/10 -### module-phpbrowser 3.0.1: 3.0.1 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:46:06 / [Repository](https://github.com/Codeception/module-phpbrowser) / [Releases](https://github.com/Codeception/module-phpbrowser/releases) +### Codeception 5.1.0: 5.1.0 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/04 13:52:44 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) -* Support for symfony/browser-kit v7 +* Support PHPUnit 11 + +Note: PHPUnit 11 does not support excluding files from code coverage report -### lib-xml 1.0.2: 1.0.2 +### lib-innerbrowser 4.0.3: 4.0.3 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:33:31 / [Repository](https://github.com/Codeception/lib-xml) / [Releases](https://github.com/Codeception/lib-xml/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/02/02 20:37:41 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) -* Support symfony/css-selector v7 +* Support PHPUnit 11 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-innerbrowser/pull/67 -### module-filesystem 3.0.1: 3.0.1 +### lib-web 1.0.5: 1.0.5 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:24:04 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2024/01/13 11:56:59 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) -* Support symfony/finder v7 +* Fixing Markdown Code Syntax by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/9 -### module-mezzio 4.0.2: 4.0.2 +### module-db 3.1.2: 3.1.2 -Released by [![](https://avatars.githubusercontent.com/u/152236?v=4&s=16) Slamdunk](https://github.com/Slamdunk) on 2023/09/22 05:57:54 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) +Released by [![](https://avatars.githubusercontent.com/u/1256298?v=4&s=16) sergeyklay](https://github.com/sergeyklay) on 2024/01/12 08:19:37 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) ## What's Changed -* Added support for diactoros v3. by **[luiscunhaafricainternetgroup](https://github.com/luiscunhaafricainternetgroup)** in https://github.com/Codeception/module-mezzio/pull/17 +* Fix Db::executeQuery() for null parameter by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-db/pull/63 ## New Contributors -* **[luiscunhaafricainternetgroup](https://github.com/luiscunhaafricainternetgroup)** made their first contribution in https://github.com/Codeception/module-mezzio/pull/17 +* **[W0rma](https://github.com/W0rma)** made their first contribution in https://github.com/Codeception/module-db/pull/63 -**Full Changelog**: https://github.com/Codeception/module-mezzio/compare/4.0.1...4.0.2 +**Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.1...3.1.2 -### module-yii2 1.1.9: 1.1.9 +### module-symfony 3.3.0: 3.3.0 -Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2023/06/16 03:52:10 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/11 22:17:26 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) -- [#85](https://github.com/Codeception/module-yii2/issues/85): Fix the case for "yii" namespace in phpdoc (@ilyaplot) -- [#86](https://github.com/Codeception/module-yii2/issues/86): Use correct type declaration for amOnPage method (@erickskrauch) -- [#88](https://github.com/Codeception/module-yii2/issues/88): Enable object override to InitDbFixture during FixturesStore initialization (@PoohOka) +## What's Changed +* Improved support for PHP 8.1, removed support for PHP 8.0 +* Symfony 6.4 Support ( https://github.com/Codeception/module-symfony/pull/177 ) +* Fix return type of `grabSecurityService` for compatibility with Symfony 7.0 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-symfony/pull/178 +* Test on Symfony 7.0 ( https://github.com/Codeception/module-symfony/pull/180 ) +* Minor formating by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/179 + + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.2.0...3.3.0 -### module-doctrine2 3.0.3: 3.0.3 +### module-yii2 1.1.10: 1.1.10 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 19:38:46 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) +Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2024/01/10 05:57:11 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) -* Adding recommendation for Symfony users by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/69 +- [#93](https://github.com/Codeception/module-yii2/issues/93): Fix symfony/browser-kit incompatibility (@jafaripur) +- [#91](https://github.com/Codeception/module-yii2/issues/91): Fix parallel sessions with `$I->haveFriend()` when no session is active (@michaelarnauts) -### module-doctrine2 3.0.2: 3.0.2 +### module-symfony 3.2.0: 3.2.0 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/18 18:36:57 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/02 03:14:29 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) -* Documentation updates [#67](https://github.com/Codeception/module-doctrine2/issues/67) and [#68](https://github.com/Codeception/module-doctrine2/issues/68) by **[ThomasLandauer](https://github.com/ThomasLandauer)** +## What's Changed +* Deprecate event triggered assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/169 +* Update event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/168 +* Add seeEvent/dontSeeEvent event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/173 +* Various improvements by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/171 +* EventsAssertionsTrait refactor and Symfony 6.3 Support by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/175 + +## New Contributors +* **[xEdelweiss](https://github.com/xEdelweiss)** made his first contribution in https://github.com/Codeception/module-symfony/pull/169 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.1.1...3.2.0 -### module-rest 2.0.3: 2.0.3 +### Codeception 5.0.13: 5.0.13 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/10 19:24:26 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/22 19:46:56 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) -* Support softcreatr/jsonpath ^0.8 +* Add actor to Cest tests dataProviders by **[weeg](https://github.com/weeg)** in [#6696](https://github.com/Codeception/Codeception/issues/6696) +* Support symfony 7 by **[W0rma](https://github.com/W0rma)** in [#6723](https://github.com/Codeception/Codeception/issues/6723) +* Avoid infinite loop while waiting for all running tests to finish by **[MarcelBolten](https://github.com/MarcelBolten)** in [#6710](https://github.com/Codeception/Codeception/issues/6710) +* Add missing "Attribute::IS_REPEATABLE" to DataProvider attribute by **[Fahl-Design](https://github.com/Fahl-Design)** in [#6715](https://github.com/Codeception/Codeception/issues/6715) +* Support binary data intest examples by **[pongee](https://github.com/pongee)** in [#6708](https://github.com/Codeception/Codeception/issues/6708) +* Improve rendering of $I->assertThat step by **[jtheuerkauf](https://github.com/jtheuerkauf)** in [#6719](https://github.com/Codeception/Codeception/issues/6719) -### module-yii2 1.1.8: 1.1.8 +### module-phpbrowser 3.0.1: 3.0.1 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:54:49 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:46:06 / [Repository](https://github.com/Codeception/module-phpbrowser) / [Releases](https://github.com/Codeception/module-phpbrowser/releases) -* Fix last commit error by **[sunnyphp](https://github.com/sunnyphp)** in https://github.com/Codeception/module-yii2/pull/73 -* update links by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-yii2/pull/75 -* PHP 8.1: parse_str(): Passing null to parameter `[#1](https://github.com/Codeception/module-yii2/issues/1)` ($string) of type string is deprecated by **[uaoleg](https://github.com/uaoleg)** in https://github.com/Codeception/module-yii2/pull/80 -* Upgrade dependencies to support PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/module-yii2/pull/82 +* Support for symfony/browser-kit v7 -### lib-asserts 2.1.0: 2.1.0 +### lib-xml 1.0.2: 1.0.2 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:37:43 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:33:31 / [Repository](https://github.com/Codeception/lib-xml) / [Releases](https://github.com/Codeception/lib-xml/releases) -* Reimplement property assertions removed from PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-asserts/pull/12 -* Use FQN in PHPDoc type hints for classes and interfaces by **[Sweetchuck](https://github.com/Sweetchuck)** in https://github.com/Codeception/lib-asserts/pull/11 - - +* Support symfony/css-selector v7 +### module-filesystem 3.0.1: 3.0.1 -### module-rest 3.3.2: 3.3.2 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/08 19:24:04 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 18:16:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) +* Support symfony/finder v7 -* Reverted method signature changes accidentally released in 3.3.1 +### lib-web 1.0.4: 1.0.4 -### module-mezzio 4.0.1: 4.0.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:38:48 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:57:42 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) +* Support Symfony 7 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-web/pull/8 -* Support codeception/lib-innerbrowser v4 +### module-db 3.1.1: 3.1.1 -### module-laravel 3.1.1: 3.1.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:34:57 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:44:51 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) +* Fix dump loading (adds advice to increase pcre.backtrack_limit) by **[rizort](https://github.com/rizort)** in https://github.com/Codeception/module-db/pull/46 +* [bugfix] [#47](https://github.com/Codeception/module-db/issues/47) Malformed UTF-8 characters, possibly incorrectly encoded by **[cybd](https://github.com/cybd)** in https://github.com/Codeception/module-db/pull/48 -* Support codeception/lib-innerbrowser v4 +### lib-innerbrowser 4.0.2: 4.0.2 -### module-lumen 3.0.1: 3.0.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/01 11:28:55 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:43:17 / [Repository](https://github.com/Codeception/module-lumen) / [Releases](https://github.com/Codeception/module-lumen/releases) +* Support Symfony 7.x by **[pfuhrmann](https://github.com/pfuhrmann)** in https://github.com/Codeception/lib-innerbrowser/pull/66 -* Support codeception/lib-innerbrowser v4 +### lib-web 1.0.3: 1.0.3 -### module-laminas 3.0.2: 3.0.2 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/11/27 06:43:46 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:36:25 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) +* Minor: Newer array syntax by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/6 -* Support codeception/lib-innerbrowser v4 -### module-rest 3.3.1: 3.3.1 +### lib-innerbrowser 4.0.1: 4.0.1 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:26:47 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/11/16 16:25:42 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) -* Support codeception/lib-innerbrowser v4 +* Use FQN for public methods by **[erickskrauch](https://github.com/erickskrauch)** in https://github.com/Codeception/lib-innerbrowser/pull/63 +* Fix numeric key in form by **[janfejtek](https://github.com/janfejtek)** in https://github.com/Codeception/lib-innerbrowser/pull/64 -### module-doctrine2 3.0.1: 3.0.1 +### Codeception 5.0.12: 5.0.12 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:55:15 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/10/15 18:28:39 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) -* Fix deprecated string interpolation by **[Kolyunya](https://github.com/Kolyunya)** in https://github.com/Codeception/module-doctrine2/pull/59 +* Wait for all tests to finish before accessing the serialized test results by **[MarcelBolten](https://github.com/MarcelBolten)** in [#6702](https://github.com/Codeception/Codeception/issues/6702) +* Updated Support Ukraine link in version string -### module-webdriver 4.0.0: 4.0.0 +### module-mezzio 4.0.2: 4.0.2 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 22:06:31 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) +Released by [![](https://avatars.githubusercontent.com/u/152236?v=4&s=16) Slamdunk](https://github.com/Slamdunk) on 2023/09/22 05:57:54 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) + + + +## What's Changed +* Added support for diactoros v3. by **[luiscunhaafricainternetgroup](https://github.com/luiscunhaafricainternetgroup)** in https://github.com/Codeception/module-mezzio/pull/17 + +## New Contributors +* **[luiscunhaafricainternetgroup](https://github.com/luiscunhaafricainternetgroup)** made their first contribution in https://github.com/Codeception/module-mezzio/pull/17 + +**Full Changelog**: https://github.com/Codeception/module-mezzio/compare/4.0.1...4.0.2 + + +### Codeception 5.0.11: 5.0.11 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/08/22 06:53:38 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* fix sharding for empty tests file by **[SamMousa](https://github.com/SamMousa)** in https://github.com/Codeception/Codeception/pull/6667 +* Add AllowDynamicProperties attribute to Unit by **[erickskrauch](https://github.com/erickskrauch)** in https://github.com/Codeception/Codeception/pull/6666 +* Include mock expectations in assertion count by **[rene-bos](https://github.com/rene-bos)** in https://github.com/Codeception/Codeception/pull/6672 +* Allow multiple test dependencies by **[mbrodala](https://github.com/mbrodala)** in https://github.com/Codeception/Codeception/pull/6676 +* Fix JUnitReporter compatibility with PHPUnit 10.3 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/Codeception/pull/6685 + +## New Contributors +* **[rene-bos](https://github.com/rene-bos)** made their first contribution in https://github.com/Codeception/Codeception/pull/6672 +* **[mbrodala](https://github.com/mbrodala)** made their first contribution in https://github.com/Codeception/Codeception/pull/6676 + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.0.10...5.0.11 + + +### module-phalcon5 v2.0.1: v2.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2023/08/03 17:54:06 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) + + + +Fixed getRawBody() return type [[#8](https://github.com/Codeception/module-phalcon5/issues/8)](https://github.com/Codeception/module-phalcon5/issues/8) + + +### module-yii2 1.1.9: 1.1.9 + +Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2023/06/16 03:52:10 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) + + + +- [#85](https://github.com/Codeception/module-yii2/issues/85): Fix the case for "yii" namespace in phpdoc (@ilyaplot) +- [#86](https://github.com/Codeception/module-yii2/issues/86): Use correct type declaration for amOnPage method (@erickskrauch) +- [#88](https://github.com/Codeception/module-yii2/issues/88): Enable object override to InitDbFixture during FixturesStore initialization (@PoohOka) + + +### lib-web 1.0.2: 1.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 20:33:22 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Mentioning `` tag requirement by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/4 + + +### module-doctrine2 3.0.3: 3.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 19:38:46 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +* Adding recommendation for Symfony users by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/69 + + +### module-doctrine2 3.0.2: 3.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/18 18:36:57 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +* Documentation updates [#67](https://github.com/Codeception/module-doctrine2/issues/67) and [#68](https://github.com/Codeception/module-doctrine2/issues/68) by **[ThomasLandauer](https://github.com/ThomasLandauer)** + + +### Codeception 5.0.10: 5.0.10 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/14 07:27:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* JUnitReporter: Fixed compatibility with PHPUnit 10.0.16 [#6656](https://github.com/Codeception/Codeception/issues/6656) +* Recorder extension: Fixed type error [#6643](https://github.com/Codeception/Codeception/issues/6643) by **[thomashohn](https://github.com/thomashohn)** +* Validate test filter pattern without warning [#6641](https://github.com/Codeception/Codeception/issues/6641) by **[dmitryuk](https://github.com/dmitryuk)** + + +### module-rest 2.0.3: 2.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/10 19:24:26 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) + + + +* Support softcreatr/jsonpath ^0.8 + + +### Codeception 5.0.9: 5.0.9 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/11 14:42:09 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* JUnitReporter: Do not set 'useless' testsuite attribute in strict mode [#6635](https://github.com/Codeception/Codeception/issues/6635) by **[gileri](https://github.com/gileri)** +* Fixed static $defaultName deprecated in _completion command [#6633](https://github.com/Codeception/Codeception/issues/6633) by **[dmitryuk](https://github.com/dmitryuk)** +* Replaced object property assertions removed from PHPUnit 10 + + + +### module-yii2 1.1.8: 1.1.8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:54:49 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) + + + +* Fix last commit error by **[sunnyphp](https://github.com/sunnyphp)** in https://github.com/Codeception/module-yii2/pull/73 +* update links by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-yii2/pull/75 +* PHP 8.1: parse_str(): Passing null to parameter `[#1](https://github.com/Codeception/module-yii2/issues/1)` ($string) of type string is deprecated by **[uaoleg](https://github.com/uaoleg)** in https://github.com/Codeception/module-yii2/pull/80 +* Upgrade dependencies to support PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/module-yii2/pull/82 + + + +### lib-asserts 2.1.0: 2.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:37:43 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) + + + +* Reimplement property assertions removed from PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-asserts/pull/12 +* Use FQN in PHPDoc type hints for classes and interfaces by **[Sweetchuck](https://github.com/Sweetchuck)** in https://github.com/Codeception/lib-asserts/pull/11 + + + + + +### module-rest 3.3.2: 3.3.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 18:16:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) + + + +* Reverted method signature changes accidentally released in 3.3.1 + + +### module-soap 3.0.1: 3.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 07:08:01 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) + + + +* Updated dependencies + + +### module-mezzio 4.0.1: 4.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:57:42 / [Repository](https://github.com/Codeception/module-mezzio) / [Releases](https://github.com/Codeception/module-mezzio/releases) + + + +* Support codeception/lib-innerbrowser v4 + + +### module-laravel 3.1.1: 3.1.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:44:51 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) + + + +* Support codeception/lib-innerbrowser v4 + + +### module-lumen 3.0.1: 3.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:43:17 / [Repository](https://github.com/Codeception/module-lumen) / [Releases](https://github.com/Codeception/module-lumen/releases) + + + +* Support codeception/lib-innerbrowser v4 + + +### module-laminas 3.0.2: 3.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:36:25 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) + + + +* Support codeception/lib-innerbrowser v4 + + +### module-rest 3.3.1: 3.3.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 06:26:47 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) + + + +* Support codeception/lib-innerbrowser v4 + + +### module-doctrine2 3.0.1: 3.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:55:15 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +* Fix deprecated string interpolation by **[Kolyunya](https://github.com/Kolyunya)** in https://github.com/Codeception/module-doctrine2/pull/59 + + +### module-symfony 3.1.1: 3.1.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:50:11 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* Allow installation of lib-innerbrowser v4 to support PHPUnit 10. + + +### module-webdriver 4.0.0: 4.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 22:06:31 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) + + + +* Supports PHPUnit 10 + + +### Codeception 5.0.8: 5.0.8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 21:58:10 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -465,6 +1037,29 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * 3.x versions are compatible with PHPUnit 9 only +### lib-innerbrowser 4.0.0: 4.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/03 19:33:48 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Support for PHPUnit 10 + + +### Codeception 5.0.7: 5.0.7 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/01/14 20:06:31 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Disabled phpcs checks in generated action files [#6621](https://github.com/Codeception/Codeception/issues/6621) +* `$I->wantTo()` no longer changes test title at runtime [#6622](https://github.com/Codeception/Codeception/issues/6622) +* Display correct failed step when failures and errors happened during test run [#6623](https://github.com/Codeception/Codeception/issues/6623) +* Fixed indentation of `step_decorators` in config files generated by `bootstrap` [#6624](https://github.com/Codeception/Codeception/issues/6624) +* Enabled `Conditional`, `Retry` and `tryTo` decorators in acceptance suite generated by `bootstrap` [#6624](https://github.com/Codeception/Codeception/issues/6624) +* Improved handling of anonymous classes in parser [#6626](https://github.com/Codeception/Codeception/issues/6626) + + ### module-redis 3.1.0: 3.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/01/13 21:20:53 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -483,6 +1078,55 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Unset SHELL_VERBOSITY environment variable before execution of command [#13](https://github.com/Codeception/module-cli/issues/13) +### Codeception 5.0.6: 5.0.6 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/12/28 14:20:04 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Fixed `canSee` assertions in Unit format [#6610](https://github.com/Codeception/Codeception/issues/6610) +* `tryTo` methods must return boolean result [#6614](https://github.com/Codeception/Codeception/issues/6614) +* Fixed various issues with handling of `@skip` and `@incomplete` annotations and attributes in Cest format [#6617](https://github.com/Codeception/Codeception/issues/6617) +* Stopped adding `__mocked` field to mocks created by Stub library [#6620](https://github.com/Codeception/Codeception/issues/6620) +* Fixed deprecated string syntax in Run command [#6618](https://github.com/Codeception/Codeception/issues/6618) by **[shtiher-pp](https://github.com/shtiher-pp)** + + +### module-db 3.1.0: 3.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/12/03 10:23:12 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +* Implemented `grabEntryFromDatabase` and `grabEntriesFromDatabase` methods by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/43 +* Improved handling of auto_increment field in `haveInDatabase` tear down by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/44 +* Add docker elements to ease local testing by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/42 + + + +### module-db 2.1.0: 2.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/12/03 10:22:30 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +* Implemented `grabEntryFromDatabase` and `grabEntriesFromDatabase` methods by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/43 +* Improved handling of auto_increment field in `haveInDatabase` tear down by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/44 +* Add docker elements to ease local testing by **[JesusTheHun](https://github.com/JesusTheHun)** in https://github.com/Codeception/module-db/pull/42 + + + +### Codeception 5.0.5: 5.0.5 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/11/20 11:33:41 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Don't disable test shuffling when --shard option is used ([#6605](https://github.com/Codeception/Codeception/issues/6605)) +* Provided typed signatures for attributes ([#6600](https://github.com/Codeception/Codeception/issues/6600)) by **[mdoelker](https://github.com/mdoelker)** +* Support for Attributes in generated Actions files ([#6593](https://github.com/Codeception/Codeception/issues/6593)) by **[yesdevnull](https://github.com/yesdevnull)** +* Fixed expectNotToPerformAssertions in unit tests ([#6602](https://github.com/Codeception/Codeception/issues/6602)) by **[yesdevnull](https://github.com/yesdevnull)** + + ### module-laminas 3.0.1: 3.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/11/20 11:03:09 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -514,6 +1158,20 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### Codeception 5.0.4: 5.0.4 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/10/30 19:21:03 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Execute FailFast subscriber before module _failed hooks [#6586](https://github.com/Codeception/Codeception/issues/6586) by **[yesdevnull](https://github.com/yesdevnull)** +* Fixed parsing of **[skip](https://github.com/skip)** annotation [#6596](https://github.com/Codeception/Codeception/issues/6596) +* Undeprecated untyped method arguments in Cest format [#6591](https://github.com/Codeception/Codeception/issues/6591) +* Removed unnecessary overrides of $resultAggregator property in Unit format and TestCaseWrapper [#6590](https://github.com/Codeception/Codeception/issues/6590) +* Print failure/error/warning/skipped/incomplete messages in HTML reports [#6595](https://github.com/Codeception/Codeception/issues/6595) +* Fixed counting of successful tests [#6595](https://github.com/Codeception/Codeception/issues/6595) + + ### module-webdriver 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/10/15 19:26:14 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -523,6 +1181,33 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Optionally suppress cookie debug output in seeCookie(), dontSeeCookie(), resetCookie() and loadSessionSnapshot() methods by **[lolli42](https://github.com/lolli42)** in https://github.com/Codeception/module-webdriver/pull/111 +### lib-innerbrowser 3.1.3: 3.1.3 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/10/03 15:36:06 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +## What's Changed +* fix: checkbox handling by **[SamMousa](https://github.com/SamMousa)** in https://github.com/Codeception/lib-innerbrowser/pull/60 + + +**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/3.1.2...3.1.3 + + +### Codeception 5.0.3: 5.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/09/30 15:48:28 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Fixed passing test result to dependent tests in unit tests ([#6580](https://github.com/Codeception/Codeception/issues/6580)) +* Fixed `TypeError` when **[coversNothing](https://github.com/coversNothing)** annotation is used by Slamdunk ([#6582](https://github.com/Codeception/Codeception/issues/6582)) +* `codecept init unit` creates `tests/Support` directory ([#6578](https://github.com/Codeception/Codeception/issues/6578)) +* Fixed phar file url in `self-update` command by **[voku](https://github.com/voku)** ([#6563](https://github.com/Codeception/Codeception/issues/6563)) +* Added message how to exit Codeception console by **[ThomasLandauer](https://github.com/ThomasLandauer)** ([#6561](https://github.com/Codeception/Codeception/issues/6561)) +* Improved compatibility with PHPUnit 10 + + ### lib-asserts 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/09/27 06:20:36 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) @@ -579,6 +1264,39 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Improved handling of boolean and null values in xpath methods ([#88](https://github.com/Codeception/module-rest/issues/88)) by **[pamoller](https://github.com/pamoller)** +### Codeception 5.0.2: 5.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/08/20 18:24:07 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Fixed remote code coverage for namespaced suites ([#6533](https://github.com/Codeception/Codeception/issues/6533)) +* Fixed data provider in abstract Cest class **[p-golovin](https://github.com/p-golovin)** ([#6560](https://github.com/Codeception/Codeception/issues/6560)) +* Fixed issue when include groups and test groups empty **[geega](https://github.com/geega)** ([#6557](https://github.com/Codeception/Codeception/issues/6557)) + + +### Codeception 5.0.1: 5.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/08/13 16:49:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Propagate --ext and --override parameters to included test suites by **[calvinalkan](https://github.com/calvinalkan)** ([#6536](https://github.com/Codeception/Codeception/issues/6536)) +* Fixed false negative message about stecman/symfony-console-completion package by **[geega](https://github.com/geega)** ([#6541](https://github.com/Codeception/Codeception/issues/6541)) +* Fixed a number of issues in template functionality ([#6552](https://github.com/Codeception/Codeception/issues/6552)) +* Fixed DataProvider, to properly load dataProviders from abstract classes by **[Basster](https://github.com/Basster)** ([#6549](https://github.com/Codeception/Codeception/issues/6549)) + + +### Codeception 4.2.2: 4.2.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/08/13 13:56:22 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Propagate --ext and --override parameters to included test suites ([#6536](https://github.com/Codeception/Codeception/issues/6536)) +* Fixed false negative message about stecman/symfony-console-completion package ([#6541](https://github.com/Codeception/Codeception/issues/6541)) + + ### module-rest 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/08/13 12:18:30 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -607,6 +1325,86 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * 2.5 branch makes Codeception 5 compatible with Symfony 4.4 components +### Codeception 5.0.0: 5.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/28 08:41:10 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +#### 5.0.0 + +[Blog post](https://codeception.com/07-28-2022/codeception-5.html) + +Summary of all differences from Codeception 4 + +##### Added + +* Basic attribute support +* `--shard`, `--grep`, `--filter` options +* Test can be filtered by data provider case number or name +* Tests of all formats are reported as useless if they perform no assertions and `reports_useless_tests` setting is enabled +* Array of variables can be passed to all `pause` functions/methods +* Dynamic configuration with parameters can use arrays and other non-string types ([#6409](https://github.com/Codeception/Codeception/issues/6409)) +* `codecept_pause` function and `$this->pause()` in unit tests ([#6387](https://github.com/Codeception/Codeception/issues/6387)) +* Interactive console is executed in the scope of paused test class. +* New code coverage settings: + - `path_coverage` - enables path and branch coverage + - `strict_covers_annotation` - marks test as risky if it has `@covers` annotation but executes some other code + - `ignore_deprecated_code` - doesn't collect code coverage for code having `@deprecated` annotation + - `disable_code_coverage_ignore` - ignores `@codeCoverageIgnore`, `@codeCoverageIgnoreStart` and `@codeCoverageIgnoreEnd` annotations +* Optional value to `fail-fast` option +* Dynamic configuration with parameters can use arrays and other non-string types + +##### Changed + +* PHPUnit is no longer the engine of Codeception, but TestCase format is still supported and assertions are still used +* Generators create namespaced test suites by default +* Replaced Hoa Console with PsySH in `codecept console` +* Used Symfony VarDumper in `codecept_debug` +* Fixed DotReporter output format +* Module `after` and `failed` hooks are executed in reverse order +* Introduced strict typing and other features of PHP 7 and 8. +* Cest format can use data providers from other classes +* Fixed injecting dependencies to actor in Cest and Gherkin formats [#6506](https://github.com/Codeception/Codeception/issues/6506) +* Variadic parameters can be skipped in dependency injection [#6505](https://github.com/Codeception/Codeception/issues/6505) +* Deprecated untyped method arguments in Cest format [#6521](https://github.com/Codeception/Codeception/issues/6521) + +##### Removed + +* `JSON` and `TAP` report formats +* Code coverage blacklist functionality +* `generate:cept` command (`Cept` format itself is deprecated) +* Deprecated class aliases: + - Codeception\TestCase\Test + - Codeception\Platform\Group + - Codeception\Platform\Group + - Codeception\TestCase +* Settings + - `log_incomplete_skipped` + - `paths.log` (replaced by `paths.output`) + - Suite setting `class_name` (replaced by `actor`) + - Global setting `actor` (replaced by `actor_prefix`) +* `Configuration::logDir` method (replaced by `Configuration::outputDir` in 2.0) +* Custom reporters implementing TestListener are no longer supported and must be converted to Extensions + +##### Supported versions + +* PHP 8 +* PHPUnit 9 (prepared for upcoming PHPUnit 10) +* Symfony 4.4 - 6.x + + +### Codeception 5.0.0-RC8: 5.0.0-RC8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/28 08:25:46 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Deprecated untyped method arguments in Cest format [#6521](https://github.com/Codeception/Codeception/issues/6521) +* Improved code style of generated files [#6522](https://github.com/Codeception/Codeception/issues/6522) +* Removed "Powered by PHPUnit" message [#6520](https://github.com/Codeception/Codeception/issues/6520) + + ### module-webdriver 3.1.2: 3.1.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/27 09:10:01 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -625,6 +1423,25 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fix type error in PHP 8.1 when converting ms to sec [#103](https://github.com/Codeception/module-webdriver/issues/103) +### Codeception 5.0.0-RC7: 5.0.0-RC7 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/22 05:52:09 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Fixed injecting dependencies to actor in Cest and Gherkin formats [#6506](https://github.com/Codeception/Codeception/issues/6506) +* Variadic parameters can be skipped in dependency injection [#6505](https://github.com/Codeception/Codeception/issues/6505) + + +### module-datafactory 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/18 16:39:04 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + +* Support for Codeception 5.0 + + ### module-yii2 1.1.7: 1.1.7 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/15 18:10:54 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -634,6 +1451,62 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fix compatibility with Codeception 5.0.0-RC6 [#72](https://github.com/Codeception/module-yii2/issues/72) +### Codeception 5.0.0-RC6: 5.0.0-RC6 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/12 07:13:56 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Added new attributes (Prepare, Env, BeforeClass,AfterClass, Given, When, Then) +* Class level attributes are applied to all methods +* Codeception attributes are supported in unit tests +* Cest format can use data providers from other classes + + + +### Codeception 5.0.0-RC5: 5.0.0-RC5 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/28 06:42:39 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Substitute invalid UTF-8 characters in debug and step output by **[SamoylenkoSU](https://github.com/SamoylenkoSU)** ([#6483](https://github.com/Codeception/Codeception/issues/6483)) + + +### Codeception 5.0.0-RC4: 5.0.0-RC4 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/22 07:03:20 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Implemented basic attribute support ([#6449](https://github.com/Codeception/Codeception/issues/6449)) by **[DavertMik](https://github.com/DavertMik)** +* Significantly reduced dependencies on PHPUnit +* Replaced PHPUnit\Framework\TestResult with ResultAggregator +* Added assertionCount method to ResultAggregator +* DotReporter prints standard result summary ([#6441](https://github.com/Codeception/Codeception/issues/6441)) by **[Orchestrator404](https://github.com/Orchestrator404)** +* Fixed DotReporter output format +* Fixed fetching remote code coverage data ([#6448](https://github.com/Codeception/Codeception/issues/6448)) +* Loading .env file must not override existing environment variables ([#6477](https://github.com/Codeception/Codeception/issues/6477)) +* All changes from 4.2.0 and 4.2.1: + * Improved multi-application experience, allow filtering suites by name ([#6435](https://github.com/Codeception/Codeception/issues/6435)) by **[calvinalkan](https://github.com/calvinalkan)** + * Configuration override is passed to included suites ([#5978](https://github.com/Codeception/Codeception/issues/5978)) by **[calvinalkan](https://github.com/calvinalkan)** + * Made dry-run command work with module methods having return types ([#6470](https://github.com/Codeception/Codeception/issues/6470)) + * Support for expectError/Warning/Notice/Deprecation methods in unit tests (Requires PHPUnit 8.4+) + * Implemented new setting `convert_deprecations_to_exceptions` ([#6469](https://github.com/Codeception/Codeception/issues/6469)) + * Action file generator: Do not return when return type is never ([#6462](https://github.com/Codeception/Codeception/issues/6462)) + * Execute setupBeforeClass/tearDownAfterClass only once ([#6481](https://github.com/Codeception/Codeception/issues/6481)) + + +### Codeception 4.2.1: 4.2.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/22 06:26:08 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Execute setupBeforeClass/tearDownAfterClass only once ([#6481](https://github.com/Codeception/Codeception/issues/6481)) +* Handle action with intersection return type correctly in dry-run command + + ### module-yii2 1.1.6: 1.1.6 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2022/06/21 11:05:32 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -645,6 +1518,44 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark +### Codeception 4.2.0: 4.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/16 05:51:13 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Improved multi-application experience, allow filtering suites by name ([#6435](https://github.com/Codeception/Codeception/issues/6435)) by **[calvinalkan](https://github.com/calvinalkan)** +* Configuration override is passed to included suites ([#5978](https://github.com/Codeception/Codeception/issues/5978)) by **[calvinalkan](https://github.com/calvinalkan)** +* Made dry-run command work with module methods having return types ([#6470](https://github.com/Codeception/Codeception/issues/6470)) +* Support for expectError/Warning/Notice/Deprecation methods in unit tests (Requires PHPUnit 8.4+) +* Implemented new setting `convert_deprecations_to_exceptions` ([#6469](https://github.com/Codeception/Codeception/issues/6469)) +* Action file generator: Do not return when return type is never ([#6462](https://github.com/Codeception/Codeception/issues/6462)) +* Backported test.useless event from Codeception 5.0 ([#6459](https://github.com/Codeception/Codeception/issues/6459)) + + +### module-phalcon5 v2.0.0: v2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2022/06/03 15:20:26 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) + + + +Supports PHP versions: 8.0, 8.1 + +* Use of Codeception v5+ +* Use of Phalcon 5.0.0RC1+ +* Corrected namespaces +* Cosmetic changes + + +### module-sequence 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/05/31 05:48:59 / [Repository](https://github.com/Codeception/module-sequence) / [Releases](https://github.com/Codeception/module-sequence/releases) + + + +* Support for Codeception 5 + + ### module-queue 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/05/30 06:22:13 / [Repository](https://github.com/Codeception/module-queue) / [Releases](https://github.com/Codeception/module-queue/releases) @@ -663,6 +1574,19 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Declared more types in method signatures +### module-symfony 3.1.0: 3.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2022/05/27 22:41:40 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Symfony 6.0 support: Session Assertions by **[semaz](https://github.com/semaz)** in https://github.com/Codeception/module-symfony/pull/157 and **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/158 +* Symfony 6.0 Support: Form Assertions by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/158 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.0.0...3.1.0 + + ### module-mongodb 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/05/27 06:42:29 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -750,6 +1674,18 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Updated dependencies +### Codeception 5.0.0-RC3: 5.0.0-RC3 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/22 10:32:33 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Fix incorrect type declaration in InitTemplate by **[ziadoz](https://github.com/ziadoz)** +* Stricter check for phpdotenv v5 (older versions are not supported) +* Throw exception if actor setting is missing in suite configuration +* Use correct types in ParamsLoader and Configuration classes, avoid type errors + + ### module-laravel 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/20 10:13:08 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) @@ -760,6 +1696,16 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Only Laravel 8 is supported +### lib-innerbrowser 3.1.2: 3.1.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/09 08:51:34 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays +* Fixed formatting of Crawler and CrawlerNot constraint failure messages + + ### module-webdriver 3.1.1: 3.1.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/09 08:33:11 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -769,6 +1715,33 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays +### lib-web 1.0.1: 1.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/09 08:19:47 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + +* Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays and match seeCheckboxIsChecked + + +### Codeception 5.0.0-RC2: 5.0.0-RC2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/08 07:05:05 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Added `--shard`, `--grep`, `--filter` options ([#6399](https://github.com/Codeception/Codeception/issues/6399)) +* Added new code coverage settings ([#6423](https://github.com/Codeception/Codeception/issues/6423)) +* Dynamic configuration with parameters can use arrays and other non-string types ([#6409](https://github.com/Codeception/Codeception/issues/6409)) +* Introduced `codecept_pause` function and `$this->pause()` in unit tests ([#6387](https://github.com/Codeception/Codeception/issues/6387)) +* Interactive console is executed in the scope of paused test class. +* Array of variables can be passed to all `pause` functions/methods +* Replaced Hoa Console with PsySH in `codecept console` +* Used Symfony VarDumper in `codecept_debug` ([#6406](https://github.com/Codeception/Codeception/issues/6406)) +* Fixed type error in code coverage exclude filter by **[W0rma](https://github.com/W0rma)** +* Fix type error in Recorder extension + + ### module-rest 2.0.2: 2.0.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/30 05:43:05 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -796,70 +1769,192 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support for Codeception 5 -### module-amqp 3.0.0: 3.0.0 +### module-amqp 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/20 09:26:33 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) + + + +* Support for Codeception 5, thanks to **[W0rma](https://github.com/W0rma)** + + +### module-symfony 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/16 08:53:07 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* Support for Codeception 5 + + +### module-filesystem 2.0.2: 2.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:52:49 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) + + + +* Improved error handling [#19](https://github.com/Codeception/module-filesystem/issues/19) + + +### module-filesystem 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:51:07 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) + + + +* Support for Codeception 5 + + +### Codeception 5.0.0-RC1: 5.0.0-RC1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/13 18:42:02 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +* Use PHPUnit 9 until PHPUnit 10 is released. +* Read about earlier change in [CHANGELOG](https://github.com/Codeception/Codeception/blob/5.0/CHANGELOG-5.x.md). + + +### module-webdriver 3.1.0: 3.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 17:08:21 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) + + + +* Moved WebDriver constraints from codeception/codeception +* Moved code shared with lib-innerbrowser to codeception/lib-web +* Improved code style + + +### module-soap 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 16:39:18 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) + + + +* Compatibility with Codeception 5 +* Uses lib-xml + + +### module-rest 3.1.0: 3.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 11:00:56 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) + + + +* Moved JSON constraints from codeception/codeception to module-rest +* XML related code shared with SOAP module was moved to codeception/lib-xml + + +### lib-innerbrowser 3.1.1: 3.1.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 10:36:11 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Fix constraint names + + +### lib-innerbrowser 3.1.0: 3.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 10:18:41 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Extracted constraints , exception and interfaces shared with module-webdriver to codeception/lib-web + + +### lib-xml 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 10:04:52 / [Repository](https://github.com/Codeception/lib-xml) / [Releases](https://github.com/Codeception/lib-xml/releases) + + + + + + +### lib-web 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 08:38:48 / [Repository](https://github.com/Codeception/lib-web) / [Releases](https://github.com/Codeception/lib-web/releases) + + + + + + +### lib-innerbrowser 3.0.1: 3.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/06 10:41:21 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Raised lowest supported version of symfony 4 components to avoid deprecation warnings on PHP 8. + -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/20 09:26:33 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) +### module-db 1.2.0: 1.2.0 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/05 19:47:19 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) -* Support for Codeception 5, thanks to **[W0rma](https://github.com/W0rma)** +* Add `skip_cleanup_if_failed` option for not cleaning up failed tests +* Null safety in destructor [#30](https://github.com/Codeception/module-db/issues/30) by **[Archanium](https://github.com/Archanium)** -### module-filesystem 2.0.2: 2.0.2 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:52:49 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) +### module-db 2.0.2: 2.0.2 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/05 19:36:19 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) -* Improved error handling [#19](https://github.com/Codeception/module-filesystem/issues/19) +* Add `skip_cleanup_if_failed` option for not cleaning up failed tests +* Null safety in destructor [#30](https://github.com/Codeception/module-db/issues/30) by **[Archanium](https://github.com/Archanium)** -### module-filesystem 3.0.0: 3.0.0 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/14 18:51:07 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) +### module-db 3.0.1: 3.0.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/05 19:29:02 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) -* Support for Codeception 5 +* Add `skip_cleanup_if_failed` option for not cleaning up failed tests +* Null safety in destructor [#30](https://github.com/Codeception/module-db/issues/30) by **[Archanium](https://github.com/Archanium)** -### module-webdriver 3.1.0: 3.1.0 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 17:08:21 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) +### module-redis 3.0.0: 3.0.0 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:41:06 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) -* Moved WebDriver constraints from codeception/codeception -* Moved code shared with lib-innerbrowser to codeception/lib-web -* Improved code style +* Support for Codeception 5 -### module-rest 3.1.0: 3.1.0 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 11:00:56 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) +### module-db 1.1.1: 1.1.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:06:05 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) -* Moved JSON constraints from codeception/codeception to module-rest -* XML related code shared with SOAP module was moved to codeception/lib-xml +* Fix Sqlite primary key column detection on PHP 8.1 -### lib-xml 1.0.0: Initial release -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 10:04:52 / [Repository](https://github.com/Codeception/lib-xml) / [Releases](https://github.com/Codeception/lib-xml/releases) +### module-db 2.0.1: 2.0.1 +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:05:36 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) +* Fix Sqlite primary key column detection on PHP 8.1 -### module-redis 3.0.0: 3.0.0 +### module-db 3.0.0: 3.0.0 -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:41:06 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 17:03:37 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) -* Support for Codeception 5 +* Codeception 5 support ### module-mezzio 4.0.0: 4.0.0 @@ -926,6 +2021,28 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Update to min php8 ([#70](https://github.com/Codeception/module-rest/issues/70)) by **[pbojan](https://github.com/pbojan)** +### lib-innerbrowser 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/19 18:36:23 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Compatibility with Codeception 5 + + +### lib-innerbrowser 2.0.2: 2.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2022/02/01 17:42:05 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +## What's Changed +* Prevent "Uncaught TypeError: explode(): Argument [#2](https://github.com/Codeception/lib-innerbrowser/issues/2) ($string) must be of type string, null given" by **[Fahl-Design](https://github.com/Fahl-Design)** in https://github.com/Codeception/lib-innerbrowser/pull/47 +* Fix compatibility with symfony/dom-crawler < 5.3.0-BETA-1 by **[nrocy](https://github.com/nrocy)** in https://github.com/Codeception/lib-innerbrowser/pull/50 + +**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/2.0.1...2.0.2 + + ### module-doctrine2 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/01/28 18:34:39 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) @@ -957,6 +2074,15 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark +### module-soap 2.0.2: 2.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/01/06 17:03:47 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) + + + +* Fixed type of client property + + ### module-webdriver 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/12/29 16:57:38 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1024,6 +2150,15 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo * **Small bug fix**: Fix some types (https://github.com/Codeception/module-phpbrowser/pull/21) +### lib-innerbrowser 2.0.1: 2.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/21 02:04:00 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Update dependencies (https://github.com/Codeception/lib-innerbrowser/pull/48) + + ### module-redis 1.4.1: 1.4.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/21 02:02:03 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -1056,6 +2191,17 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo * Update dependencies by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-ftp/pull/6 +### module-symfony 2.1.1: 2.1.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:41:02 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed + +* Update dependencies by **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/149 + + ### module-laminas 1.3.1: 1.3.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:39:53 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -1067,6 +2213,17 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo * Update dependencies by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-laminas/pull/21 +### module-soap 2.0.1: 2.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:37:02 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) + + + +## What's Changed + +* Update dependencies by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-soap/pull/13 + + ### module-phpbrowser 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 14:26:57 / [Repository](https://github.com/Codeception/module-phpbrowser) / [Releases](https://github.com/Codeception/module-phpbrowser/releases) @@ -1112,6 +2269,24 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/lib-asserts/compare/1.13.2...2.0.0 +### module-phalcon5 v1.0.1: v1.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2021/12/16 13:04:49 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) + + + +Corrections for Packagist descriptions and PHP minimum version + + +### module-phalcon5 v1.0.0: v1.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2021/12/15 18:51:06 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) + + + +Initial release of the Codeception module for Phalcon 5. + + ### module-redis 1.4.0: 1.4.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/12/13 06:06:22 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -1121,6 +2296,30 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * seeInRedis displays a difference between expected value and actual value +### module-symfony 2.1.0: 2.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:18:21 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed + +By **[TavoNiievez](https://github.com/TavoNiievez)**: +* PHP 7.4 or higher is required. +* Support PHP 8.1 +* Updated code base to PHP 7.4 ( https://github.com/Codeception/module-symfony/pull/146 ) +* Fix broken links in docs ( https://github.com/Codeception/module-symfony/pull/142 ) +* Encapsulate the Client ( https://github.com/Codeception/module-symfony/pull/140 ) + +By **[ThomasLandauer](https://github.com/ThomasLandauer)**: + +* Improving error message for `public` services ( https://github.com/Codeception/module-symfony/pull/145 ) +* Updating Cest file location ( https://github.com/Codeception/module-symfony/pull/144 ) +* Changing `Symfony.php` -> trait ( https://github.com/Codeception/module-symfony/pull/143 ) + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/2.0.5...2.1.0 + + ### module-asserts 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:06:26 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -1138,6 +2337,23 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-asserts/compare/1.3.1...2.0.0 +### module-datafactory 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:00:26 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + +## What's Changed + +* PHP 7.4 or higher is required. +* Support PHP 8.1 +* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-datafactory/pull/9 and https://github.com/Codeception/module-datafactory/pull/14 +* Documentation changes by **[DavertMik](https://github.com/DavertMik)** in https://github.com/Codeception/module-datafactory/pull/11 +* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-datafactory/pull/13 + +**Full Changelog**: https://github.com/Codeception/module-datafactory/compare/1.1.0...2.0.0 + + ### module-mongodb 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 14:55:38 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -1153,6 +2369,22 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-mongodb/compare/1.1.1...2.0.0 +### module-sequence 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 14:36:31 / [Repository](https://github.com/Codeception/module-sequence) / [Releases](https://github.com/Codeception/module-sequence/releases) + + + +## What's Changed + +* PHP 7.4 or higher is required. +* Support PHP 8.1 +* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-sequence/pull/4 +* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-sequence/pull/3 + +**Full Changelog**: https://github.com/Codeception/module-sequence/compare/1.0.1...2.0.0 + + ### module-webdriver 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 14:34:27 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1344,6 +2576,37 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-laminas/compare/1.2.1...1.3.0 +### module-db 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:38:52 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +## What's Changed + +* PHP 7.4 or higher is required. +* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-db/pull/26 +* Replace `Codeception\Util\Stub` with `Codeception\Stub` in tests by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/module-db/pull/13 +* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-db/pull/24 + +**Full Changelog**: https://github.com/Codeception/module-db/compare/1.1.0...2.0.0 + + +### module-soap 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:35:42 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) + + + +## What's Changed + +* PHP 7.4 or higher is required. +* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-soap/pull/8 and https://github.com/Codeception/module-soap/pull/12 +* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-soap/pull/11 + +**Full Changelog**: https://github.com/Codeception/module-soap/compare/1.0.1...2.0.0 + + ### module-rest 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:27:57 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -1374,6 +2637,21 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-phpbrowser/compare/1.0.2...2.0.0 +### lib-innerbrowser 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:16:00 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +## What's Changed + +* PHP 7.4 or higher is required. +* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/lib-innerbrowser/pull/45 +* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/lib-innerbrowser/pull/43 + +**Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/1.5.0...2.0.0 + + ### module-yii2 1.1.4: 1.1.4 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2021/11/26 05:58:14 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -1567,6 +2845,16 @@ $I->seeNumberOfTabs(2); ``` +### lib-innerbrowser 1.5.1: 1.5.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/08/30 15:40:07 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +- Fix symfony/dom-crawler 5.3 deprecation ([#41](https://github.com/Codeception/lib-innerbrowser/issues/41)) by **[simonhammes](https://github.com/simonhammes)** +- Require Codeception 4.x by **[TavoNiievez](https://github.com/TavoNiievez)** + + ### module-webdriver 1.3.0: Add new option webdriver_proxy Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/08/22 07:22:29 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1596,6 +2884,50 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo - add link to changelog in readme ([#24](https://github.com/Codeception/module-laravel/issues/24)) by **[Arhell](https://github.com/Arhell)** +### module-symfony 2.0.5: 2.0.5 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/07/07 01:17:57 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +Added assertions for Symfony Mime component ([#139](https://github.com/Codeception/module-symfony/issues/139)): + +- `assertEmailAddressContains` +- `assertEmailAttachmentCount` +- `assertEmailHasHeader` +- `assertEmailHeaderNotSame` +- `assertEmailHeaderSame` +- `assertEmailHtmlBodyContains` +- `assertEmailHtmlBodyNotContains` +- `assertEmailNotHasHeader` +- `assertEmailTextBodyContains` +- `assertEmailTextBodyNotContains` + + +### module-symfony 2.0.4: 2.0.4 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/06/07 06:16:58 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +- New method: `$I->goToLogoutPath();` +- `$I->logout();` is now an alias for `$I->logoutProgrammatically();` + +- Added changelog link to readme.md ([#136](https://github.com/Codeception/module-symfony/issues/136)) by **[Arhell](https://github.com/Arhell)** + + + + +### module-symfony 2.0.3: 2.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/06/01 01:51:37 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +- Added Symfony 5.3 compatibility ([#133](https://github.com/Codeception/module-symfony/issues/133)). +- Added new method: `$I->seeRequestTimeIsLessThan()` ([#132](https://github.com/Codeception/module-symfony/issues/132)). + + ### module-yii2 1.1.3: 1.1.3 Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark](https://github.com/samdark) on 2021/05/24 20:06:33 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -1605,6 +2937,20 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark - Add ability to specify application class in config ([#48](https://github.com/Codeception/module-yii2/issues/48)) +### module-phalcon4 v1.0.7: v1.0.7 + +Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/05/18 18:21:15 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) + + + +Updated code base to PHP 7.2 ([#14](https://github.com/Codeception/module-phalcon4/issues/14)): +- Added strict types +- Added return types +- Added some type hints +- Removed unnecessary qualifiers +- sha1 by default instead of md5. + + ### module-lumen 2.0.1: 2.0.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/04/29 14:24:58 / [Repository](https://github.com/Codeception/module-lumen) / [Releases](https://github.com/Codeception/module-lumen/releases) @@ -1633,6 +2979,39 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Revert change implemented in 1.3.0 +### lib-innerbrowser 1.5.0: Hidden field, delete requests, code quality + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/04/23 07:01:58 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Submit value of hidden field if checkbox is unchecked and matching hidden field exists [#36](https://github.com/Codeception/lib-innerbrowser/issues/36) +* Send request body in DELETE requests (partially reverts change made in 1.4.2) [#38](https://github.com/Codeception/lib-innerbrowser/issues/38) +* Improved code quality [#37](https://github.com/Codeception/lib-innerbrowser/issues/37) + + +### module-symfony 2.0.2: 2.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/04/16 13:39:49 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +Logical changes by **[mrsombre](https://github.com/mrsombre)** : +- Fix Doctrine Connection service alias ([#129](https://github.com/Codeception/module-symfony/issues/129)) + +Documentation changes by **[ThomasLandauer](https://github.com/ThomasLandauer)** : +- `submitSymfonyForm()`: Mentioning `name` attribute ([#128](https://github.com/Codeception/module-symfony/issues/128)) + + +### module-phalcon4 v1.0.6: v1.0.6 + +Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/04/13 21:30:04 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) + + + +* Fixed Request service redefinition ([#7](https://github.com/Codeception/module-phalcon4/issues/7)) + + ### module-rest 1.3.0: 1.3.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/04/08 08:28:48 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -1646,6 +3025,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Other documentation improvements +### lib-innerbrowser 1.4.2: Don't set request body for DELETE and OPTIONS requests + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/04/06 05:29:20 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + + + + ### module-redis 1.1.0: Allow more parameters to be sent to Predis Client Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/31 16:04:36 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -1655,6 +3043,22 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib See [#6](https://github.com/Codeception/module-redis/issues/6) +### module-symfony 2.0.1: 2.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/03/28 15:48:38 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +Minor changes in documentation by **[ThomasLandauer](https://github.com/ThomasLandauer)** : +- Added info from the '*[Codeception for Symfony](https://codeception.com/for/symfony)*' page ([#98](https://github.com/Codeception/module-symfony/issues/98)) +- Explaining the `stopFollowingRedirects()` restriction for email ([#118](https://github.com/Codeception/module-symfony/issues/118)) +- Added 'See also' in related email functions ([#122](https://github.com/Codeception/module-symfony/issues/122)) +- Standardize `"@example.com"` as domain in documentation ([#124](https://github.com/Codeception/module-symfony/issues/124)) +- Mentioning Symfony Mailer requirement ([#126](https://github.com/Codeception/module-symfony/issues/126)) +- Changing Fail message for Symfony Mailer ([#127](https://github.com/Codeception/module-symfony/issues/127)) + + + ### module-amqp 1.1.0: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/21 15:29:11 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) @@ -1665,6 +3069,24 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support php-amqplib v3 +### module-datafactory 1.1.0: Added Custom Store + +Released by [![](https://avatars.githubusercontent.com/u/220264?v=4&s=16) DavertMik](https://github.com/DavertMik) on 2021/03/16 19:42:52 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + +Custom Store can be used for Data Factory. See [#2](https://github.com/Codeception/module-datafactory/issues/2) + + +### lib-innerbrowser 1.4.1: Fix grabTextFrom TypeError + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/02 08:03:49 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Fix Type Error on PHP 8 when array is passed to grabTextFrom[#30](https://github.com/Codeception/lib-innerbrowser/issues/30) + + ### module-rest 1.2.8: Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/02 06:51:05 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -1674,6 +3096,43 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Append query params to URL for HEAD requests +### module-symfony 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/02/12 22:31:22 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* **New:** + * Added Twig assertions: [`seeCurrentTemplateIs`](https://codeception.com/docs/modules/Symfony#seeCurrentTemplateIs), [`seeRenderedTemplate`](https://codeception.com/docs/modules/Symfony#seeRenderedTemplate) and [`dontSeeRenderedTemplate`](https://codeception.com/docs/modules/Symfony#dontSeeRenderedTemplate). + * The [`grabSentEmails`](https://codeception.com/docs/modules/Symfony#grabSentEmails) and [`grabLastSentEmail`](https://codeception.com/docs/modules/Symfony#grabLastSentEmail) functions were added. + * Added [`SeeOrphanEvent`](https://codeception.com/docs/modules/Symfony#seeOrphanEvent) and [`dontSeeOrphanEvent`](https://codeception.com/docs/modules/Symfony#dontSeeOrphanEvent) assertions. + * The `$url` parameter is now optional in the [`seePageIsAvailable`](https://codeception.com/docs/modules/Symfony#seePageIsAvailable) assertion. +* **BC:** + * `Symfony 3.4` support removed. `Symfony 4.4` or higher is now required. + * Support for [`Swift Mailer`](https://symfony.com/doc/current/email.html) was dropped in favor of [`Symfony Mailer`](https://symfony.com/doc/current/mailer.html); the [`mailer`](https://github.com/Codeception/module-symfony/pull/9/files) configuration parameter was removed. + +> If you are already using `Symfony 4.4` or higher it should not be necessary to make changes to your tests to update! + + +### module-phalcon4 v1.0.5: v1.0.5 + +Released by [![](https://avatars.githubusercontent.com/u/3289702?v=4&s=16) Jeckerson](https://github.com/Jeckerson) on 2021/02/10 22:09:30 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) + + + +Changed +* Removed limitation of PHP 8.0 version in composer.json + + +### lib-innerbrowser 1.4.0: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/29 18:19:08 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Added redirect methods https://github.com/Codeception/lib-innerbrowser/pull/29 + + ### module-lumen 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/01/19 05:02:29 / [Repository](https://github.com/Codeception/module-lumen) / [Releases](https://github.com/Codeception/module-lumen/releases) @@ -1693,14 +3152,24 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo > **Minor change**: Adding link to "central" parts explanation ([#4](https://github.com/Codeception/module-lumen/issues/4)) by **[ThomasLandauer](https://github.com/ThomasLandauer)**. -### module-webdriver 1.2.0: +### module-webdriver 1.2.0: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/17 19:30:29 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) + + + +* Implemented makeElementScreenshot by **[Blaimi](https://github.com/Blaimi)** +* Documentation improvements + + +### lib-innerbrowser 1.3.6: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/17 11:25:06 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/17 19:30:29 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) +* Don't set request body for HEAD requests [#26](https://github.com/Codeception/lib-innerbrowser/issues/26) -* Implemented makeElementScreenshot by **[Blaimi](https://github.com/Blaimi)** -* Documentation improvements ### module-phalcon 1.1.0: @@ -1713,6 +3182,24 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fix: `$cookie->setSecure()` always as boolean [#6](https://github.com/Codeception/module-phalcon/issues/6) +### lib-innerbrowser 1.3.5: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/01/02 19:01:35 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Fixed filling of fields that are linked to form using `form` attribute https://github.com/Codeception/Codeception/issues/6022 + + +### module-datafactory 1.0.1: PHP8 support + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/12/30 15:56:46 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + + + + ### module-laravel 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/29 20:52:27 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) @@ -1781,6 +3268,74 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo Support PHP 8 *(Depends on Laravel libraries actually supporting PHP 8)* by **[Naktibalda](https://github.com/Naktibalda)** +### module-symfony 1.6.0: 1.6.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/20 16:52:03 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * dontSeeEventTriggered + * seeFormErrorMessages + * seeUserHasRoles + +* Remembered authentication methods now also verify the Cookie generated ([#81](https://github.com/Codeception/module-symfony/issues/81)) +* Fixed time metric when running test with `--debug` ([#77](https://github.com/Codeception/module-symfony/issues/77)) + +If you're interested in contributing to this module and didn't know where to start, a [contribution guide is now available](https://github.com/Codeception/module-symfony/blob/master/CONTRIBUTING.md), thanks to **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** ([#79](https://github.com/Codeception/module-symfony/issues/79)). + +**BC:** Removed support for `PHP 7.1` and `PHP 7.2`. + +> Minor changes: ([#65](https://github.com/Codeception/module-symfony/issues/65)) ([#78](https://github.com/Codeception/module-symfony/issues/78)) + + + +### module-db 1.1.0: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/12/20 13:38:20 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +Add support for IS NOT NULL in database assertions [#12](https://github.com/Codeception/module-db/issues/12) + + +### module-symfony 1.5.0: 1.5.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/11 20:50:16 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New method by **[ThomasLandauer](https://github.com/ThomasLandauer)**: + * dontSeeInSession + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * dontSeeRememberedAuthentication + * grabNumRecords + * seeEventTriggered + * seeRememberedAuthentication + * seeSessionHasValues + * persistPermanentService + +* Now you can run test for all the methods of this module in https://github.com/Codeception/symfony-module-tests . + +* **BC:** Remove PHP 7.0 support ([#69](https://github.com/Codeception/module-symfony/issues/69)), code standards updated to PHP 7.1+ ([#75](https://github.com/Codeception/module-symfony/issues/75)) +* **BC:** Removed parameter flags in `seeAuthentication`, `dontSeeAuthentication` and `persistService`, use `seeRememberedAuthentication`, `dontSeeRememberedAuthentication` and `persistPermanentService` instead. + +> Minor logical change in [#74](https://github.com/Codeception/module-symfony/issues/74). + + +### module-symfony 1.4.2: 1.4.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/26 12:56:36 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* Support PHP 8 by **[Naktibalda](https://github.com/Naktibalda)** + +> Minor non-logical changes in [#57](https://github.com/Codeception/module-symfony/issues/57) and [#62](https://github.com/Codeception/module-symfony/issues/62). + + + ### module-mongodb 1.1.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/26 07:20:07 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -1799,6 +3354,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-symfony 1.4.1: 1.4.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/25 19:31:47 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* Minor logic fixes ([#58](https://github.com/Codeception/module-symfony/issues/58)), ([#59](https://github.com/Codeception/module-symfony/issues/59)), and ([#60](https://github.com/Codeception/module-symfony/issues/60)) by **[TavoNiievez](https://github.com/TavoNiievez)** + + ### module-laminas 1.0.0: First release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/25 07:58:15 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -1827,6 +3391,42 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-symfony 1.4.0: 1.4.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/24 16:56:31 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * seeFormErrorMessage ([#50](https://github.com/Codeception/module-symfony/issues/50)) + * dontSeeFormErrors function ([#49](https://github.com/Codeception/module-symfony/issues/49)) + * seeFormHasErrors function ([#48](https://github.com/Codeception/module-symfony/issues/48)) + +* Minor logic fixes ([#51](https://github.com/Codeception/module-symfony/issues/51)), ([#47](https://github.com/Codeception/module-symfony/issues/47)), ([#44](https://github.com/Codeception/module-symfony/issues/44)), ([#41](https://github.com/Codeception/module-symfony/issues/41)) and ([#56](https://github.com/Codeception/module-symfony/issues/56)). + + +### module-symfony 1.3.0: 1.3.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/16 16:52:18 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * grabRepository ([#27](https://github.com/Codeception/module-symfony/issues/27)) + * seeUserPasswordDoesNotNeedRehash ([#29](https://github.com/Codeception/module-symfony/issues/29)) + * grabParameter ([#30](https://github.com/Codeception/module-symfony/issues/30)) + * submitSymfonyForm ([#32](https://github.com/Codeception/module-symfony/issues/32)) + * seePageIsAvailable ([#33](https://github.com/Codeception/module-symfony/issues/33)) + * seePageRedirectsTo ([#33](https://github.com/Codeception/module-symfony/issues/33)) + +* Supports vlucas/phpdotenv v5 ([#28](https://github.com/Codeception/module-symfony/issues/28)) +* Minor logic fixes ([#35](https://github.com/Codeception/module-symfony/issues/35)), ([#36](https://github.com/Codeception/module-symfony/issues/36)), ([#37](https://github.com/Codeception/module-symfony/issues/37)) and ([#38](https://github.com/Codeception/module-symfony/issues/38)) + +* Improved documentation of the 'Parts' feature by **[ThomasLandauer](https://github.com/ThomasLandauer)** ([#40](https://github.com/Codeception/module-symfony/issues/40)) + +* **BC**: Removed support for php 5.6 and Symfony 2.8 ([#39](https://github.com/Codeception/module-symfony/issues/39)) + + ### module-webdriver 1.1.4: Documentation improvements Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/16 07:24:08 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -1855,6 +3455,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Catch MappingException thrown by Doctrine 2.9 +### module-soap 1.0.1: Support PHP 8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/07 20:10:24 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) + + + + + + ### module-rest 1.2.7: Fix deprecation error Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/04 17:06:31 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -1882,6 +3491,36 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-sequence 1.0.1: Support PHP 8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/31 19:03:32 / [Repository](https://github.com/Codeception/module-sequence) / [Releases](https://github.com/Codeception/module-sequence/releases) + + + + + + +### module-symfony 1.2.0: 1.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/31 18:41:28 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* New methods by **[TavoNiievez](https://github.com/TavoNiievez)**: + * amLoggedInAs + * logout + * seeInSession + * seeAuthentication + * dontSeeAuthentication + * seeUserHasRole + * amOnAction + * seeCurrentActionIs + * seeNumRecords + +* Supports vlucas/phpdotenv ^3.6 and ^4.1 +* Improved description and error messages of grabService and seeEmailIsSent by **[ThomasLandauer](https://github.com/ThomasLandauer)** + + ### module-memcache 1.0.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/28 13:30:19 / [Repository](https://github.com/Codeception/module-memcache) / [Releases](https://github.com/Codeception/module-memcache/releases) @@ -1965,6 +3604,16 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Use wrapper methods to avoid PHPUnit 9 deprecation messages and keep it working with PHPUnit 10 +### module-db 1.0.2: PHP8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/23 18:22:43 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +* Support PHP 8 (no code changes) +* Require stable version of codeception/codeception + + ### module-cli 1.0.4: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/23 17:52:08 / [Repository](https://github.com/Codeception/module-cli) / [Releases](https://github.com/Codeception/module-cli/releases) @@ -1975,6 +3624,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Deleted local copy of generated documentation +### lib-innerbrowser 1.3.4: Support PHP 8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/22 06:23:10 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +No code changes + + ### module-asserts 1.3.1: PHP8 support Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/21 16:49:39 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -1994,6 +3652,16 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib No code changes +### lib-innerbrowser 1.3.3: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/11 19:05:11 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Added missing http codes. +* Improved documentation of Ajax methods + + ### module-webdriver 1.1.2: Documentation improvements Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/10/11 18:55:38 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2057,6 +3725,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib [#5](https://github.com/Codeception/lib-asserts/issues/5) by **[TavoNiievez](https://github.com/TavoNiievez)** +### module-symfony 1.1.1: Fixed seeEmailIsSent + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/08/28 07:06:19 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +[#9](https://github.com/Codeception/module-symfony/issues/9) by **[ThomasLandauer](https://github.com/ThomasLandauer)** and **[TavoNiievez](https://github.com/TavoNiievez)** + + ### module-webdriver 1.1.1: Multibyte characters are allowed in build artefact filenames Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/08/28 07:01:59 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2087,6 +3764,16 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Validation errors for haveRecord method [#10](https://github.com/Codeception/module-yii2/issues/10) by **[ianikanov](https://github.com/ianikanov)** +### module-phalcon4 v1.0.4: v1.0.4 + +Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/08/26 09:34:29 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) + + + +Fixed +- Session To Use Session Manager + + ### module-rest 1.2.1: Documentation updates Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/07/05 15:46:13 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -2105,6 +3792,16 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### lib-innerbrowser 1.3.2: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/07/05 14:22:41 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* Updated (dont)seeCurrentUrlMatches methods to use wrapper method instead of deprecated assert(Not)RegExp method. +* Fixed various code smells reported by PhpStorm + + ### module-webdriver 1.1.0: switchToFrame Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/05/31 08:52:02 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2166,6 +3863,15 @@ This version depends on phpunit-wrapper and works with PHPUnit 5 - 9, codeception-5 branch can be revived when we actually have Codeception 5. +### module-symfony 1.1.0: runSymfonyConsoleCommand + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/04/05 14:11:53 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +* runSymfonyConsoleCommand works with arguments, options and also console input + + ### module-webdriver 1.0.7: [switchToIFrame] fixed Undefined variable: els error Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/04/01 10:19:18 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2225,6 +3931,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### lib-innerbrowser 1.3.1: PHPUnit9 compatibility + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/02/20 14:52:13 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* proceedSeeInField casts value to string before comparison + + ### lib-asserts 1.11.0: Support PHPUnit 9 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/02/11 10:46:55 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) @@ -2279,6 +3994,16 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib [#3](https://github.com/Codeception/module-yii2/issues/3) by **[mytskine](https://github.com/mytskine)** +### module-zf2 1.0.3: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/29 15:19:36 / [Repository](https://github.com/Codeception/module-zf2) / [Releases](https://github.com/Codeception/module-zf2/releases) + + + +* Use doctrine entitymanager from config +* Add persisted services before bootstrap + + ### module-queue 1.1.0: Implemented driver for Pheanstalk 4 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/28 13:23:15 / [Repository](https://github.com/Codeception/module-queue) / [Releases](https://github.com/Codeception/module-queue/releases) @@ -2297,6 +4022,33 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib [#7](https://github.com/Codeception/module-rest/issues/7) by **[svycka](https://github.com/svycka)** +### lib-innerbrowser 1.3.0: Allow to add or remove server parameters + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/27 09:33:02 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + +* [#5](https://github.com/Codeception/lib-innerbrowser/issues/5) by **[svycka](https://github.com/svycka)** + + +### module-zf2 1.0.2: Empty request content can't be null + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/23 17:55:51 / [Repository](https://github.com/Codeception/module-zf2) / [Releases](https://github.com/Codeception/module-zf2/releases) + + + +[#2](https://github.com/Codeception/module-zf2/issues/2) + + +### module-zf2 1.0.1: Add Server parameters to ZendRequest + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/22 15:14:48 / [Repository](https://github.com/Codeception/module-zf2) / [Releases](https://github.com/Codeception/module-zf2/releases) + + + + + + ### module-apc 1.0.1: Removed requirement for ext-apc from composer.json Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/01/21 07:45:14 / [Repository](https://github.com/Codeception/module-apc) / [Releases](https://github.com/Codeception/module-apc/releases) @@ -2315,6 +4067,56 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-phalcon4 1.0.3: v1.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/01/11 17:02:24 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) + + + +Fixed +- Dependencies + + +### module-phalcon4 1.0.2: v1.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/01/07 12:32:16 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) + + + +Fixed +- Replacing service in DI from functional test not working + + +### module-phalcon4 1.0.1: v1.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/01/06 11:26:42 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) + + + +Removed composer.lock +Updated dependencies +Updated SQL schema +Updated DocBlocks + + +### module-phalcon4 1.0.0: v1.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/7444246?v=4&s=16) ruudboon](https://github.com/ruudboon) on 2020/01/06 09:32:56 / [Repository](https://github.com/Codeception/module-phalcon4) / [Releases](https://github.com/Codeception/module-phalcon4/releases) + + + +Initial release of the Codeception module for Phalcon 4. + + +### module-db 1.0.1: Mysql: use single quotes for string value in getPrimaryKey + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/12/08 18:03:36 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + +Fixes some compatibility issue with MariaDB https://github.com/Codeception/Codeception/issues/5778 + + ### module-filesystem 1.0.2: Support symfony/finder 5 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/12/04 17:14:16 / [Repository](https://github.com/Codeception/module-filesystem) / [Releases](https://github.com/Codeception/module-filesystem/releases) @@ -2324,6 +4126,24 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### lib-innerbrowser 1.2.3: Symfony 5: catch another exception + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/26 16:50:50 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + + + + +### lib-innerbrowser 1.2.2: Really fixed _failed handling with Symfony 5 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/24 16:43:52 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) + + + + + + ### lib-asserts 1.10.1: rerelease Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/23 21:14:50 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) @@ -2414,6 +4234,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-symfony 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:13 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + + + + ### module-rest 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) @@ -2459,6 +4288,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-db 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:27:01 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) + + + + + + ### module-phalcon 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:02:04 / [Repository](https://github.com/Codeception/module-phalcon) / [Releases](https://github.com/Codeception/module-phalcon/releases) @@ -2469,6 +4307,33 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Use columnMap by retrieving record id if needed +### module-zf2 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:24:38 / [Repository](https://github.com/Codeception/module-zf2) / [Releases](https://github.com/Codeception/module-zf2/releases) + + + + + + +### module-sequence 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:24:11 / [Repository](https://github.com/Codeception/module-sequence) / [Releases](https://github.com/Codeception/module-sequence/releases) + + + + + + +### module-soap 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:23:56 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) + + + + + + ### module-redis 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:23:43 / [Repository](https://github.com/Codeception/module-redis) / [Releases](https://github.com/Codeception/module-redis/releases) @@ -2523,6 +4388,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-datafactory 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:07:51 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + + + + ### module-cli 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:07:08 / [Repository](https://github.com/Codeception/module-cli) / [Releases](https://github.com/Codeception/module-cli/releases) From 575331c8e2721d06cb3742793773f53314e60fd6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Mar 2025 23:11:12 +0000 Subject: [PATCH 061/156] updated --- changelog.markdown | 23 +++++++ docs/modules/Symfony.md | 132 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 51a5c1c27..c724ec5f6 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,29 @@ title: Codeception Changelog +### module-symfony 3.5.1: 3.5.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/03/09 23:04:32 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +Support Symfony 7.2 (https://github.com/Codeception/module-symfony/pull/203). +Added Symfony Translation assertions (https://github.com/Codeception/module-symfony/pull/205): +- `dontSeeFallbackTranslations` +- `dontSeeMissingTranslations` +- `grabDefinedTranslationsCount` +- `seeAllTranslationsDefined` +- `seeDefaultLocaleIs` +- `seeFallbackLocalesAre` +- `seeFallbackTranslationsCountLessThan` +- `seeMissingTranslationsCountLessThan` + +Added Symfony Logger assertion (`dontSeeDeprecations`) (https://github.com/Codeception/module-symfony/pull/206). + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.5.0...3.5.1 + + ### module-db 3.2.2: 3.2.2 Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2025/03/03 08:10:59 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) diff --git a/docs/modules/Symfony.md b/docs/modules/Symfony.md index 9677650ee..186ee42d1 100644 --- a/docs/modules/Symfony.md +++ b/docs/modules/Symfony.md @@ -1086,6 +1086,22 @@ $I->dontSeeCurrentUrlMatches('~^/users/(\d+)~'); {% endhighlight %} +#### dontSeeDeprecations + +* `param string` $message Optional custom failure message. +* `return void` + +Asserts that there are no deprecation messages in Symfony's log. + +{% highlight php %} + +amOnPage('/home'); +$I->dontSeeDeprecations(); + +{% endhighlight %} + + #### dontSeeElement * `param ` $selector @@ -1173,6 +1189,20 @@ $I->dontSeeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); {% endhighlight %} +#### dontSeeFallbackTranslations + +* `return void` + +Asserts that no fallback translations were found. + +{% highlight php %} + +dontSeeFallbackTranslations(); + +{% endhighlight %} + + #### dontSeeFormErrors * `return void` @@ -1332,6 +1362,20 @@ $I->dontSeeLink('Checkout now', '/store/cart.php'); {% endhighlight %} +#### dontSeeMissingTranslations + +* `return void` + +Asserts that no missing translations were found. + +{% highlight php %} + +dontSeeMissingTranslations(); + +{% endhighlight %} + + #### dontSeeOptionIsSelected * `param ` $selector @@ -1509,6 +1553,20 @@ You can set additional cookie params like `domain`, `path` in array passed as la If the cookie is set by an ajax request (XMLHttpRequest), there might be some delay caused by the browser, so try `$I->wait(0.1)`. +#### grabDefinedTranslationsCount + +* `return int` The count of defined translations. + +Grabs the count of defined translations. + +{% highlight php %} + +grabDefinedTranslations(); + +{% endhighlight %} + + #### grabFromCurrentUrl * `param ?string` $uri @@ -1933,6 +1991,20 @@ But will *not* be true for strings like: For checking the raw source code, use `seeInSource()`. +#### seeAllTranslationsDefined + +* `return void` + +Asserts that there are no missing translations and no fallback translations. + +{% highlight php %} + +seeAllTranslationsDefined(); + +{% endhighlight %} + + #### seeAuthentication * `return void` @@ -2064,6 +2136,21 @@ $I->seeCurrentUrlMatches('~^/users/(\d+)~'); {% endhighlight %} +#### seeDefaultLocaleIs + +* `param string` $expectedLocale The expected default locale +* `return void` + +Asserts that the default locale is the expected one. + +{% highlight php %} + +seeDefaultLocaleIs('en'); + +{% endhighlight %} + + #### seeElement * `param ` $selector @@ -2165,6 +2252,36 @@ $I->seeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); {% endhighlight %} +#### seeFallbackLocalesAre + +* `param array` $expectedLocales The expected fallback locales +* `return void` + +Asserts that the fallback locales match the expected ones. + +{% highlight php %} + +seeFallbackLocalesAre(['es', 'fr']); + +{% endhighlight %} + + +#### seeFallbackTranslationsCountLessThan + +* `param int` $limit Maximum count of fallback translations +* `return void` + +Asserts that the count of fallback translations is less than the given limit. + +{% highlight php %} + +seeFallbackTranslationsCountLessThan(10); + +{% endhighlight %} + + #### seeFormErrorMessage * `param string` $field @@ -2443,6 +2560,21 @@ $I->seeLink('Logout','/logout'); // matches Logout {% endhighlight %} +#### seeMissingTranslationsCountLessThan + +* `param int` $limit Maximum count of missing translations +* `return void` + +Asserts that the count of missing translations is less than the given limit. + +{% highlight php %} + +seeMissingTranslationsCountLessThan(5); + +{% endhighlight %} + + #### seeNumRecords * `param int` $expectedNum Expected number of records From 43a751c77fedbe19e7aa3cecfb6e7642cded40b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Mar 2025 21:13:37 +0000 Subject: [PATCH 062/156] updated --- changelog.markdown | 11 ++ docs/modules/Asserts.md | 47 +++++- docs/reference/Module.md | 316 +++++++++++++++++++++++---------------- 3 files changed, 239 insertions(+), 135 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index c724ec5f6..0c2b65df1 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,17 @@ title: Codeception Changelog +### lib-asserts 2.2.0: 2.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/03/10 20:42:27 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) + + + +* Add PHPStan assert PHPDoc annotations from PHPUnit by **[Lkopo](https://github.com/Lkopo)** in https://github.com/Codeception/lib-asserts/pull/13 +* Reimplement assertions removed in PHPUnit 10/12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/lib-asserts/pull/14 + + + ### module-symfony 3.5.1: 3.5.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/03/09 23:04:32 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) diff --git a/docs/modules/Asserts.md b/docs/modules/Asserts.md index 792c7a220..45c9f662f 100644 --- a/docs/modules/Asserts.md +++ b/docs/modules/Asserts.md @@ -180,6 +180,7 @@ Asserts that a string does not match a given regular expression. #### assertEmpty +* `phpstan-assert` empty $actual * `param mixed` $actual * `param string` $message @@ -225,6 +226,7 @@ Asserts that two variables are equal (with delta). #### assertFalse +* `phpstan-assert` false $condition * `param mixed` $condition * `param string` $message @@ -386,7 +388,9 @@ Asserts that a variable is infinite. #### assertInstanceOf -* `param string` $expected +* `template` ExpectedType of object +* `phpstan-assert` =ExpectedType $actual +* `param class-string` $expected * `param mixed` $actual * `param string` $message @@ -395,6 +399,7 @@ Asserts that a variable is of a given type. #### assertIsArray +* `phpstan-assert` array $actual * `param mixed` $actual * `param string` $message @@ -403,6 +408,7 @@ Asserts that a variable is of type array. #### assertIsBool +* `phpstan-assert` bool $actual * `param mixed` $actual * `param string` $message @@ -411,6 +417,7 @@ Asserts that a variable is of type bool. #### assertIsCallable +* `phpstan-assert` callable $actual * `param mixed` $actual * `param string` $message @@ -419,6 +426,7 @@ Asserts that a variable is of type callable. #### assertIsClosedResource +* `phpstan-assert` resource $actual * `param mixed` $actual * `param string` $message @@ -435,6 +443,7 @@ Asserts that a variable is empty. #### assertIsFloat +* `phpstan-assert` float $actual * `param mixed` $actual * `param string` $message @@ -443,6 +452,7 @@ Asserts that a variable is of type float. #### assertIsInt +* `phpstan-assert` int $actual * `param mixed` $actual * `param string` $message @@ -451,6 +461,7 @@ Asserts that a variable is of type int. #### assertIsIterable +* `phpstan-assert` iterable $actual * `param mixed` $actual * `param string` $message @@ -459,6 +470,7 @@ Asserts that a variable is of type iterable. #### assertIsNotArray +* `phpstan-assert` !array $actual * `param mixed` $actual * `param string` $message @@ -467,6 +479,7 @@ Asserts that a variable is not of type array. #### assertIsNotBool +* `phpstan-assert` !bool $actual * `param mixed` $actual * `param string` $message @@ -475,6 +488,7 @@ Asserts that a variable is not of type bool. #### assertIsNotCallable +* `phpstan-assert` !callable $actual * `param mixed` $actual * `param string` $message @@ -483,6 +497,7 @@ Asserts that a variable is not of type callable. #### assertIsNotClosedResource +* `phpstan-assert` !resource $actual * `param mixed` $actual * `param string` $message @@ -491,6 +506,7 @@ Asserts that a variable is not of type resource. #### assertIsNotFloat +* `phpstan-assert` !float $actual * `param mixed` $actual * `param string` $message @@ -499,6 +515,7 @@ Asserts that a variable is not of type float. #### assertIsNotInt +* `phpstan-assert` !int $actual * `param mixed` $actual * `param string` $message @@ -507,6 +524,7 @@ Asserts that a variable is not of type int. #### assertIsNotIterable +* `phpstan-assert` !iterable $actual * `param mixed` $actual * `param string` $message @@ -515,6 +533,7 @@ Asserts that a variable is not of type iterable. #### assertIsNotNumeric +* `phpstan-assert` !numeric $actual * `param mixed` $actual * `param string` $message @@ -523,6 +542,7 @@ Asserts that a variable is not of type numeric. #### assertIsNotObject +* `phpstan-assert` !object $actual * `param mixed` $actual * `param string` $message @@ -539,6 +559,7 @@ Asserts that a file/dir exists and is not readable. #### assertIsNotResource +* `phpstan-assert` !resource $actual * `param mixed` $actual * `param string` $message @@ -547,6 +568,7 @@ Asserts that a variable is not of type resource. #### assertIsNotScalar +* `psalm-assert` !scalar $actual * `param mixed` $actual * `param string` $message @@ -555,6 +577,7 @@ Asserts that a variable is not of type scalar. #### assertIsNotString +* `phpstan-assert` !string $actual * `param mixed` $actual * `param string` $message @@ -571,6 +594,7 @@ Asserts that a file/dir exists and is not writable. #### assertIsNumeric +* `phpstan-assert` numeric $actual * `param mixed` $actual * `param string` $message @@ -579,6 +603,7 @@ Asserts that a variable is of type numeric. #### assertIsObject +* `phpstan-assert` object $actual * `param mixed` $actual * `param string` $message @@ -595,6 +620,7 @@ Asserts that a file/dir is readable. #### assertIsResource +* `phpstan-assert` resource $actual * `param mixed` $actual * `param string` $message @@ -603,6 +629,7 @@ Asserts that a variable is of type resource. #### assertIsScalar +* `phpstan-assert` scalar $actual * `param mixed` $actual * `param string` $message @@ -611,6 +638,7 @@ Asserts that a variable is of type scalar. #### assertIsString +* `phpstan-assert` string $actual * `param mixed` $actual * `param string` $message @@ -768,6 +796,7 @@ Asserts the number of elements of an array, Countable or Traversable. #### assertNotEmpty +* `phpstan-assert` !empty $actual * `param mixed` $actual * `param string` $message @@ -813,6 +842,7 @@ Asserts that two variables are not equal (with delta). #### assertNotFalse +* `phpstan-assert` !false $condition * `param mixed` $condition * `param string` $message @@ -821,7 +851,9 @@ Asserts that a condition is not false. #### assertNotInstanceOf -* `param string` $expected +* `template` ExpectedType of object +* `phpstan-assert` !ExpectedType $actual +* `param class-string` $expected * `param mixed` $actual * `param string` $message @@ -830,6 +862,7 @@ Asserts that a variable is not of a given type. #### assertNotNull +* `phpstan-assert` !null $actual * `param mixed` $actual * `param string` $message @@ -865,6 +898,7 @@ Assert that the size of two arrays (or `Countable` or `Traversable` objects) is #### assertNotTrue +* `phpstan-assert` !true $condition * `param mixed` $condition * `param string` $message @@ -873,6 +907,7 @@ Asserts that a condition is not true. #### assertNull +* `phpstan-assert` null $actual * `param mixed` $actual * `param string` $message @@ -908,12 +943,17 @@ Asserts that a string matches a given regular expression. #### assertSame -* `param mixed` $expected +* `template` ExpectedType +* `phpstan-assert` =ExpectedType $actual +* `param ExpectedType` $expected * `param mixed` $actual * `param string` $message Asserts that two variables have the same type and value. +Used on objects, it asserts that two variables reference +the same object. + #### assertSameSize @@ -1098,6 +1138,7 @@ Evaluates a PHPUnit\Framework\Constraint matcher object. #### assertTrue +* `phpstan-assert` true $condition * `param mixed` $condition * `param string` $message diff --git a/docs/reference/Module.md b/docs/reference/Module.md index c3c972f37..9b4a40393 100644 --- a/docs/reference/Module.md +++ b/docs/reference/Module.md @@ -260,7 +260,7 @@ public function _beforeSuite($settings = []) { Asserts that an array has a specified key. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L19) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L21) #### assertArrayNotHasKey() @@ -273,7 +273,7 @@ Asserts that an array has a specified key. Asserts that an array does not have a specified key. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L30) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L32) #### assertClassHasAttribute() @@ -286,7 +286,7 @@ Asserts that an array does not have a specified key. Asserts that a class has a specified attribute. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L38) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L40) #### assertClassHasStaticAttribute() @@ -299,7 +299,7 @@ Asserts that a class has a specified attribute. Asserts that a class has a specified static attribute. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L52) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L54) #### assertClassNotHasAttribute() @@ -312,7 +312,7 @@ Asserts that a class has a specified static attribute. Asserts that a class does not have a specified attribute. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L60) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L68) #### assertClassNotHasStaticAttribute() @@ -325,7 +325,7 @@ Asserts that a class does not have a specified attribute. Asserts that a class does not have a specified static attribute. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L74) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L82) #### assertContains() @@ -338,7 +338,7 @@ Asserts that a class does not have a specified static attribute. Asserts that a haystack contains a needle. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L86) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L98) #### assertContainsEquals() @@ -349,7 +349,7 @@ Asserts that a haystack contains a needle. * `param iterable` $haystack * `param string` $message -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L94) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L106) #### assertContainsOnly() @@ -363,7 +363,7 @@ Asserts that a haystack contains a needle. Asserts that a haystack contains only values of a given type. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L102) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L114) #### assertContainsOnlyInstancesOf() @@ -376,7 +376,7 @@ Asserts that a haystack contains only values of a given type. Asserts that a haystack contains only instances of a given class name. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L110) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L122) #### assertCount() @@ -389,7 +389,7 @@ Asserts that a haystack contains only instances of a given class name. Asserts the number of elements of an array, Countable or Traversable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L120) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L132) #### assertDirectoryDoesNotExist() @@ -401,7 +401,7 @@ Asserts the number of elements of an array, Countable or Traversable. Asserts that a directory does not exist. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L128) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L140) #### assertDirectoryExists() @@ -413,7 +413,7 @@ Asserts that a directory does not exist. Asserts that a directory exists. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L136) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L148) #### assertDirectoryIsNotReadable() @@ -425,7 +425,7 @@ Asserts that a directory exists. Asserts that a directory exists and is not readable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L144) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L156) #### assertDirectoryIsNotWritable() @@ -437,7 +437,7 @@ Asserts that a directory exists and is not readable. Asserts that a directory exists and is not writable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L152) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L164) #### assertDirectoryIsReadable() @@ -449,7 +449,7 @@ Asserts that a directory exists and is not writable. Asserts that a directory exists and is readable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L160) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L172) #### assertDirectoryIsWritable() @@ -461,7 +461,7 @@ Asserts that a directory exists and is readable. Asserts that a directory exists and is writable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L168) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L180) #### assertDoesNotMatchRegularExpression() @@ -474,19 +474,20 @@ Asserts that a directory exists and is writable. Asserts that a string does not match a given regular expression. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L176) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L188) #### assertEmpty() *protected* assertEmpty($actual, $message = '') +* `phpstan-assert` empty $actual * `param mixed` $actual * `param string` $message Asserts that a variable is empty. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L186) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L200) #### assertEquals() @@ -499,7 +500,7 @@ Asserts that a variable is empty. Asserts that two variables are equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L197) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L211) #### assertEqualsCanonicalizing() @@ -512,7 +513,7 @@ Asserts that two variables are equal. Asserts that two variables are equal (canonicalizing). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L208) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L222) #### assertEqualsIgnoringCase() @@ -525,7 +526,7 @@ Asserts that two variables are equal (canonicalizing). Asserts that two variables are equal (ignoring case). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L219) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L233) #### assertEqualsWithDelta() @@ -539,19 +540,20 @@ Asserts that two variables are equal (ignoring case). Asserts that two variables are equal (with delta). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L230) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L244) #### assertFalse() *protected* assertFalse($condition, $message = '') +* `phpstan-assert` false $condition * `param mixed` $condition * `param string` $message Asserts that a condition is false. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L240) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L256) #### assertFileDoesNotExist() @@ -563,7 +565,7 @@ Asserts that a condition is false. Asserts that a file does not exist. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L248) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L264) #### assertFileEquals() @@ -576,7 +578,7 @@ Asserts that a file does not exist. Asserts that the contents of one file is equal to the contents of another file. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L256) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L272) #### assertFileEqualsCanonicalizing() @@ -589,7 +591,7 @@ Asserts that the contents of one file is equal to the contents of another file. Asserts that the contents of one file is equal to the contents of another file (canonicalizing). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L264) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L280) #### assertFileEqualsIgnoringCase() @@ -602,7 +604,7 @@ Asserts that the contents of one file is equal to the contents of another file ( Asserts that the contents of one file is equal to the contents of another file (ignoring case). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L272) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L288) #### assertFileExists() @@ -614,7 +616,7 @@ Asserts that the contents of one file is equal to the contents of another file ( Asserts that a file exists. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L280) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L296) #### assertFileIsNotReadable() @@ -626,7 +628,7 @@ Asserts that a file exists. Asserts that a file exists and is not readable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L288) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L304) #### assertFileIsNotWritable() @@ -638,7 +640,7 @@ Asserts that a file exists and is not readable. Asserts that a file exists and is not writable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L296) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L312) #### assertFileIsReadable() @@ -650,7 +652,7 @@ Asserts that a file exists and is not writable. Asserts that a file exists and is readable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L304) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L320) #### assertFileIsWritable() @@ -662,7 +664,7 @@ Asserts that a file exists and is readable. Asserts that a file exists and is writable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L312) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L328) #### assertFileNotEquals() @@ -675,7 +677,7 @@ Asserts that a file exists and is writable. Asserts that the contents of one file is not equal to the contents of another file. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L320) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L336) #### assertFileNotEqualsCanonicalizing() @@ -688,7 +690,7 @@ Asserts that the contents of one file is not equal to the contents of another fi Asserts that the contents of one file is not equal to the contents of another file (canonicalizing). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L328) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L344) #### assertFileNotEqualsIgnoringCase() @@ -701,7 +703,7 @@ Asserts that the contents of one file is not equal to the contents of another fi Asserts that the contents of one file is not equal to the contents of another file (ignoring case). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L336) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L352) #### assertFileNotExists() @@ -725,7 +727,7 @@ Asserts that a file does not exist. Asserts that a variable is finite. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L346) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L362) #### assertGreaterOrEquals() @@ -751,7 +753,7 @@ Asserts that a value is greater than or equal to another value. Asserts that a value is greater than another value. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L357) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L373) #### assertGreaterThanOrEqual() @@ -764,7 +766,7 @@ Asserts that a value is greater than another value. Asserts that a value is greater than or equal to another value. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L368) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L384) #### assertInfinite() @@ -776,68 +778,74 @@ Asserts that a value is greater than or equal to another value. Asserts that a variable is infinite. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L378) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L394) #### assertInstanceOf() *protected* assertInstanceOf($expected, $actual, $message = '') -* `param string` $expected +* `template` ExpectedType of object +* `phpstan-assert` =ExpectedType $actual +* `param class-string` $expected * `param mixed` $actual * `param string` $message Asserts that a variable is of a given type. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L388) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L409) #### assertIsArray() *protected* assertIsArray($actual, $message = '') +* `phpstan-assert` array $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type array. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L398) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L421) #### assertIsBool() *protected* assertIsBool($actual, $message = '') +* `phpstan-assert` bool $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type bool. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L408) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L433) #### assertIsCallable() *protected* assertIsCallable($actual, $message = '') +* `phpstan-assert` callable $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type callable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L418) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L445) #### assertIsClosedResource() *protected* assertIsClosedResource($actual, $message = '') +* `phpstan-assert` resource $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type resource and is closed. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L428) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L457) #### assertIsEmpty() @@ -856,144 +864,156 @@ Asserts that a variable is empty. *protected* assertIsFloat($actual, $message = '') +* `phpstan-assert` float $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type float. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L438) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L469) #### assertIsInt() *protected* assertIsInt($actual, $message = '') +* `phpstan-assert` int $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type int. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L448) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L481) #### assertIsIterable() *protected* assertIsIterable($actual, $message = '') +* `phpstan-assert` iterable $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type iterable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L458) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L493) #### assertIsNotArray() *protected* assertIsNotArray($actual, $message = '') +* `phpstan-assert` !array $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type array. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L468) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L505) #### assertIsNotBool() *protected* assertIsNotBool($actual, $message = '') +* `phpstan-assert` !bool $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type bool. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L478) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L517) #### assertIsNotCallable() *protected* assertIsNotCallable($actual, $message = '') +* `phpstan-assert` !callable $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type callable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L488) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L529) #### assertIsNotClosedResource() *protected* assertIsNotClosedResource($actual, $message = '') +* `phpstan-assert` !resource $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type resource. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L498) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L541) #### assertIsNotFloat() *protected* assertIsNotFloat($actual, $message = '') +* `phpstan-assert` !float $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type float. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L508) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L553) #### assertIsNotInt() *protected* assertIsNotInt($actual, $message = '') +* `phpstan-assert` !int $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type int. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L518) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L565) #### assertIsNotIterable() *protected* assertIsNotIterable($actual, $message = '') +* `phpstan-assert` !iterable $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type iterable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L528) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L577) #### assertIsNotNumeric() *protected* assertIsNotNumeric($actual, $message = '') +* `phpstan-assert` !numeric $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type numeric. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L538) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L589) #### assertIsNotObject() *protected* assertIsNotObject($actual, $message = '') +* `phpstan-assert` !object $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type object. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L548) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L601) #### assertIsNotReadable() @@ -1005,43 +1025,46 @@ Asserts that a variable is not of type object. Asserts that a file/dir exists and is not readable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L556) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L609) #### assertIsNotResource() *protected* assertIsNotResource($actual, $message = '') +* `phpstan-assert` !resource $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type resource. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L566) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L621) #### assertIsNotScalar() *protected* assertIsNotScalar($actual, $message = '') +* `psalm-assert` !scalar $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type scalar. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L576) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L633) #### assertIsNotString() *protected* assertIsNotString($actual, $message = '') +* `phpstan-assert` !string $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not of type string. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L586) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L645) #### assertIsNotWritable() @@ -1053,31 +1076,33 @@ Asserts that a variable is not of type string. Asserts that a file/dir exists and is not writable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L594) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L653) #### assertIsNumeric() *protected* assertIsNumeric($actual, $message = '') +* `phpstan-assert` numeric $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type numeric. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L604) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L665) #### assertIsObject() *protected* assertIsObject($actual, $message = '') +* `phpstan-assert` object $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type object. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L614) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L677) #### assertIsReadable() @@ -1089,43 +1114,46 @@ Asserts that a variable is of type object. Asserts that a file/dir is readable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L622) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L685) #### assertIsResource() *protected* assertIsResource($actual, $message = '') +* `phpstan-assert` resource $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type resource. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L632) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L697) #### assertIsScalar() *protected* assertIsScalar($actual, $message = '') +* `phpstan-assert` scalar $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type scalar. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L642) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L709) #### assertIsString() *protected* assertIsString($actual, $message = '') +* `phpstan-assert` string $actual * `param mixed` $actual * `param string` $message Asserts that a variable is of type string. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L652) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L721) #### assertIsWritable() @@ -1137,7 +1165,7 @@ Asserts that a variable is of type string. Asserts that a file/dir exists and is writable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L660) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L729) #### assertJson() @@ -1149,7 +1177,7 @@ Asserts that a file/dir exists and is writable. Asserts that a string is a valid JSON string. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L668) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L737) #### assertJsonFileEqualsJsonFile() @@ -1162,7 +1190,7 @@ Asserts that a string is a valid JSON string. Asserts that two JSON files are equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L676) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L745) #### assertJsonFileNotEqualsJsonFile() @@ -1175,7 +1203,7 @@ Asserts that two JSON files are equal. Asserts that two JSON files are not equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L684) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L753) #### assertJsonStringEqualsJsonFile() @@ -1188,7 +1216,7 @@ Asserts that two JSON files are not equal. Asserts that the generated JSON encoded object and the content of the given file are equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L692) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L761) #### assertJsonStringEqualsJsonString() @@ -1201,7 +1229,7 @@ Asserts that the generated JSON encoded object and the content of the given file Asserts that two given JSON encoded objects or arrays are equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L700) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L769) #### assertJsonStringNotEqualsJsonFile() @@ -1214,7 +1242,7 @@ Asserts that two given JSON encoded objects or arrays are equal. Asserts that the generated JSON encoded object and the content of the given file are not equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L708) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L777) #### assertJsonStringNotEqualsJsonString() @@ -1227,7 +1255,7 @@ Asserts that the generated JSON encoded object and the content of the given file Asserts that two given JSON encoded objects or arrays are not equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L716) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L785) #### assertLessOrEquals() @@ -1253,7 +1281,7 @@ Asserts that a value is smaller than or equal to another value. Asserts that a value is smaller than another value. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L727) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L796) #### assertLessThanOrEqual() @@ -1266,7 +1294,7 @@ Asserts that a value is smaller than another value. Asserts that a value is smaller than or equal to another value. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L738) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L807) #### assertMatchesRegularExpression() @@ -1279,7 +1307,7 @@ Asserts that a value is smaller than or equal to another value. Asserts that a string matches a given regular expression. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L746) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L815) #### assertNan() @@ -1291,7 +1319,7 @@ Asserts that a string matches a given regular expression. Asserts that a variable is nan. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L756) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L825) #### assertNot() @@ -1313,7 +1341,7 @@ Asserts that a variable is nan. Asserts that a haystack does not contain a needle. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L766) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L835) #### assertNotContainsEquals() @@ -1324,7 +1352,7 @@ Asserts that a haystack does not contain a needle. * `param iterable` $haystack * `param string` $message -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L771) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L840) #### assertNotContainsOnly() @@ -1338,7 +1366,7 @@ Asserts that a haystack does not contain a needle. Asserts that a haystack does not contain only values of a given type. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L779) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L848) #### assertNotCount() @@ -1351,19 +1379,20 @@ Asserts that a haystack does not contain only values of a given type. Asserts the number of elements of an array, Countable or Traversable. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L789) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L858) #### assertNotEmpty() *protected* assertNotEmpty($actual, $message = '') +* `phpstan-assert` !empty $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not empty. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L799) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L870) #### assertNotEquals() @@ -1376,7 +1405,7 @@ Asserts that a variable is not empty. Asserts that two variables are not equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L810) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L881) #### assertNotEqualsCanonicalizing() @@ -1389,7 +1418,7 @@ Asserts that two variables are not equal. Asserts that two variables are not equal (canonicalizing). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L821) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L892) #### assertNotEqualsIgnoringCase() @@ -1402,7 +1431,7 @@ Asserts that two variables are not equal (canonicalizing). Asserts that two variables are not equal (ignoring case). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L832) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L903) #### assertNotEqualsWithDelta() @@ -1416,44 +1445,48 @@ Asserts that two variables are not equal (ignoring case). Asserts that two variables are not equal (with delta). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L843) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L914) #### assertNotFalse() *protected* assertNotFalse($condition, $message = '') +* `phpstan-assert` !false $condition * `param mixed` $condition * `param string` $message Asserts that a condition is not false. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L853) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L926) #### assertNotInstanceOf() *protected* assertNotInstanceOf($expected, $actual, $message = '') -* `param string` $expected +* `template` ExpectedType of object +* `phpstan-assert` !ExpectedType $actual +* `param class-string` $expected * `param mixed` $actual * `param string` $message Asserts that a variable is not of a given type. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L863) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L941) #### assertNotNull() *protected* assertNotNull($actual, $message = '') +* `phpstan-assert` !null $actual * `param mixed` $actual * `param string` $message Asserts that a variable is not null. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L873) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L953) #### assertNotRegExp() @@ -1479,7 +1512,7 @@ Asserts that a string does not match a given regular expression. Asserts that two variables do not have the same type and value. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L884) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L964) #### assertNotSameSize() @@ -1492,31 +1525,33 @@ Asserts that two variables do not have the same type and value. Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L895) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L975) #### assertNotTrue() *protected* assertNotTrue($condition, $message = '') +* `phpstan-assert` !true $condition * `param mixed` $condition * `param string` $message Asserts that a condition is not true. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L905) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L987) #### assertNull() *protected* assertNull($actual, $message = '') +* `phpstan-assert` null $actual * `param mixed` $actual * `param string` $message Asserts that a variable is null. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L915) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L999) #### assertObjectHasAttribute() @@ -1529,7 +1564,7 @@ Asserts that a variable is null. Asserts that an object has a specified attribute. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L923) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1007) #### assertObjectNotHasAttribute() @@ -1542,7 +1577,7 @@ Asserts that an object has a specified attribute. Asserts that an object does not have a specified attribute. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L937) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1021) #### assertRegExp() @@ -1562,13 +1597,18 @@ Asserts that a string matches a given regular expression. *protected* assertSame($expected, $actual, $message = '') -* `param mixed` $expected +* `template` ExpectedType +* `phpstan-assert` =ExpectedType $actual +* `param ExpectedType` $expected * `param mixed` $actual * `param string` $message Asserts that two variables have the same type and value. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L954) +Used on objects, it asserts that two variables reference +the same object. + +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1044) #### assertSameSize() @@ -1581,7 +1621,7 @@ Asserts that two variables have the same type and value. Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L965) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1055) #### assertStringContainsString() @@ -1592,7 +1632,7 @@ Assert that the size of two arrays (or `Countable` or `Traversable` objects) is * `param string` $haystack * `param string` $message -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L970) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1060) #### assertStringContainsStringIgnoringCase() @@ -1603,7 +1643,7 @@ Assert that the size of two arrays (or `Countable` or `Traversable` objects) is * `param string` $haystack * `param string` $message -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L975) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1065) #### assertStringEndsNotWith() @@ -1616,7 +1656,7 @@ Assert that the size of two arrays (or `Countable` or `Traversable` objects) is Asserts that a string ends not with a given suffix. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L983) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1073) #### assertStringEndsWith() @@ -1629,7 +1669,7 @@ Asserts that a string ends not with a given suffix. Asserts that a string ends with a given suffix. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L991) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1081) #### assertStringEqualsFile() @@ -1642,7 +1682,7 @@ Asserts that a string ends with a given suffix. Asserts that the contents of a string is equal to the contents of a file. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L999) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1089) #### assertStringEqualsFileCanonicalizing() @@ -1655,7 +1695,7 @@ Asserts that the contents of a string is equal to the contents of a file. Asserts that the contents of a string is equal to the contents of a file (canonicalizing). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1007) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1097) #### assertStringEqualsFileIgnoringCase() @@ -1668,7 +1708,7 @@ Asserts that the contents of a string is equal to the contents of a file (canoni Asserts that the contents of a string is equal to the contents of a file (ignoring case). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1015) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1105) #### assertStringMatchesFormat() @@ -1681,7 +1721,7 @@ Asserts that the contents of a string is equal to the contents of a file (ignori Asserts that a string matches a given format string. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1023) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1113) #### assertStringMatchesFormatFile() @@ -1694,7 +1734,7 @@ Asserts that a string matches a given format string. Asserts that a string matches a given format file. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1031) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1121) #### assertStringNotContainsString() @@ -1705,7 +1745,7 @@ Asserts that a string matches a given format file. * `param string` $haystack * `param string` $message -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1036) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1126) #### assertStringNotContainsStringIgnoringCase() @@ -1716,7 +1756,7 @@ Asserts that a string matches a given format file. * `param string` $haystack * `param string` $message -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1041) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1131) #### assertStringNotEqualsFile() @@ -1729,7 +1769,7 @@ Asserts that a string matches a given format file. Asserts that the contents of a string is not equal to the contents of a file. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1049) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1139) #### assertStringNotEqualsFileCanonicalizing() @@ -1742,7 +1782,7 @@ Asserts that the contents of a string is not equal to the contents of a file. Asserts that the contents of a string is not equal to the contents of a file (canonicalizing). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1057) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1147) #### assertStringNotEqualsFileIgnoringCase() @@ -1755,7 +1795,7 @@ Asserts that the contents of a string is not equal to the contents of a file (ca Asserts that the contents of a string is not equal to the contents of a file (ignoring case). -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1065) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1155) #### assertStringNotMatchesFormat() @@ -1768,7 +1808,7 @@ Asserts that the contents of a string is not equal to the contents of a file (ig Asserts that a string does not match a given format string. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1073) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1163) #### assertStringNotMatchesFormatFile() @@ -1781,7 +1821,7 @@ Asserts that a string does not match a given format string. Asserts that a string does not match a given format string. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1081) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1179) #### assertStringStartsNotWith() @@ -1794,7 +1834,7 @@ Asserts that a string does not match a given format string. Asserts that a string starts not with a given prefix. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1089) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1201) #### assertStringStartsWith() @@ -1807,7 +1847,7 @@ Asserts that a string starts not with a given prefix. Asserts that a string starts with a given prefix. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1097) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1209) #### assertThat() @@ -1820,7 +1860,7 @@ Asserts that a string starts with a given prefix. Evaluates a PHPUnit\Framework\Constraint matcher object. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1107) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1219) #### assertThatItsNot() @@ -1840,12 +1880,13 @@ Evaluates a PHPUnit\Framework\Constraint matcher object. *protected* assertTrue($condition, $message = '') +* `phpstan-assert` true $condition * `param mixed` $condition * `param string` $message Asserts that a condition is true. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1117) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1231) #### assertXmlFileEqualsXmlFile() @@ -1858,7 +1899,7 @@ Asserts that a condition is true. Asserts that two XML files are equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1125) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1239) #### assertXmlFileNotEqualsXmlFile() @@ -1871,7 +1912,7 @@ Asserts that two XML files are equal. Asserts that two XML files are not equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1133) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1247) #### assertXmlStringEqualsXmlFile() @@ -1884,7 +1925,7 @@ Asserts that two XML files are not equal. Asserts that two XML documents are equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1143) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1257) #### assertXmlStringEqualsXmlString() @@ -1897,7 +1938,7 @@ Asserts that two XML documents are equal. Asserts that two XML documents are equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1154) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1268) #### assertXmlStringNotEqualsXmlFile() @@ -1910,7 +1951,7 @@ Asserts that two XML documents are equal. Asserts that two XML documents are not equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1164) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1278) #### assertXmlStringNotEqualsXmlString() @@ -1923,7 +1964,7 @@ Asserts that two XML documents are not equal. Asserts that two XML documents are not equal. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1175) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1289) #### debug() @@ -1959,7 +2000,7 @@ Print debug message with a title Fails a test with the given message. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1183) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1297) #### getModule() @@ -2004,6 +2045,17 @@ Checks that module is enabled. [See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L264) +#### hasStaticAttribute() + + *private static* hasStaticAttribute($attributeName, $className) + + +* `see` https://github.com/sebastianbergmann/phpunit/blob/9.6/src/Framework/Constraint/Object/ClassHasStaticAttribute.php +* `param string` $attributeName +* `param string` $className + +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1321) + #### markTestIncomplete() *protected* markTestIncomplete($message = '') @@ -2013,7 +2065,7 @@ Checks that module is enabled. Mark the test as incomplete. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1191) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1305) #### markTestSkipped() @@ -2024,7 +2076,7 @@ Mark the test as incomplete. Mark the test as skipped. -[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1199) +[See source](https://github.com/Codeception/Codeception/blob/5.1/src/Codeception/Module.php#L1313) #### onReconfigure() From 127ee1fd94cc7bf11b345d1d89ffbcdf683fe2c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Mar 2025 08:19:51 +0000 Subject: [PATCH 063/156] updated --- changelog.markdown | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index 0c2b65df1..0b42f69ed 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,27 @@ title: Codeception Changelog +### module-rest 3.4.1: 3.4.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/03/26 07:58:15 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) + + + +## What's Changed +* Allow installation of justinrainbow/json-schema:6.0 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-rest/pull/108 +* Remove unnecessary files from Composer package by **[s1lver](https://github.com/s1lver)** in https://github.com/Codeception/module-rest/pull/111 +* Show property name on failing JSON schema assertions by **[francislavoie](https://github.com/francislavoie)** in https://github.com/Codeception/module-rest/pull/105 +* Fix tests for PHPUnit 12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-rest/pull/113 +* PHP 8.4: Avoid usage of the deprecated E_STRICT constant by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-rest/pull/109 +* Allow softcreatr/jsonpath v0.10 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-rest/pull/115 + +## New Contributors +* **[s1lver](https://github.com/s1lver)** made their first contribution in https://github.com/Codeception/module-rest/pull/111 +* **[francislavoie](https://github.com/francislavoie)** made their first contribution in https://github.com/Codeception/module-rest/pull/105 + +**Full Changelog**: https://github.com/Codeception/module-rest/compare/3.4.0...3.4.1 + + ### lib-asserts 2.2.0: 2.2.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2025/03/10 20:42:27 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) @@ -4277,15 +4298,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-rest 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:29:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) - - - - - - ### module-phpbrowser 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:28:32 / [Repository](https://github.com/Codeception/module-phpbrowser) / [Releases](https://github.com/Codeception/module-phpbrowser/releases) From f0c3cc411bdabfb3c546699a4d5de76b06bea552 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Apr 2025 13:26:01 +0000 Subject: [PATCH 064/156] updated --- changelog.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 0b42f69ed..fcf20aa78 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,24 @@ title: Codeception Changelog +### module-yii2 v2.0.3: v2.0.3 + +Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/04/01 13:18:15 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) + + + +## [2.0.3](https://github.com/Codeception/module-yii2/compare/v2.0.2...v2.0.3) (2025-04-01) + + +### Bug Fixes + +* server params refactor broke format ([8c789c9](https://github.com/Codeception/module-yii2/commit/8c789c94c1eb8c4ae0b5873c3a17ea9fda31994d)) + + + + + + ### module-rest 3.4.1: 3.4.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/03/26 07:58:15 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) From c422486e3803dc2a5bcd00ea7ff12eb712dd6b03 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 21 Apr 2025 23:14:02 +0000 Subject: [PATCH 065/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,17 +5,37 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + ## DryRun @@ -29,46 +49,57 @@ Shows step-by-step execution process for scenario driven tests without actually -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateHelper +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## GherkinSnippets -@author Franck Cassedanne +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` @@ -165,171 +196,140 @@ Options: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Clean +Recursively cleans `output` directory and generated code. -## ConfigValidate +* `codecept clean` -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## Init -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateCest +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateSuite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Create new test suite. Requires suite name and actor name -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## GenerateEnvironment +## GenerateGroup -Generates empty environment configuration file into envs dir: +Creates empty GroupObject - extension which handles all group events. - * `codecept g:env firefox` +* `codecept g:group Admin` -Required to have `envs` path to be specified in `codeception.yml` +## SelfUpdate -## Console +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Try to execute test commands in run-time. You may try commands before writing the test. +* `php codecept.phar self-update` -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +@author Franck Cassedanne -## GenerateSuite +## Build -Create new test suite. Requires suite name and actor name +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept build` +* `codecept build path/to/project` -## Build +## GenerateFeature -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates Feature file (in Gherkin): -* `codecept build` -* `codecept build path/to/project` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Clean +## Bootstrap -Recursively cleans `output` directory and generated code. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept clean` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GherkinSnippets +## ConfigValidate -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateFeature +Check overriding config values (like in `run` command) -Generates Feature file (in Gherkin): +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` From 918a9143786ddff02ef67c50a2a65907dc11ee36 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Apr 2025 01:12:05 +0000 Subject: [PATCH 066/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,35 +5,15 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite -## GenerateSnapshot +{% highlight yaml %} +codecept gherkin:steps acceptance -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +{% endhighlight %} -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` @@ -49,57 +29,46 @@ Shows step-by-step execution process for scenario driven tests without actually -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Init -## GenerateHelper - -Creates empty Helper class. +## GenerateCest -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## SelfUpdate -Usage: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `php codecept.phar self-update` +@author Franck Cassedanne -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateTest -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## GenerateGroup - * `codecept g:env firefox` +Creates empty GroupObject - extension which handles all group events. -Required to have `envs` path to be specified in `codeception.yml` +* `codecept g:group Admin` @@ -196,140 +165,171 @@ Options: -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateSnapshot -## Clean +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Recursively cleans `output` directory and generated code. +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `codecept clean` +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). -## Init +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateCest +## GeneratePageObject -Generates Cest (scenario-driven object-oriented test) file: +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## ConfigValidate -## Console +Validates and prints Codeception config. +Use it do debug Yaml configs -Try to execute test commands in run-time. You may try commands before writing the test. +Check config: -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateSuite +Check overriding config values (like in `run` command) -Create new test suite. Requires suite name and actor name +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateHelper -## GenerateGroup +Creates empty Helper class. -Creates empty GroupObject - extension which handles all group events. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept g:group Admin` -## SelfUpdate +## Bootstrap -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `php codecept.phar self-update` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -@author Franck Cassedanne +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +## GenerateEnvironment -* `codecept build` -* `codecept build path/to/project` +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature -Generates Feature file (in Gherkin): +## Console -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap +## GenerateSuite -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Create new test suite. Requires suite name and actor name -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Build -## ConfigValidate +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept build` +* `codecept build path/to/project` -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## Clean -Check overriding config values (like in `run` command) +Recursively cleans `output` directory and generated code. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept clean` + + + + + +## GherkinSnippets + +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects + +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From c884bdf250b669f7c579f628b5f67311647e9bbc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Apr 2025 06:21:58 +0000 Subject: [PATCH 067/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,17 +5,37 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + ## DryRun @@ -29,46 +49,57 @@ Shows step-by-step execution process for scenario driven tests without actually -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateHelper +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## GherkinSnippets -@author Franck Cassedanne +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` @@ -165,171 +196,140 @@ Options: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Clean +Recursively cleans `output` directory and generated code. -## ConfigValidate +* `codecept clean` -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## Init -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateCest +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateSuite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Create new test suite. Requires suite name and actor name -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## GenerateEnvironment +## GenerateGroup -Generates empty environment configuration file into envs dir: +Creates empty GroupObject - extension which handles all group events. - * `codecept g:env firefox` +* `codecept g:group Admin` -Required to have `envs` path to be specified in `codeception.yml` +## SelfUpdate -## Console +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Try to execute test commands in run-time. You may try commands before writing the test. +* `php codecept.phar self-update` -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +@author Franck Cassedanne -## GenerateSuite +## Build -Create new test suite. Requires suite name and actor name +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept build` +* `codecept build path/to/project` -## Build +## GenerateFeature -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates Feature file (in Gherkin): -* `codecept build` -* `codecept build path/to/project` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Clean +## Bootstrap -Recursively cleans `output` directory and generated code. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept clean` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GherkinSnippets +## ConfigValidate -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateFeature +Check overriding config values (like in `run` command) -Generates Feature file (in Gherkin): +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` From c1cd8218d3019eca7c08942e519a5e239b4f92b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Apr 2025 07:15:42 +0000 Subject: [PATCH 068/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,35 +5,15 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite -## GenerateSnapshot +{% highlight yaml %} +codecept gherkin:steps acceptance -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +{% endhighlight %} -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` @@ -49,57 +29,46 @@ Shows step-by-step execution process for scenario driven tests without actually -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Init -## GenerateHelper - -Creates empty Helper class. +## GenerateCest -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## SelfUpdate -Usage: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `php codecept.phar self-update` +@author Franck Cassedanne -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateTest -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## GenerateGroup - * `codecept g:env firefox` +Creates empty GroupObject - extension which handles all group events. -Required to have `envs` path to be specified in `codeception.yml` +* `codecept g:group Admin` @@ -196,140 +165,171 @@ Options: -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateSnapshot -## Clean +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Recursively cleans `output` directory and generated code. +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `codecept clean` +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). -## Init +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateCest +## GeneratePageObject -Generates Cest (scenario-driven object-oriented test) file: +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## ConfigValidate -## Console +Validates and prints Codeception config. +Use it do debug Yaml configs -Try to execute test commands in run-time. You may try commands before writing the test. +Check config: -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateSuite +Check overriding config values (like in `run` command) -Create new test suite. Requires suite name and actor name +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateHelper -## GenerateGroup +Creates empty Helper class. -Creates empty GroupObject - extension which handles all group events. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept g:group Admin` -## SelfUpdate +## Bootstrap -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `php codecept.phar self-update` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -@author Franck Cassedanne +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +## GenerateEnvironment -* `codecept build` -* `codecept build path/to/project` +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature -Generates Feature file (in Gherkin): +## Console -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap +## GenerateSuite -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Create new test suite. Requires suite name and actor name -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Build -## ConfigValidate +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept build` +* `codecept build path/to/project` -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## Clean -Check overriding config values (like in `run` command) +Recursively cleans `output` directory and generated code. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept clean` + + + + + +## GherkinSnippets + +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects + +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From 74026caa37e14a3b57199d4842401e24495ab17d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Apr 2025 14:15:21 +0000 Subject: [PATCH 069/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,17 +5,37 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + ## DryRun @@ -29,46 +49,57 @@ Shows step-by-step execution process for scenario driven tests without actually -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateHelper +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## GherkinSnippets -@author Franck Cassedanne +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` @@ -165,171 +196,140 @@ Options: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Clean +Recursively cleans `output` directory and generated code. -## ConfigValidate +* `codecept clean` -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## Init -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateCest +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateSuite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Create new test suite. Requires suite name and actor name -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## GenerateEnvironment +## GenerateGroup -Generates empty environment configuration file into envs dir: +Creates empty GroupObject - extension which handles all group events. - * `codecept g:env firefox` +* `codecept g:group Admin` -Required to have `envs` path to be specified in `codeception.yml` +## SelfUpdate -## Console +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Try to execute test commands in run-time. You may try commands before writing the test. +* `php codecept.phar self-update` -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +@author Franck Cassedanne -## GenerateSuite +## Build -Create new test suite. Requires suite name and actor name +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept build` +* `codecept build path/to/project` -## Build +## GenerateFeature -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates Feature file (in Gherkin): -* `codecept build` -* `codecept build path/to/project` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Clean +## Bootstrap -Recursively cleans `output` directory and generated code. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept clean` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GherkinSnippets +## ConfigValidate -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateFeature +Check overriding config values (like in `run` command) -Generates Feature file (in Gherkin): +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` From 30c74f056aa87b7a0d73a2afaff347851f408ddb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Apr 2025 16:19:15 +0000 Subject: [PATCH 070/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,35 +5,15 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite -## GenerateSnapshot +{% highlight yaml %} +codecept gherkin:steps acceptance -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +{% endhighlight %} -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` @@ -49,57 +29,46 @@ Shows step-by-step execution process for scenario driven tests without actually -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Init -## GenerateHelper - -Creates empty Helper class. +## GenerateCest -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## SelfUpdate -Usage: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `php codecept.phar self-update` +@author Franck Cassedanne -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateTest -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## GenerateGroup - * `codecept g:env firefox` +Creates empty GroupObject - extension which handles all group events. -Required to have `envs` path to be specified in `codeception.yml` +* `codecept g:group Admin` @@ -196,140 +165,171 @@ Options: -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateSnapshot -## Clean +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Recursively cleans `output` directory and generated code. +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `codecept clean` +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). -## Init +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateCest +## GeneratePageObject -Generates Cest (scenario-driven object-oriented test) file: +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## ConfigValidate -## Console +Validates and prints Codeception config. +Use it do debug Yaml configs -Try to execute test commands in run-time. You may try commands before writing the test. +Check config: -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateSuite +Check overriding config values (like in `run` command) -Create new test suite. Requires suite name and actor name +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateHelper -## GenerateGroup +Creates empty Helper class. -Creates empty GroupObject - extension which handles all group events. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept g:group Admin` -## SelfUpdate +## Bootstrap -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `php codecept.phar self-update` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -@author Franck Cassedanne +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +## GenerateEnvironment -* `codecept build` -* `codecept build path/to/project` +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature -Generates Feature file (in Gherkin): +## Console -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap +## GenerateSuite -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Create new test suite. Requires suite name and actor name -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Build -## ConfigValidate +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept build` +* `codecept build path/to/project` -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## Clean -Check overriding config values (like in `run` command) +Recursively cleans `output` directory and generated code. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept clean` + + + + + +## GherkinSnippets + +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects + +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From 7360fedcec4c450907e6808cc50f6a5d8fbff4b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Apr 2025 23:13:57 +0000 Subject: [PATCH 071/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,17 +5,37 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + ## DryRun @@ -29,46 +49,57 @@ Shows step-by-step execution process for scenario driven tests without actually -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateHelper +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## GherkinSnippets -@author Franck Cassedanne +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` @@ -165,171 +196,140 @@ Options: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Clean +Recursively cleans `output` directory and generated code. -## ConfigValidate +* `codecept clean` -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## Init -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateCest +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateSuite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Create new test suite. Requires suite name and actor name -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## GenerateEnvironment +## GenerateGroup -Generates empty environment configuration file into envs dir: +Creates empty GroupObject - extension which handles all group events. - * `codecept g:env firefox` +* `codecept g:group Admin` -Required to have `envs` path to be specified in `codeception.yml` +## SelfUpdate -## Console +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Try to execute test commands in run-time. You may try commands before writing the test. +* `php codecept.phar self-update` -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +@author Franck Cassedanne -## GenerateSuite +## Build -Create new test suite. Requires suite name and actor name +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept build` +* `codecept build path/to/project` -## Build +## GenerateFeature -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates Feature file (in Gherkin): -* `codecept build` -* `codecept build path/to/project` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Clean +## Bootstrap -Recursively cleans `output` directory and generated code. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept clean` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GherkinSnippets +## ConfigValidate -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateFeature +Check overriding config values (like in `run` command) -Generates Feature file (in Gherkin): +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` From 2caef8c00676aee5741ff140067320bd3f6aaaf8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Apr 2025 01:12:33 +0000 Subject: [PATCH 072/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,35 +5,15 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite -## GenerateSnapshot +{% highlight yaml %} +codecept gherkin:steps acceptance -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +{% endhighlight %} -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` @@ -49,57 +29,46 @@ Shows step-by-step execution process for scenario driven tests without actually -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Init -## GenerateHelper - -Creates empty Helper class. +## GenerateCest -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## SelfUpdate -Usage: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `php codecept.phar self-update` +@author Franck Cassedanne -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateTest -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## GenerateGroup - * `codecept g:env firefox` +Creates empty GroupObject - extension which handles all group events. -Required to have `envs` path to be specified in `codeception.yml` +* `codecept g:group Admin` @@ -196,140 +165,171 @@ Options: -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateSnapshot -## Clean +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Recursively cleans `output` directory and generated code. +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `codecept clean` +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). -## Init +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateCest +## GeneratePageObject -Generates Cest (scenario-driven object-oriented test) file: +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## ConfigValidate -## Console +Validates and prints Codeception config. +Use it do debug Yaml configs -Try to execute test commands in run-time. You may try commands before writing the test. +Check config: -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateSuite +Check overriding config values (like in `run` command) -Create new test suite. Requires suite name and actor name +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateHelper -## GenerateGroup +Creates empty Helper class. -Creates empty GroupObject - extension which handles all group events. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept g:group Admin` -## SelfUpdate +## Bootstrap -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `php codecept.phar self-update` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -@author Franck Cassedanne +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +## GenerateEnvironment -* `codecept build` -* `codecept build path/to/project` +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature -Generates Feature file (in Gherkin): +## Console -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap +## GenerateSuite -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Create new test suite. Requires suite name and actor name -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Build -## ConfigValidate +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept build` +* `codecept build path/to/project` -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## Clean -Check overriding config values (like in `run` command) +Recursively cleans `output` directory and generated code. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept clean` + + + + + +## GherkinSnippets + +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects + +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From ab73cec97256500ceea392e2d9c5b1513fe2adfb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Apr 2025 05:16:05 +0000 Subject: [PATCH 073/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,17 +5,37 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + ## DryRun @@ -29,46 +49,57 @@ Shows step-by-step execution process for scenario driven tests without actually -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateHelper +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## GherkinSnippets -@author Franck Cassedanne +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` @@ -165,171 +196,140 @@ Options: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Clean +Recursively cleans `output` directory and generated code. -## ConfigValidate +* `codecept clean` -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## Init -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateCest +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateSuite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Create new test suite. Requires suite name and actor name -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## GenerateEnvironment +## GenerateGroup -Generates empty environment configuration file into envs dir: +Creates empty GroupObject - extension which handles all group events. - * `codecept g:env firefox` +* `codecept g:group Admin` -Required to have `envs` path to be specified in `codeception.yml` +## SelfUpdate -## Console +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Try to execute test commands in run-time. You may try commands before writing the test. +* `php codecept.phar self-update` -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +@author Franck Cassedanne -## GenerateSuite +## Build -Create new test suite. Requires suite name and actor name +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept build` +* `codecept build path/to/project` -## Build +## GenerateFeature -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates Feature file (in Gherkin): -* `codecept build` -* `codecept build path/to/project` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Clean +## Bootstrap -Recursively cleans `output` directory and generated code. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept clean` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GherkinSnippets +## ConfigValidate -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateFeature +Check overriding config values (like in `run` command) -Generates Feature file (in Gherkin): +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` From 0bc317a90844b02e62457f52fe7dd830ccc3cc65 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Apr 2025 06:21:50 +0000 Subject: [PATCH 074/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..83423fbab 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,35 +5,15 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite -## GenerateSnapshot +{% highlight yaml %} +codecept gherkin:steps acceptance -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +{% endhighlight %} -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` @@ -49,57 +29,46 @@ Shows step-by-step execution process for scenario driven tests without actually -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Init -## GenerateHelper - -Creates empty Helper class. +## GenerateCest -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +## SelfUpdate -Usage: +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `php codecept.phar self-update` +@author Franck Cassedanne -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateTest -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## GenerateGroup - * `codecept g:env firefox` +Creates empty GroupObject - extension which handles all group events. -Required to have `envs` path to be specified in `codeception.yml` +* `codecept g:group Admin` @@ -196,140 +165,171 @@ Options: -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateSnapshot -## Clean +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Recursively cleans `output` directory and generated code. +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `codecept clean` +## GenerateScenarios +Generates user-friendly text scenarios from scenario-driven tests (Cest). -## Init +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -## GenerateCest +## GeneratePageObject -Generates Cest (scenario-driven object-oriented test) file: +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## ConfigValidate -## Console +Validates and prints Codeception config. +Use it do debug Yaml configs -Try to execute test commands in run-time. You may try commands before writing the test. +Check config: -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateSuite +Check overriding config values (like in `run` command) -Create new test suite. Requires suite name and actor name +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateHelper -## GenerateGroup +Creates empty Helper class. -Creates empty GroupObject - extension which handles all group events. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept g:group Admin` -## SelfUpdate +## Bootstrap -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `php codecept.phar self-update` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -@author Franck Cassedanne +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +## GenerateEnvironment -* `codecept build` -* `codecept build path/to/project` +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature -Generates Feature file (in Gherkin): +## Console -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap +## GenerateSuite -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +Create new test suite. Requires suite name and actor name -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Build -## ConfigValidate +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept build` +* `codecept build path/to/project` -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## Clean -Check overriding config values (like in `run` command) +Recursively cleans `output` directory and generated code. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept clean` + + + + + +## GherkinSnippets + +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects + +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` From 0671072fb0c01e0cf6df081ea8500083bf331a38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Apr 2025 13:26:21 +0000 Subject: [PATCH 075/156] updated --- docs/reference/Commands.md | 234 ++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 83423fbab..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,17 +5,37 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSteps +## GenerateStepObject -Prints all steps from all Gherkin contexts for a specific suite +Generates StepObject class. You will be asked for steps you want to implement. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -{% endhighlight %} +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + ## DryRun @@ -29,46 +49,57 @@ Shows step-by-step execution process for scenario driven tests without actually -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateHelper +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## GherkinSnippets -@author Franck Cassedanne +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` @@ -165,171 +196,140 @@ Options: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## Clean +Recursively cleans `output` directory and generated code. -## ConfigValidate +* `codecept clean` -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## Init -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateCest +Generates Cest (scenario-driven object-oriented test) file: +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateSuite -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Create new test suite. Requires suite name and actor name -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## GenerateEnvironment +## GenerateGroup -Generates empty environment configuration file into envs dir: +Creates empty GroupObject - extension which handles all group events. - * `codecept g:env firefox` +* `codecept g:group Admin` -Required to have `envs` path to be specified in `codeception.yml` +## SelfUpdate -## Console +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Try to execute test commands in run-time. You may try commands before writing the test. +* `php codecept.phar self-update` -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +@author Franck Cassedanne -## GenerateSuite +## Build -Create new test suite. Requires suite name and actor name +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +* `codecept build` +* `codecept build path/to/project` -## Build +## GenerateFeature -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates Feature file (in Gherkin): -* `codecept build` -* `codecept build path/to/project` +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Clean +## Bootstrap -Recursively cleans `output` directory and generated code. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept clean` +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GherkinSnippets +## ConfigValidate -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Validates and prints Codeception config. +Use it do debug Yaml configs -Usage: +Check config: -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -## GenerateFeature +Check overriding config values (like in `run` command) -Generates Feature file (in Gherkin): +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` From 75718850385028c1ea4f2662ca379688d2837d04 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Apr 2025 14:14:24 +0000 Subject: [PATCH 076/156] updated --- changelog.markdown | 219 --------------------------------------------- 1 file changed, 219 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index fcf20aa78..55d9631a4 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -531,19 +531,6 @@ Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhaj **Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.3...3.1.4 -### module-doctrine2 3.0.4: 3.0.4 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/04/04 16:33:24 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -## What's Changed -* Test against PHP 8.2 + 8.3 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-doctrine2/pull/76 -* Update composer.json: Adding `abandoned` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/80 - -**Full Changelog**: https://github.com/Codeception/module-doctrine2/compare/3.0.3...3.0.4 - - ### module-symfony 3.3.2: 3.3.2 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/18 15:08:50 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) @@ -926,24 +913,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Mentioning `` tag requirement by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/4 -### module-doctrine2 3.0.3: 3.0.3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 19:38:46 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -* Adding recommendation for Symfony users by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/69 - - -### module-doctrine2 3.0.2: 3.0.2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/18 18:36:57 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -* Documentation updates [#67](https://github.com/Codeception/module-doctrine2/issues/67) and [#68](https://github.com/Codeception/module-doctrine2/issues/68) by **[ThomasLandauer](https://github.com/ThomasLandauer)** - - ### Codeception 5.0.10: 5.0.10 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/14 07:27:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -1065,15 +1034,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support codeception/lib-innerbrowser v4 -### module-doctrine2 3.0.1: 3.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:55:15 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -* Fix deprecated string interpolation by **[Kolyunya](https://github.com/Kolyunya)** in https://github.com/Codeception/module-doctrine2/pull/59 - - ### module-symfony 3.1.1: 3.1.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:50:11 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) @@ -1506,15 +1466,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Variadic parameters can be skipped in dependency injection [#6505](https://github.com/Codeception/Codeception/issues/6505) -### module-datafactory 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/18 16:39:04 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - -* Support for Codeception 5.0 - - ### module-yii2 1.1.7: 1.1.7 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/15 18:10:54 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -1842,15 +1793,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support for Codeception 5 -### module-amqp 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/20 09:26:33 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) - - - -* Support for Codeception 5, thanks to **[W0rma](https://github.com/W0rma)** - - ### module-symfony 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/16 08:53:07 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) @@ -2072,15 +2014,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -* Codeception 5 support - - -### module-doctrine2 3.0.0: 3.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 10:51:03 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - * Codeception 5 support @@ -2116,15 +2049,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/2.0.1...2.0.2 -### module-doctrine2 2.0.1: 2.0.1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/01/28 18:34:39 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -* Binary strings don't break (dont)seeInRepository by **[frankverhoeven](https://github.com/frankverhoeven)** - - ### module-webdriver 2.0.2: 2.0.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/01/23 12:00:55 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2410,23 +2334,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-asserts/compare/1.3.1...2.0.0 -### module-datafactory 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:00:26 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - -## What's Changed - -* PHP 7.4 or higher is required. -* Support PHP 8.1 -* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-datafactory/pull/9 and https://github.com/Codeception/module-datafactory/pull/14 -* Documentation changes by **[DavertMik](https://github.com/DavertMik)** in https://github.com/Codeception/module-datafactory/pull/11 -* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-datafactory/pull/13 - -**Full Changelog**: https://github.com/Codeception/module-datafactory/compare/1.1.0...2.0.0 - - ### module-mongodb 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 14:55:38 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -2586,26 +2493,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-mezzio/compare/2.0.2...3.0.0 -### module-doctrine2 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:59:34 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -## What's Changed - -* PHP 7.4 or higher is required. -* Support PHP 8.1 -* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-doctrine2/pull/40 and https://github.com/Codeception/module-doctrine2/pull/47 -* Added phpstan by **[b1rdex](https://github.com/b1rdex)** in https://github.com/Codeception/module-doctrine2/pull/46 -* Use hash to store repository mock by **[olexp](https://github.com/olexp)** in https://github.com/Codeception/module-doctrine2/pull/45 and https://github.com/Codeception/module-doctrine2/pull/48 -* Better explaining `depends` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/23 -* Adding link to `doctrine/data-fixtures` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/39 -* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-doctrine2/pull/43 - -**Full Changelog**: https://github.com/Codeception/module-doctrine2/compare/1.1.1...2.0.0 - - ### module-apc 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:51:33 / [Repository](https://github.com/Codeception/module-apc) / [Releases](https://github.com/Codeception/module-apc/releases) @@ -2621,20 +2508,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-apc/compare/1.0.2...2.0.0 -### module-amqp 2.0.0: 2.0.0 - -Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:47:28 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) - - - -## What's Changed - -* PHP 7.4 or higher is required. -* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-amqp/pull/12 - -**Full Changelog**: https://github.com/Codeception/module-amqp/compare/1.1.1...2.0.0 - - ### module-laminas 1.3.0: 1.3.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:44:00 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -2885,15 +2758,6 @@ This release includes a general refactoring of the code ([#30](https://github.co See the full list of changes [here](https://github.com/Codeception/module-laravel/milestone/3). -### module-amqp 1.1.1: seeMessageInQueueContainsText acks message - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/09/05 07:47:08 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) - - - -* Stops keeping message in unacked stated, by **[renq](https://github.com/renq)** - - ### module-webdriver 1.4.0: Added new methods Released by [![](https://avatars.githubusercontent.com/u/220264?v=4&s=16) DavertMik](https://github.com/DavertMik) on 2021/09/02 12:08:19 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -3132,25 +2996,6 @@ Minor changes in documentation by **[ThomasLandauer](https://github.com/ThomasLa -### module-amqp 1.1.0: Support PHP 8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/21 15:29:11 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) - - - -* Support PHP 8.0 -* Support php-amqplib v3 - - -### module-datafactory 1.1.0: Added Custom Store - -Released by [![](https://avatars.githubusercontent.com/u/220264?v=4&s=16) DavertMik](https://github.com/DavertMik) on 2021/03/16 19:42:52 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - -Custom Store can be used for Data Factory. See [#2](https://github.com/Codeception/module-datafactory/issues/2) - - ### lib-innerbrowser 1.4.1: Fix grabTextFrom TypeError Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/02 08:03:49 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -3264,15 +3109,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fixed filling of fields that are linked to form using `form` attribute https://github.com/Codeception/Codeception/issues/6022 -### module-datafactory 1.0.1: PHP8 support - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/12/30 15:56:46 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - - - - ### module-laravel 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/29 20:52:27 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) @@ -3418,15 +3254,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-doctrine2 1.1.1: Support PHP 8 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/26 06:57:10 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - - - - ### module-symfony 1.4.1: 1.4.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/25 19:31:47 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) @@ -3518,16 +3345,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-doctrine2 1.1.0: - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/14 20:44:32 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - -* Configurable purge mode - DELETE or TRUNCATE -* Catch MappingException thrown by Doctrine 2.9 - - ### module-soap 1.0.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/07 20:10:24 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) @@ -4235,15 +4052,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Requires PHPUnit 8.4, so this version can only be used on PHP 7.2+ and it is required by Codeception 5 -### module-doctrine2 1.0.1: Updated documentation - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/13 17:34:35 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - - - - ### module-asserts 1.1.1: Documented that stringEnds functions were added in 1.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/13 17:33:39 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -4343,15 +4151,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-doctrine2 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:27:12 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) - - - - - - ### module-db 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:27:01 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -4452,15 +4251,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-datafactory 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:07:51 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) - - - - - - ### module-cli 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:07:08 / [Repository](https://github.com/Codeception/module-cli) / [Releases](https://github.com/Codeception/module-cli/releases) @@ -4488,15 +4278,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib -### module-amqp 1.0.0: Initial release - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:05:50 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) - - - - - - ### lib-asserts 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/09/16 20:06:26 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) From e7cd3ba11e0688651f4c0a8b24835c863a94dad3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Apr 2025 15:17:08 +0000 Subject: [PATCH 077/156] updated --- changelog.markdown | 219 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 55d9631a4..fcf20aa78 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -531,6 +531,19 @@ Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhaj **Full Changelog**: https://github.com/Codeception/module-db/compare/3.1.3...3.1.4 +### module-doctrine2 3.0.4: 3.0.4 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/04/04 16:33:24 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +## What's Changed +* Test against PHP 8.2 + 8.3 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-doctrine2/pull/76 +* Update composer.json: Adding `abandoned` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/80 + +**Full Changelog**: https://github.com/Codeception/module-doctrine2/compare/3.0.3...3.0.4 + + ### module-symfony 3.3.2: 3.3.2 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/03/18 15:08:50 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) @@ -913,6 +926,24 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Mentioning `` tag requirement by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/lib-web/pull/4 +### module-doctrine2 3.0.3: 3.0.3 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/04/18 19:38:46 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +* Adding recommendation for Symfony users by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/69 + + +### module-doctrine2 3.0.2: 3.0.2 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/18 18:36:57 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +* Documentation updates [#67](https://github.com/Codeception/module-doctrine2/issues/67) and [#68](https://github.com/Codeception/module-doctrine2/issues/68) by **[ThomasLandauer](https://github.com/ThomasLandauer)** + + ### Codeception 5.0.10: 5.0.10 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/03/14 07:27:00 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -1034,6 +1065,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support codeception/lib-innerbrowser v4 +### module-doctrine2 3.0.1: 3.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:55:15 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +* Fix deprecated string interpolation by **[Kolyunya](https://github.com/Kolyunya)** in https://github.com/Codeception/module-doctrine2/pull/59 + + ### module-symfony 3.1.1: 3.1.1 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/06 07:50:11 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) @@ -1466,6 +1506,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Variadic parameters can be skipped in dependency injection [#6505](https://github.com/Codeception/Codeception/issues/6505) +### module-datafactory 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/18 16:39:04 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + +* Support for Codeception 5.0 + + ### module-yii2 1.1.7: 1.1.7 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/07/15 18:10:54 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) @@ -1793,6 +1842,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support for Codeception 5 +### module-amqp 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/20 09:26:33 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) + + + +* Support for Codeception 5, thanks to **[W0rma](https://github.com/W0rma)** + + ### module-symfony 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/16 08:53:07 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) @@ -2014,6 +2072,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +* Codeception 5 support + + +### module-doctrine2 3.0.0: 3.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/02/20 10:51:03 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + * Codeception 5 support @@ -2049,6 +2116,15 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/lib-innerbrowser/compare/2.0.1...2.0.2 +### module-doctrine2 2.0.1: 2.0.1 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/01/28 18:34:39 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +* Binary strings don't break (dont)seeInRepository by **[frankverhoeven](https://github.com/frankverhoeven)** + + ### module-webdriver 2.0.2: 2.0.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/01/23 12:00:55 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2334,6 +2410,23 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-asserts/compare/1.3.1...2.0.0 +### module-datafactory 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 15:00:26 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + +## What's Changed + +* PHP 7.4 or higher is required. +* Support PHP 8.1 +* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-datafactory/pull/9 and https://github.com/Codeception/module-datafactory/pull/14 +* Documentation changes by **[DavertMik](https://github.com/DavertMik)** in https://github.com/Codeception/module-datafactory/pull/11 +* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-datafactory/pull/13 + +**Full Changelog**: https://github.com/Codeception/module-datafactory/compare/1.1.0...2.0.0 + + ### module-mongodb 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 14:55:38 / [Repository](https://github.com/Codeception/module-mongodb) / [Releases](https://github.com/Codeception/module-mongodb/releases) @@ -2493,6 +2586,26 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-mezzio/compare/2.0.2...3.0.0 +### module-doctrine2 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:59:34 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +## What's Changed + +* PHP 7.4 or higher is required. +* Support PHP 8.1 +* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-doctrine2/pull/40 and https://github.com/Codeception/module-doctrine2/pull/47 +* Added phpstan by **[b1rdex](https://github.com/b1rdex)** in https://github.com/Codeception/module-doctrine2/pull/46 +* Use hash to store repository mock by **[olexp](https://github.com/olexp)** in https://github.com/Codeception/module-doctrine2/pull/45 and https://github.com/Codeception/module-doctrine2/pull/48 +* Better explaining `depends` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/23 +* Adding link to `doctrine/data-fixtures` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine2/pull/39 +* The changelog has been added to the Readme file, by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-doctrine2/pull/43 + +**Full Changelog**: https://github.com/Codeception/module-doctrine2/compare/1.1.1...2.0.0 + + ### module-apc 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:51:33 / [Repository](https://github.com/Codeception/module-apc) / [Releases](https://github.com/Codeception/module-apc/releases) @@ -2508,6 +2621,20 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo **Full Changelog**: https://github.com/Codeception/module-apc/compare/1.0.2...2.0.0 +### module-amqp 2.0.0: 2.0.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:47:28 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) + + + +## What's Changed + +* PHP 7.4 or higher is required. +* Updated code base to PHP 7.4 by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-amqp/pull/12 + +**Full Changelog**: https://github.com/Codeception/module-amqp/compare/1.1.1...2.0.0 + + ### module-laminas 1.3.0: 1.3.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/07 05:44:00 / [Repository](https://github.com/Codeception/module-laminas) / [Releases](https://github.com/Codeception/module-laminas/releases) @@ -2758,6 +2885,15 @@ This release includes a general refactoring of the code ([#30](https://github.co See the full list of changes [here](https://github.com/Codeception/module-laravel/milestone/3). +### module-amqp 1.1.1: seeMessageInQueueContainsText acks message + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/09/05 07:47:08 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) + + + +* Stops keeping message in unacked stated, by **[renq](https://github.com/renq)** + + ### module-webdriver 1.4.0: Added new methods Released by [![](https://avatars.githubusercontent.com/u/220264?v=4&s=16) DavertMik](https://github.com/DavertMik) on 2021/09/02 12:08:19 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) @@ -2996,6 +3132,25 @@ Minor changes in documentation by **[ThomasLandauer](https://github.com/ThomasLa +### module-amqp 1.1.0: Support PHP 8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/21 15:29:11 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) + + + +* Support PHP 8.0 +* Support php-amqplib v3 + + +### module-datafactory 1.1.0: Added Custom Store + +Released by [![](https://avatars.githubusercontent.com/u/220264?v=4&s=16) DavertMik](https://github.com/DavertMik) on 2021/03/16 19:42:52 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + +Custom Store can be used for Data Factory. See [#2](https://github.com/Codeception/module-datafactory/issues/2) + + ### lib-innerbrowser 1.4.1: Fix grabTextFrom TypeError Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2021/03/02 08:03:49 / [Repository](https://github.com/Codeception/lib-innerbrowser) / [Releases](https://github.com/Codeception/lib-innerbrowser/releases) @@ -3109,6 +3264,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Fixed filling of fields that are linked to form using `form` attribute https://github.com/Codeception/Codeception/issues/6022 +### module-datafactory 1.0.1: PHP8 support + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/12/30 15:56:46 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + + + + ### module-laravel 2.0.0: 2.0.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/12/29 20:52:27 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) @@ -3254,6 +3418,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-doctrine2 1.1.1: Support PHP 8 + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/26 06:57:10 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + + + + ### module-symfony 1.4.1: 1.4.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2020/11/25 19:31:47 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) @@ -3345,6 +3518,16 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-doctrine2 1.1.0: + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/14 20:44:32 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + +* Configurable purge mode - DELETE or TRUNCATE +* Catch MappingException thrown by Doctrine 2.9 + + ### module-soap 1.0.1: Support PHP 8 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2020/11/07 20:10:24 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases) @@ -4052,6 +4235,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib Requires PHPUnit 8.4, so this version can only be used on PHP 7.2+ and it is required by Codeception 5 +### module-doctrine2 1.0.1: Updated documentation + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/13 17:34:35 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + + + + ### module-asserts 1.1.1: Documented that stringEnds functions were added in 1.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/11/13 17:33:39 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -4151,6 +4343,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-doctrine2 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:27:12 / [Repository](https://github.com/Codeception/module-doctrine2) / [Releases](https://github.com/Codeception/module-doctrine2/releases) + + + + + + ### module-db 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/19 15:27:01 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases) @@ -4251,6 +4452,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-datafactory 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:07:51 / [Repository](https://github.com/Codeception/module-datafactory) / [Releases](https://github.com/Codeception/module-datafactory/releases) + + + + + + ### module-cli 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:07:08 / [Repository](https://github.com/Codeception/module-cli) / [Releases](https://github.com/Codeception/module-cli/releases) @@ -4278,6 +4488,15 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib +### module-amqp 1.0.0: Initial release + +Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/10/18 11:05:50 / [Repository](https://github.com/Codeception/module-amqp) / [Releases](https://github.com/Codeception/module-amqp/releases) + + + + + + ### lib-asserts 1.0.0: Initial release Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2019/09/16 20:06:26 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases) From 4505613acb9f1cedf331c75a861819f0a1e8b080 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Apr 2025 18:20:38 +0000 Subject: [PATCH 078/156] updated --- changelog.markdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index fcf20aa78..0fe5d7282 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,20 @@ title: Codeception Changelog +### module-asserts 3.1.0: 3.1.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/04/24 17:21:11 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) + + + +## What's Changed +* Test against PHP 8.3 + 8.4, drop PHP 8.0 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-asserts/pull/28 +* Add missing assertion tests by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-asserts/pull/29 + + +**Full Changelog**: https://github.com/Codeception/module-asserts/compare/3.0.0...3.1.0 + + ### module-yii2 v2.0.3: v2.0.3 Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/04/01 13:18:15 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) From be52d4c3ca051a31ba0b1abfdb0f64f95525c5d9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 25 Apr 2025 05:15:46 +0000 Subject: [PATCH 079/156] updated --- changelog.markdown | 15 +++++++++++++++ docs/modules/Doctrine.md | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/changelog.markdown b/changelog.markdown index 0fe5d7282..f61ed9e48 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,21 @@ title: Codeception Changelog +### module-doctrine 3.2.0: 3.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/04/25 05:14:21 / [Repository](https://github.com/Codeception/module-doctrine) / [Releases](https://github.com/Codeception/module-doctrine/releases) + + + +## What's Changed +* Update Doctrine.php: Adding upgrade instructions by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-doctrine/pull/29 +* Declare nullable parameter types explicitly by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-doctrine/pull/31 +* Fix support for doctrine/dbal v2 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-doctrine/pull/32 +* PHP 8.4: Fix E_STRICT deprecation by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-doctrine/pull/34 + +**Full Changelog**: https://github.com/Codeception/module-doctrine/compare/3.1.0...3.2.0 + + ### module-asserts 3.1.0: 3.1.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/04/24 17:21:11 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) diff --git a/docs/modules/Doctrine.md b/docs/modules/Doctrine.md index 8a72d069a..bce289c1b 100644 --- a/docs/modules/Doctrine.md +++ b/docs/modules/Doctrine.md @@ -19,10 +19,15 @@ composer require --dev codeception/module-doctrine +Upgrading from Module "Doctrine2": +* In your `composer.json`: Replace `"codeception/module-doctrine2"` with `"codeception/module-doctrine"` +* In your `Acceptance.suite.yml`, `Functional.suite.yml`, and `Unit.suite.yml`: Replace `- Doctrine2:` with `- Doctrine:` +* In any file in `Support/Helper/`: Change `$this->getModule('Doctrine2')` to `$this->getModule('Doctrine')` + Access the database using [Doctrine ORM](https://docs.doctrine-project.org/projects/doctrine-orm/en/latest/). When used with Symfony or Zend Framework 2, Doctrine's Entity Manager is automatically retrieved from Service Locator. -Set up your `functional.suite.yml` like this: +Set up your `Functional.suite.yml` like this: {% highlight yaml %} From 92be03da85a78cd22a248b41683bbdc9e27cd922 Mon Sep 17 00:00:00 2001 From: Martin de Keijzer Date: Tue, 29 Apr 2025 09:26:24 +0200 Subject: [PATCH 080/156] Update AcceptanceTests.md Change casing of default acceptance tests directory --- docs/AcceptanceTests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/AcceptanceTests.md b/docs/AcceptanceTests.md index 67cc3f682..5fe4c0192 100644 --- a/docs/AcceptanceTests.md +++ b/docs/AcceptanceTests.md @@ -71,7 +71,7 @@ We should start by creating a test with the next command: php vendor/bin/codecept g:cest acceptance Signin ``` -It will be placed into `tests/acceptance` directory. +It will be placed into `tests/Acceptance` directory. ```php class SigninCest From 8963202670702858048db5e44f206a0096a11745 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 5 May 2025 16:20:58 +0000 Subject: [PATCH 081/156] updated --- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,69 +5,6 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - -## GenerateHelper - -Creates empty Helper class. - -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` - - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +19,13 @@ Usage: -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment +## GenerateHelper -Generates empty environment configuration file into envs dir: +Creates empty Helper class. - * `codecept g:env firefox` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Required to have `envs` path to be specified in `codeception.yml` @@ -192,32 +118,64 @@ Options: +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + ## CompletionFallback -## GherkinSteps +## GenerateScenarios -Prints all steps from all Gherkin contexts for a specific suite +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -{% endhighlight %} +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -## Clean +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -Recursively cleans `output` directory and generated code. -* `codecept clean` +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. -## Init +* `codecept g:group Admin` @@ -233,31 +191,35 @@ Generates Cest (scenario-driven object-oriented test) file: -## Console +## GherkinSteps -Try to execute test commands in run-time. You may try commands before writing the test. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + @@ -271,44 +233,59 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build +## GenerateEnvironment -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates empty environment configuration file into envs dir: -* `codecept build` -* `codecept build path/to/project` + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature +## GenerateStepObject -Generates Feature file (in Gherkin): +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## Bootstrap +## Init -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + ## ConfigValidate Validates and prints Codeception config. @@ -333,4 +310,27 @@ Check overriding config values (like in `run` command) +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + From 33218ebcb2e08a8ff6ff4e2fafc3f3721136835b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 5 May 2025 17:14:00 +0000 Subject: [PATCH 082/156] updated --- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,6 +5,69 @@ title: Commands - Codeception - Documentation # Console Commands +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions + + + + +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` + + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -19,14 +82,25 @@ Usage: -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + ## Run @@ -118,64 +192,32 @@ Options: -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - ## CompletionFallback -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Init @@ -191,35 +233,31 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateSuite -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## Clean -Recursively cleans `output` directory and generated code. +## GenerateGroup -* `codecept clean` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` @@ -233,56 +271,41 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - - - -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## Init +## Build +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## Console +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. @@ -310,27 +333,4 @@ Check overriding config values (like in `run` command) -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - From d53a10b9e532d532a627cc69b20820dd35d418ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 6 May 2025 12:32:58 +0000 Subject: [PATCH 083/156] updated --- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,69 +5,6 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - -## GenerateHelper - -Creates empty Helper class. - -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` - - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +19,13 @@ Usage: -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment +## GenerateHelper -Generates empty environment configuration file into envs dir: +Creates empty Helper class. - * `codecept g:env firefox` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Required to have `envs` path to be specified in `codeception.yml` @@ -192,32 +118,64 @@ Options: +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + ## CompletionFallback -## GherkinSteps +## GenerateScenarios -Prints all steps from all Gherkin contexts for a specific suite +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -{% endhighlight %} +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -## Clean +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -Recursively cleans `output` directory and generated code. -* `codecept clean` +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. -## Init +* `codecept g:group Admin` @@ -233,31 +191,35 @@ Generates Cest (scenario-driven object-oriented test) file: -## Console +## GherkinSteps -Try to execute test commands in run-time. You may try commands before writing the test. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + @@ -271,44 +233,59 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build +## GenerateEnvironment -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates empty environment configuration file into envs dir: -* `codecept build` -* `codecept build path/to/project` + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature +## GenerateStepObject -Generates Feature file (in Gherkin): +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## Bootstrap +## Init -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + ## ConfigValidate Validates and prints Codeception config. @@ -333,4 +310,27 @@ Check overriding config values (like in `run` command) +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + From 374f36e3683b38272a8253713c849f695d282c71 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 6 May 2025 13:28:44 +0000 Subject: [PATCH 084/156] updated --- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,6 +5,69 @@ title: Commands - Codeception - Documentation # Console Commands +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions + + + + +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` + + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -19,14 +82,25 @@ Usage: -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + ## Run @@ -118,64 +192,32 @@ Options: -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - ## CompletionFallback -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Init @@ -191,35 +233,31 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateSuite -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## Clean -Recursively cleans `output` directory and generated code. +## GenerateGroup -* `codecept clean` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` @@ -233,56 +271,41 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - - - -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## Init +## Build +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## Console +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. @@ -310,27 +333,4 @@ Check overriding config values (like in `run` command) -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - From 917e101b54e6438155f6f22d1e0f7306c14be2e5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 6 May 2025 16:18:18 +0000 Subject: [PATCH 085/156] updated --- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,69 +5,6 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - -## GenerateHelper - -Creates empty Helper class. - -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` - - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +19,13 @@ Usage: -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment +## GenerateHelper -Generates empty environment configuration file into envs dir: +Creates empty Helper class. - * `codecept g:env firefox` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Required to have `envs` path to be specified in `codeception.yml` @@ -192,32 +118,64 @@ Options: +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + ## CompletionFallback -## GherkinSteps +## GenerateScenarios -Prints all steps from all Gherkin contexts for a specific suite +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -{% endhighlight %} +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -## Clean +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -Recursively cleans `output` directory and generated code. -* `codecept clean` +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. -## Init +* `codecept g:group Admin` @@ -233,31 +191,35 @@ Generates Cest (scenario-driven object-oriented test) file: -## Console +## GherkinSteps -Try to execute test commands in run-time. You may try commands before writing the test. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + @@ -271,44 +233,59 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build +## GenerateEnvironment -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates empty environment configuration file into envs dir: -* `codecept build` -* `codecept build path/to/project` + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature +## GenerateStepObject -Generates Feature file (in Gherkin): +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## Bootstrap +## Init -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + ## ConfigValidate Validates and prints Codeception config. @@ -333,4 +310,27 @@ Check overriding config values (like in `run` command) +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + From 94e0552a3b6ba17fc175a0af8b5ad70d1a0b90b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 6 May 2025 17:14:13 +0000 Subject: [PATCH 086/156] updated --- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,6 +5,69 @@ title: Commands - Codeception - Documentation # Console Commands +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions + + + + +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` + + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -19,14 +82,25 @@ Usage: -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + ## Run @@ -118,64 +192,32 @@ Options: -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - ## CompletionFallback -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Init @@ -191,35 +233,31 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateSuite -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## Clean -Recursively cleans `output` directory and generated code. +## GenerateGroup -* `codecept clean` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` @@ -233,56 +271,41 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - - - -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## Init +## Build +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## Console +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. @@ -310,27 +333,4 @@ Check overriding config values (like in `run` command) -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - From 500d4336867f393e33fa48e0d5d3eadd5973c8c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 6 May 2025 18:21:49 +0000 Subject: [PATCH 087/156] updated --- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,69 +5,6 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - -## GenerateHelper - -Creates empty Helper class. - -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` - - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +19,13 @@ Usage: -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment +## GenerateHelper -Generates empty environment configuration file into envs dir: +Creates empty Helper class. - * `codecept g:env firefox` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Required to have `envs` path to be specified in `codeception.yml` @@ -192,32 +118,64 @@ Options: +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + ## CompletionFallback -## GherkinSteps +## GenerateScenarios -Prints all steps from all Gherkin contexts for a specific suite +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -{% endhighlight %} +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -## Clean +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -Recursively cleans `output` directory and generated code. -* `codecept clean` +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. -## Init +* `codecept g:group Admin` @@ -233,31 +191,35 @@ Generates Cest (scenario-driven object-oriented test) file: -## Console +## GherkinSteps -Try to execute test commands in run-time. You may try commands before writing the test. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + @@ -271,44 +233,59 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build +## GenerateEnvironment -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates empty environment configuration file into envs dir: -* `codecept build` -* `codecept build path/to/project` + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature +## GenerateStepObject -Generates Feature file (in Gherkin): +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## Bootstrap +## Init -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + ## ConfigValidate Validates and prints Codeception config. @@ -333,4 +310,27 @@ Check overriding config values (like in `run` command) +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + From bb35fe3de6b5cf5421e1959d576f356d5ccf9492 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 6 May 2025 19:11:47 +0000 Subject: [PATCH 088/156] updated --- changelog.markdown | 38 ++++-- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 2 files changed, 146 insertions(+), 128 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index f61ed9e48..3f07e11df 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,34 @@ title: Codeception Changelog +### Codeception 5.3.0: 5.3.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/06 19:04:29 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* Update readme.md by **[rossaddison](https://github.com/rossaddison)** in https://github.com/Codeception/Codeception/pull/6834 +* Fix loading keywords in behat/gherkin v4.12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/Codeception/pull/6839 +* Update Scenario.php: Adding default value to `current()` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/Codeception/pull/6798 +* Simplify Step classes by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6842 +* Simplify reporter classes by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6803 +* Simplify Subscriber classes by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6843 +* Fix AssertsTest CI pipeline by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/Codeception/pull/6847 +* Simplify Test classes by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6845 +* Simplify Template classes by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6844 +* Simplify Util classes by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6846 +* Simplify src root classes by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6849 +* Remove PHP 8.1 Support by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6848 +* Migrate commands to use AsCommand attribute by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6850 +* Add PHPStan by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6851 + +## New Contributors +* **[rossaddison](https://github.com/rossaddison)** made their first contribution in https://github.com/Codeception/Codeception/pull/6834 + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.2.1...5.3.0 + + ### module-doctrine 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/04/25 05:14:21 / [Repository](https://github.com/Codeception/module-doctrine) / [Releases](https://github.com/Codeception/module-doctrine/releases) @@ -1907,16 +1935,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Support for Codeception 5 -### Codeception 5.0.0-RC1: 5.0.0-RC1 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/13 18:42:02 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Use PHPUnit 9 until PHPUnit 10 is released. -* Read about earlier change in [CHANGELOG](https://github.com/Codeception/Codeception/blob/5.0/CHANGELOG-5.x.md). - - ### module-webdriver 3.1.0: 3.1.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/11 17:08:21 / [Repository](https://github.com/Codeception/module-webdriver) / [Releases](https://github.com/Codeception/module-webdriver/releases) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,6 +5,69 @@ title: Commands - Codeception - Documentation # Console Commands +## GenerateStepObject + +Generates StepObject class. You will be asked for steps you want to implement. + +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions + + + + +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## GenerateHelper + +Creates empty Helper class. + +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` + + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -19,14 +82,25 @@ Usage: -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + ## Run @@ -118,64 +192,32 @@ Options: -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - ## CompletionFallback -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GherkinSteps -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## Clean +Recursively cleans `output` directory and generated code. +* `codecept clean` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Init @@ -191,35 +233,31 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateFeature -Generates Feature file (in Gherkin): +## GenerateSuite -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## Clean -Recursively cleans `output` directory and generated code. +## GenerateGroup -* `codecept clean` +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` @@ -233,56 +271,41 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` - - - -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## Init +## Build +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept build` +* `codecept build path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## Bootstrap +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -## Console +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. @@ -310,27 +333,4 @@ Check overriding config values (like in `run` command) -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - From 05e8b0dd0de84fe1ec8ee83af34c9ad6c6627819 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 May 2025 04:19:05 +0000 Subject: [PATCH 089/156] updated --- changelog.markdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 3f07e11df..a04c392e8 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,20 @@ title: Codeception Changelog +### module-asserts 3.2.0: 3.2.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/07 03:33:49 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) + + + +## What's Changed +* Bump lib-asserts dependency by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/module-asserts/pull/30 +* Update to PHP 8.2, Codeception 5 and static analysis by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-asserts/pull/31 + + +**Full Changelog**: https://github.com/Codeception/module-asserts/compare/3.1.0...3.2.0 + + ### Codeception 5.3.0: 5.3.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/06 19:04:29 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) From 6e917a89305e5ddf70c4971759520a9040b7f927 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 May 2025 12:32:58 +0000 Subject: [PATCH 090/156] updated --- docs/reference/Commands.md | 236 ++++++++++++++++++------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,69 +5,6 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## GenerateScenarios - -Generates user-friendly text scenarios from scenario-driven tests (Cest). - -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. - -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` - - - -## GenerateHelper - -Creates empty Helper class. - -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` - - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +19,13 @@ Usage: -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment +## GenerateHelper -Generates empty environment configuration file into envs dir: +Creates empty Helper class. - * `codecept g:env firefox` +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Required to have `envs` path to be specified in `codeception.yml` @@ -192,32 +118,64 @@ Options: +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + ## CompletionFallback -## GherkinSteps +## GenerateScenarios -Prints all steps from all Gherkin contexts for a specific suite +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -{% endhighlight %} +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -## Clean +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -Recursively cleans `output` directory and generated code. -* `codecept clean` +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. -## Init +* `codecept g:group Admin` @@ -233,31 +191,35 @@ Generates Cest (scenario-driven object-oriented test) file: -## Console +## GherkinSteps -Try to execute test commands in run-time. You may try commands before writing the test. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateFeature +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateGroup -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + @@ -271,44 +233,59 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build +## GenerateEnvironment -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates empty environment configuration file into envs dir: -* `codecept build` -* `codecept build path/to/project` + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## GenerateFeature +## GenerateStepObject -Generates Feature file (in Gherkin): +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## Bootstrap +## Init -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + ## ConfigValidate Validates and prints Codeception config. @@ -333,4 +310,27 @@ Check overriding config values (like in `run` command) +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + + +## DryRun + +Shows step-by-step execution process for scenario driven tests without actually running them. + +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + From 8349ef907d6e07981db423c62c32e6008a0af9e0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 May 2025 13:29:32 +0000 Subject: [PATCH 091/156] updated --- changelog.markdown | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index a04c392e8..e4280b695 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,19 @@ title: Codeception Changelog +### Codeception 5.2.2: 5.2.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/07 12:49:57 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* 5.2: Fix loading keywords in behat/gherkin v4.12 by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/Codeception/pull/6855 + + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.2.1...5.2.2 + + ### module-asserts 3.2.0: 3.2.0 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/07 03:33:49 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases) @@ -1868,24 +1881,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Removed dontSeeCheckboxIsChecked parameter type declaration to permit arrays and match seeCheckboxIsChecked -### Codeception 5.0.0-RC2: 5.0.0-RC2 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/08 07:05:05 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Added `--shard`, `--grep`, `--filter` options ([#6399](https://github.com/Codeception/Codeception/issues/6399)) -* Added new code coverage settings ([#6423](https://github.com/Codeception/Codeception/issues/6423)) -* Dynamic configuration with parameters can use arrays and other non-string types ([#6409](https://github.com/Codeception/Codeception/issues/6409)) -* Introduced `codecept_pause` function and `$this->pause()` in unit tests ([#6387](https://github.com/Codeception/Codeception/issues/6387)) -* Interactive console is executed in the scope of paused test class. -* Array of variables can be passed to all `pause` functions/methods -* Replaced Hoa Console with PsySH in `codecept console` -* Used Symfony VarDumper in `codecept_debug` ([#6406](https://github.com/Codeception/Codeception/issues/6406)) -* Fixed type error in code coverage exclude filter by **[W0rma](https://github.com/W0rma)** -* Fix type error in Recorder extension - - ### module-rest 2.0.2: 2.0.2 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/03/30 05:43:05 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases) From 4bda48ac3286f2bf4a9a15d35edaadf9953f94cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 14:16:27 +0000 Subject: [PATCH 092/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,177 +5,105 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateHelper - -Creates empty Helper class. +## DryRun -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. +## Build -Usage: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept build` +* `codecept build path/to/project` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateScenarios -Override config values: +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## ConfigValidate -{% endhighlight %} +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: -## GenerateSnapshot +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Check overriding config values (like in `run` command) -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateFeature -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## CompletionFallback +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GeneratePageObject -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateEnvironment -## GenerateGroup +Generates empty environment configuration file into envs dir: -Creates empty GroupObject - extension which handles all group events. + * `codecept g:env firefox` -* `codecept g:group Admin` +Required to have `envs` path to be specified in `codeception.yml` @@ -191,81 +119,86 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps +## Clean -Prints all steps from all Gherkin contexts for a specific suite +Recursively cleans `output` directory and generated code. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept clean` -{% endhighlight %} +## GenerateHelper -## GenerateFeature +Creates empty Helper class. -Generates Feature file (in Gherkin): +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateSuite -## Clean +Create new test suite. Requires suite name and actor name -Recursively cleans `output` directory and generated code. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept clean` +## Console -## SelfUpdate +Try to execute test commands in run-time. You may try commands before writing the test. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `php codecept.phar self-update` -@author Franck Cassedanne +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -## GenerateEnvironment +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Init -## GenerateStepObject +## GherkinSnippets -Generates StepObject class. You will be asked for steps you want to implement. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## Init +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## CompletionFallback @@ -278,59 +211,126 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Console +## Bootstrap -Try to execute test commands in run-time. You may try commands before writing the test. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. + +Usage: + +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites + +Verbosity modes: + +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +Override config values: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -## Build +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +{% endhighlight %} -* `codecept build` -* `codecept build path/to/project` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -## DryRun +* `php codecept.phar self-update` + +@author Franck Cassedanne -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` From e0ae35b94c269617a5db4daf231dfc9516ed3922 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 16:20:26 +0000 Subject: [PATCH 093/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,84 +5,128 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -## Build +Usage: -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept build` -* `codecept build path/to/project` +## GenerateHelper +Creates empty Helper class. -## GenerateScenarios +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -## GenerateFeature +Run with specific extension -Generates Feature file (in Gherkin): +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateSnapshot -{% endhighlight %} +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` @@ -97,13 +141,41 @@ If PageObject is generated globally it will act as UIMap, without any logic in i -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` @@ -119,86 +191,81 @@ Generates Cest (scenario-driven object-oriented test) file: -## Clean +## GherkinSteps -Recursively cleans `output` directory and generated code. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept clean` +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. +## GenerateFeature -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name +## Clean -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## SelfUpdate -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## Init +Required to have `envs` path to be specified in `codeception.yml` -## GherkinSnippets +## GenerateStepObject -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Generates StepObject class. You will be asked for steps you want to implement. -Usage: +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateStepObject +## Init -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## CompletionFallback @@ -211,126 +278,59 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Run -Executes tests. -Usage: +## ConfigValidate -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Validates and prints Codeception config. +Use it do debug Yaml configs -Verbosity modes: +Check config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name - -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run - -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests - -{% endhighlight %} +## Build +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -## SelfUpdate +* `codecept build` +* `codecept build path/to/project` -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` -@author Franck Cassedanne +## DryRun -## GenerateGroup +Shows step-by-step execution process for scenario driven tests without actually running them. -Creates empty GroupObject - extension which handles all group events. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -* `codecept g:group Admin` From e24d09f539689a59fb5f59b02341a36bfd0bd5d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 20:17:45 +0000 Subject: [PATCH 094/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,177 +5,105 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateHelper - -Creates empty Helper class. +## DryRun -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. +## Build -Usage: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept build` +* `codecept build path/to/project` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateScenarios -Override config values: +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## ConfigValidate -{% endhighlight %} +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: -## GenerateSnapshot +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Check overriding config values (like in `run` command) -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateFeature -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## CompletionFallback +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GeneratePageObject -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateEnvironment -## GenerateGroup +Generates empty environment configuration file into envs dir: -Creates empty GroupObject - extension which handles all group events. + * `codecept g:env firefox` -* `codecept g:group Admin` +Required to have `envs` path to be specified in `codeception.yml` @@ -191,81 +119,86 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps +## Clean -Prints all steps from all Gherkin contexts for a specific suite +Recursively cleans `output` directory and generated code. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept clean` -{% endhighlight %} +## GenerateHelper -## GenerateFeature +Creates empty Helper class. -Generates Feature file (in Gherkin): +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateSuite -## Clean +Create new test suite. Requires suite name and actor name -Recursively cleans `output` directory and generated code. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept clean` +## Console -## SelfUpdate +Try to execute test commands in run-time. You may try commands before writing the test. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `php codecept.phar self-update` -@author Franck Cassedanne +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -## GenerateEnvironment +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Init -## GenerateStepObject +## GherkinSnippets -Generates StepObject class. You will be asked for steps you want to implement. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## Init +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## CompletionFallback @@ -278,59 +211,126 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Console +## Bootstrap -Try to execute test commands in run-time. You may try commands before writing the test. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. + +Usage: + +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites + +Verbosity modes: + +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +Override config values: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -## Build +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +{% endhighlight %} -* `codecept build` -* `codecept build path/to/project` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -## DryRun +* `php codecept.phar self-update` + +@author Franck Cassedanne -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` From 8cbe4e9e1bdd6a967eedb7ca4cafef1c1aac6390 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 21:14:44 +0000 Subject: [PATCH 095/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,84 +5,128 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -## Build +Usage: -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept build` -* `codecept build path/to/project` +## GenerateHelper +Creates empty Helper class. -## GenerateScenarios +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -## GenerateFeature +Run with specific extension -Generates Feature file (in Gherkin): +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateSnapshot -{% endhighlight %} +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` @@ -97,13 +141,41 @@ If PageObject is generated globally it will act as UIMap, without any logic in i -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` @@ -119,86 +191,81 @@ Generates Cest (scenario-driven object-oriented test) file: -## Clean +## GherkinSteps -Recursively cleans `output` directory and generated code. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept clean` +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. +## GenerateFeature -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name +## Clean -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## SelfUpdate -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## Init +Required to have `envs` path to be specified in `codeception.yml` -## GherkinSnippets +## GenerateStepObject -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Generates StepObject class. You will be asked for steps you want to implement. -Usage: +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateStepObject +## Init -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## CompletionFallback @@ -211,126 +278,59 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Run -Executes tests. -Usage: +## ConfigValidate -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Validates and prints Codeception config. +Use it do debug Yaml configs -Verbosity modes: +Check config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name - -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run - -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests - -{% endhighlight %} +## Build +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -## SelfUpdate +* `codecept build` +* `codecept build path/to/project` -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` -@author Franck Cassedanne +## DryRun -## GenerateGroup +Shows step-by-step execution process for scenario driven tests without actually running them. -Creates empty GroupObject - extension which handles all group events. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -* `codecept g:group Admin` From 6e6e9dc343e97d4de4e206360d4a1cd9382b6421 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 23:14:55 +0000 Subject: [PATCH 096/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,177 +5,105 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateHelper - -Creates empty Helper class. +## DryRun -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. +## Build -Usage: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept build` +* `codecept build path/to/project` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateScenarios -Override config values: +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## ConfigValidate -{% endhighlight %} +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: -## GenerateSnapshot +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Check overriding config values (like in `run` command) -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateFeature -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## CompletionFallback +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GeneratePageObject -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateEnvironment -## GenerateGroup +Generates empty environment configuration file into envs dir: -Creates empty GroupObject - extension which handles all group events. + * `codecept g:env firefox` -* `codecept g:group Admin` +Required to have `envs` path to be specified in `codeception.yml` @@ -191,81 +119,86 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps +## Clean -Prints all steps from all Gherkin contexts for a specific suite +Recursively cleans `output` directory and generated code. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept clean` -{% endhighlight %} +## GenerateHelper -## GenerateFeature +Creates empty Helper class. -Generates Feature file (in Gherkin): +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateSuite -## Clean +Create new test suite. Requires suite name and actor name -Recursively cleans `output` directory and generated code. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept clean` +## Console -## SelfUpdate +Try to execute test commands in run-time. You may try commands before writing the test. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `php codecept.phar self-update` -@author Franck Cassedanne +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -## GenerateEnvironment +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Init -## GenerateStepObject +## GherkinSnippets -Generates StepObject class. You will be asked for steps you want to implement. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## Init +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## CompletionFallback @@ -278,59 +211,126 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Console +## Bootstrap -Try to execute test commands in run-time. You may try commands before writing the test. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. + +Usage: + +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites + +Verbosity modes: + +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +Override config values: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -## Build +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +{% endhighlight %} -* `codecept build` -* `codecept build path/to/project` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -## DryRun +* `php codecept.phar self-update` + +@author Franck Cassedanne -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` From 92b6485491d8a725ff2967172350b946b16add55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 May 2025 01:14:29 +0000 Subject: [PATCH 097/156] updated --- changelog.markdown | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index e4280b695..90fe97d11 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,22 @@ title: Codeception Changelog +### Codeception 5.3.1: 5.3.1 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/13 23:25:43 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* Issue 6857: Upddate Actor::__call() to have return type 'mixed' by **[troy-rudolph](https://github.com/troy-rudolph)** in https://github.com/Codeception/Codeception/pull/6858 +* Fix auto-injection of the tester property by **[W0rma](https://github.com/W0rma)** in https://github.com/Codeception/Codeception/pull/6856 + +## New Contributors +* **[troy-rudolph](https://github.com/troy-rudolph)** made their first contribution in https://github.com/Codeception/Codeception/pull/6858 + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.3.0...5.3.1 + + ### Codeception 5.2.2: 5.2.2 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/07 12:49:57 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -1831,18 +1847,6 @@ Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktib * Updated dependencies -### Codeception 5.0.0-RC3: 5.0.0-RC3 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/22 10:32:33 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Fix incorrect type declaration in InitTemplate by **[ziadoz](https://github.com/ziadoz)** -* Stricter check for phpdotenv v5 (older versions are not supported) -* Throw exception if actor setting is missing in suite configuration -* Use correct types in ParamsLoader and Configuration classes, avoid type errors - - ### module-laravel 3.0.0: 3.0.0 Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/04/20 10:13:08 / [Repository](https://github.com/Codeception/module-laravel) / [Releases](https://github.com/Codeception/module-laravel/releases) From 226d391726dc771fba2f4d11046ca31843e87e35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 May 2025 03:07:38 +0000 Subject: [PATCH 098/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,84 +5,128 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -## Build +Usage: -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept build` -* `codecept build path/to/project` +## GenerateHelper +Creates empty Helper class. -## GenerateScenarios +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -## GenerateFeature +Run with specific extension -Generates Feature file (in Gherkin): +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateSnapshot -{% endhighlight %} +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` @@ -97,13 +141,41 @@ If PageObject is generated globally it will act as UIMap, without any logic in i -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` @@ -119,86 +191,81 @@ Generates Cest (scenario-driven object-oriented test) file: -## Clean +## GherkinSteps -Recursively cleans `output` directory and generated code. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept clean` +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. +## GenerateFeature -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name +## Clean -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## SelfUpdate -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## Init +Required to have `envs` path to be specified in `codeception.yml` -## GherkinSnippets +## GenerateStepObject -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Generates StepObject class. You will be asked for steps you want to implement. -Usage: +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateStepObject +## Init -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## CompletionFallback @@ -211,126 +278,59 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Run -Executes tests. -Usage: +## ConfigValidate -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Validates and prints Codeception config. +Use it do debug Yaml configs -Verbosity modes: +Check config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name - -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run - -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests - -{% endhighlight %} +## Build +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -## SelfUpdate +* `codecept build` +* `codecept build path/to/project` -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` -@author Franck Cassedanne +## DryRun -## GenerateGroup +Shows step-by-step execution process for scenario driven tests without actually running them. -Creates empty GroupObject - extension which handles all group events. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -* `codecept g:group Admin` From 468cebcff8359319904ffcc38e1131b286135efb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 May 2025 07:15:55 +0000 Subject: [PATCH 099/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,177 +5,105 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateHelper - -Creates empty Helper class. +## DryRun -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. +## Build -Usage: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept build` +* `codecept build path/to/project` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateScenarios -Override config values: +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## ConfigValidate -{% endhighlight %} +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: -## GenerateSnapshot +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Check overriding config values (like in `run` command) -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateFeature -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## CompletionFallback +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GeneratePageObject -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateEnvironment -## GenerateGroup +Generates empty environment configuration file into envs dir: -Creates empty GroupObject - extension which handles all group events. + * `codecept g:env firefox` -* `codecept g:group Admin` +Required to have `envs` path to be specified in `codeception.yml` @@ -191,81 +119,86 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps +## Clean -Prints all steps from all Gherkin contexts for a specific suite +Recursively cleans `output` directory and generated code. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept clean` -{% endhighlight %} +## GenerateHelper -## GenerateFeature +Creates empty Helper class. -Generates Feature file (in Gherkin): +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateSuite -## Clean +Create new test suite. Requires suite name and actor name -Recursively cleans `output` directory and generated code. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept clean` +## Console -## SelfUpdate +Try to execute test commands in run-time. You may try commands before writing the test. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `php codecept.phar self-update` -@author Franck Cassedanne +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -## GenerateEnvironment +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Init -## GenerateStepObject +## GherkinSnippets -Generates StepObject class. You will be asked for steps you want to implement. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## Init +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## CompletionFallback @@ -278,59 +211,126 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Console +## Bootstrap -Try to execute test commands in run-time. You may try commands before writing the test. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. + +Usage: + +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites + +Verbosity modes: + +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +Override config values: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -## Build +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +{% endhighlight %} -* `codecept build` -* `codecept build path/to/project` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -## DryRun +* `php codecept.phar self-update` + +@author Franck Cassedanne -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` From ec076df876225e57f122ed33b9380576e3b8f1a6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 May 2025 08:21:35 +0000 Subject: [PATCH 100/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f4d02e310 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,84 +5,128 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - +## GherkinSnippets +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -## Build +Usage: -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept build` -* `codecept build path/to/project` +## GenerateHelper +Creates empty Helper class. -## GenerateScenarios +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## Run +Executes tests. -## ConfigValidate +Usage: -Validates and prints Codeception config. -Use it do debug Yaml configs +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Check config: +Verbosity modes: -* `codecept config`: check global config -* `codecept config unit`: check suite config +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -## GenerateFeature +Run with specific extension -Generates Feature file (in Gherkin): +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateSnapshot -{% endhighlight %} +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` @@ -97,13 +141,41 @@ If PageObject is generated globally it will act as UIMap, without any logic in i -## GenerateEnvironment +## CompletionFallback -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## GenerateScenarios + +Generates user-friendly text scenarios from scenario-driven tests (Cest). + +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` @@ -119,86 +191,81 @@ Generates Cest (scenario-driven object-oriented test) file: -## Clean +## GherkinSteps -Recursively cleans `output` directory and generated code. +Prints all steps from all Gherkin contexts for a specific suite -* `codecept clean` +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. +## GenerateFeature -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## GenerateSuite -Create new test suite. Requires suite name and actor name +## Clean -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +Recursively cleans `output` directory and generated code. +* `codecept clean` -## Console -Try to execute test commands in run-time. You may try commands before writing the test. +## SelfUpdate -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` -## Init +Required to have `envs` path to be specified in `codeception.yml` -## GherkinSnippets +## GenerateStepObject -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects +Generates StepObject class. You will be asked for steps you want to implement. -Usage: +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## GenerateStepObject +## Init -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## CompletionFallback @@ -211,126 +278,59 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## Run -Executes tests. -Usage: +## ConfigValidate -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +Validates and prints Codeception config. +Use it do debug Yaml configs -Verbosity modes: +Check config: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept config`: check global config +* `codecept config unit`: check suite config Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Override config values: +Check overriding config values (like in `run` command) -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name - -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run - -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests - -{% endhighlight %} +## Build +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -## SelfUpdate +* `codecept build` +* `codecept build path/to/project` -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` -@author Franck Cassedanne +## DryRun -## GenerateGroup +Shows step-by-step execution process for scenario driven tests without actually running them. -Creates empty GroupObject - extension which handles all group events. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -* `codecept g:group Admin` From b1c22dbfec1a9544654f50a5b084d88525c5311d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 May 2025 12:32:02 +0000 Subject: [PATCH 101/156] updated --- docs/reference/Commands.md | 358 ++++++++++++++++++------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f4d02e310..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,177 +5,105 @@ title: Commands - Codeception - Documentation # Console Commands -## GherkinSnippets - -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects - -Usage: - -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir - - - -## GenerateHelper - -Creates empty Helper class. +## DryRun -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. +## Build -Usage: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +* `codecept build` +* `codecept build path/to/project` -Verbosity modes: -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateScenarios -Override config values: +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +## ConfigValidate -{% endhighlight %} +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config +Load config: -## GenerateSnapshot +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +Check overriding config values (like in `run` command) -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GeneratePageObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateFeature -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## CompletionFallback +## GherkinSteps -## GenerateScenarios +Prints all steps from all Gherkin contexts for a specific suite -Generates user-friendly text scenarios from scenario-driven tests (Cest). +{% highlight yaml %} +codecept gherkin:steps acceptance -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +{% endhighlight %} -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GeneratePageObject -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateEnvironment -## GenerateGroup +Generates empty environment configuration file into envs dir: -Creates empty GroupObject - extension which handles all group events. + * `codecept g:env firefox` -* `codecept g:group Admin` +Required to have `envs` path to be specified in `codeception.yml` @@ -191,81 +119,86 @@ Generates Cest (scenario-driven object-oriented test) file: -## GherkinSteps +## Clean -Prints all steps from all Gherkin contexts for a specific suite +Recursively cleans `output` directory and generated code. -{% highlight yaml %} -codecept gherkin:steps acceptance +* `codecept clean` -{% endhighlight %} +## GenerateHelper -## GenerateFeature +Creates empty Helper class. -Generates Feature file (in Gherkin): +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateSuite -## Clean +Create new test suite. Requires suite name and actor name -Recursively cleans `output` directory and generated code. +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -* `codecept clean` +## Console -## SelfUpdate +Try to execute test commands in run-time. You may try commands before writing the test. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -* `php codecept.phar self-update` -@author Franck Cassedanne +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -## GenerateEnvironment +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Init -## GenerateStepObject +## GherkinSnippets -Generates StepObject class. You will be asked for steps you want to implement. +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Usage: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -## Init +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## CompletionFallback @@ -278,59 +211,126 @@ Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -## Console +## Bootstrap -Try to execute test commands in run-time. You may try commands before writing the test. +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: +## Run -* `codecept config`: check global config -* `codecept config unit`: check suite config +Executes tests. + +Usage: + +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites + +Verbosity modes: + +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -Check overriding config values (like in `run` command) +Override config values: -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -## Build +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +{% endhighlight %} -* `codecept build` -* `codecept build path/to/project` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -## DryRun +* `php codecept.phar self-update` + +@author Franck Cassedanne -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` From a43d73b585878581841df050548c4d541dbf3cdf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 May 2025 19:13:21 +0000 Subject: [PATCH 102/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,25 +5,12 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## Build +## GenerateStepObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -38,93 +25,36 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GenerateSnapshot -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Clean -Recursively cleans `output` directory and generated code. +## GenerateTest -* `codecept clean` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -138,42 +68,6 @@ Creates empty Helper class. -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## Init - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -188,42 +82,24 @@ Usage: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## CompletionFallback - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GeneratePageObject -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateEnvironment -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates empty environment configuration file into envs dir: -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` @@ -316,6 +192,75 @@ Options: +## CompletionFallback + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + + + + +## Init + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` + + + ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -326,11 +271,66 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateGroup +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config + +Load config: + +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file + +Check overriding config values (like in `run` command) + +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` From 3400beeff940c3d96501c2b74fb51514bb1d4ff0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 May 2025 21:12:30 +0000 Subject: [PATCH 103/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,12 +5,25 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject +## DryRun -Generates StepObject class. You will be asked for steps you want to implement. +Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` @@ -25,36 +38,93 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +## ConfigValidate -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## DryRun +Load config: -Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -68,6 +138,42 @@ Creates empty Helper class. +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## Init + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +188,42 @@ Usage: -## GeneratePageObject +## GenerateStepObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## CompletionFallback - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + @@ -192,75 +316,6 @@ Options: -## CompletionFallback - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Init - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -271,66 +326,11 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - - - - -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From ef229692d96e417a0923ef5f1fca755d29d8213f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 May 2025 23:14:16 +0000 Subject: [PATCH 104/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,25 +5,12 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## Build +## GenerateStepObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -38,93 +25,36 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GenerateSnapshot -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Clean -Recursively cleans `output` directory and generated code. +## GenerateTest -* `codecept clean` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -138,42 +68,6 @@ Creates empty Helper class. -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## Init - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -188,42 +82,24 @@ Usage: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## CompletionFallback - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GeneratePageObject -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateEnvironment -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates empty environment configuration file into envs dir: -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` @@ -316,6 +192,75 @@ Options: +## CompletionFallback + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + + + + +## Init + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` + + + ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -326,11 +271,66 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateGroup +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config + +Load config: + +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file + +Check overriding config values (like in `run` command) + +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` From 5864f788be4f083c4a278c9a8f3f0ed992bf3901 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 16 May 2025 08:20:54 +0000 Subject: [PATCH 105/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,12 +5,25 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject +## DryRun -Generates StepObject class. You will be asked for steps you want to implement. +Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` @@ -25,36 +38,93 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +## ConfigValidate -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## DryRun +Load config: -Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -68,6 +138,42 @@ Creates empty Helper class. +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## Init + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +188,42 @@ Usage: -## GeneratePageObject +## GenerateStepObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## CompletionFallback - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + @@ -192,75 +316,6 @@ Options: -## CompletionFallback - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Init - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -271,66 +326,11 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - - - - -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From 80183c9d8d2877b19c871ce7ed298acc2d66b54c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 16 May 2025 09:17:06 +0000 Subject: [PATCH 106/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,25 +5,12 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## Build +## GenerateStepObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -38,93 +25,36 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GenerateSnapshot -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Clean -Recursively cleans `output` directory and generated code. +## GenerateTest -* `codecept clean` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -138,42 +68,6 @@ Creates empty Helper class. -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## Init - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -188,42 +82,24 @@ Usage: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## CompletionFallback - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GeneratePageObject -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateEnvironment -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates empty environment configuration file into envs dir: -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` @@ -316,6 +192,75 @@ Options: +## CompletionFallback + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + + + + +## Init + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` + + + ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -326,11 +271,66 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateGroup +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config + +Load config: + +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file + +Check overriding config values (like in `run` command) + +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` From cbe21706e11e13aa9d4eca5dc1978def222577fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 16 May 2025 12:31:45 +0000 Subject: [PATCH 107/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,12 +5,25 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject +## DryRun -Generates StepObject class. You will be asked for steps you want to implement. +Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` @@ -25,36 +38,93 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +## ConfigValidate -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## DryRun +Load config: -Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -68,6 +138,42 @@ Creates empty Helper class. +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## Init + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +188,42 @@ Usage: -## GeneratePageObject +## GenerateStepObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## CompletionFallback - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + @@ -192,75 +316,6 @@ Options: -## CompletionFallback - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Init - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -271,66 +326,11 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - - - - -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From b0279c60a849a44ebea3904b21e498fe53aa84bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 16 May 2025 13:27:29 +0000 Subject: [PATCH 108/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,25 +5,12 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## Build +## GenerateStepObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -38,93 +25,36 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GenerateSnapshot -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Clean -Recursively cleans `output` directory and generated code. +## GenerateTest -* `codecept clean` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -138,42 +68,6 @@ Creates empty Helper class. -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## Init - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -188,42 +82,24 @@ Usage: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## CompletionFallback - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GeneratePageObject -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateEnvironment -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates empty environment configuration file into envs dir: -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` @@ -316,6 +192,75 @@ Options: +## CompletionFallback + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + + + + +## Init + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` + + + ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -326,11 +271,66 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateGroup +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config + +Load config: + +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file + +Check overriding config values (like in `run` command) + +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` From 151a804704cbd727d4c8c10416a3bb433ab331cd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 16 May 2025 17:12:59 +0000 Subject: [PATCH 109/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,12 +5,25 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject +## DryRun -Generates StepObject class. You will be asked for steps you want to implement. +Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` @@ -25,36 +38,93 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +## ConfigValidate -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## DryRun +Load config: -Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -68,6 +138,42 @@ Creates empty Helper class. +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## Init + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +188,42 @@ Usage: -## GeneratePageObject +## GenerateStepObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## CompletionFallback - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + @@ -192,75 +316,6 @@ Options: -## CompletionFallback - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Init - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -271,66 +326,11 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - - - - -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From f97e81807af48a678fa212b8699d06340e3e9880 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 16 May 2025 18:21:27 +0000 Subject: [PATCH 110/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f394c1457 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,25 +5,12 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun - -Shows step-by-step execution process for scenario driven tests without actually running them. - -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` - - - - -## Build +## GenerateStepObject -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept build` -* `codecept build path/to/project` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions @@ -38,93 +25,36 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). +## GenerateSnapshot -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. - -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` - - - -## GenerateEnvironment - -Generates empty environment configuration file into envs dir: - - * `codecept g:env firefox` - -Required to have `envs` path to be specified in `codeception.yml` +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: +## DryRun -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Clean -Recursively cleans `output` directory and generated code. +## GenerateTest -* `codecept clean` +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` @@ -138,42 +68,6 @@ Creates empty Helper class. -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSnapshot - -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder - -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` - - - -## Init - - - ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -188,42 +82,24 @@ Usage: -## GenerateStepObject - -Generates StepObject class. You will be asked for steps you want to implement. - -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions - - - - -## CompletionFallback - - - -## GenerateTest - -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GeneratePageObject -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +## GenerateEnvironment -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +Generates empty environment configuration file into envs dir: -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` @@ -316,6 +192,75 @@ Options: +## CompletionFallback + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` + + + + +## Init + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## GenerateGroup + +Creates empty GroupObject - extension which handles all group events. + +* `codecept g:group Admin` + + + ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -326,11 +271,66 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## GenerateGroup +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` + + + + +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + + + + +## ConfigValidate + +Validates and prints Codeception config. +Use it do debug Yaml configs + +Check config: + +* `codecept config`: check global config +* `codecept config unit`: check suite config + +Load config: + +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file + +Check overriding config values (like in `run` command) + +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -Creates empty GroupObject - extension which handles all group events. -* `codecept g:group Admin` From c4db8a62481d2f635308236e23c736f89f10cbe9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 16 May 2025 21:14:38 +0000 Subject: [PATCH 111/156] updated --- docs/reference/Commands.md | 316 ++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f394c1457..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,12 +5,25 @@ title: Commands - Codeception - Documentation # Console Commands -## GenerateStepObject +## DryRun -Generates StepObject class. You will be asked for steps you want to implement. +Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` + + + + +## Build + +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. + +* `codecept build` +* `codecept build path/to/project` @@ -25,36 +38,93 @@ Generates user-friendly text scenarios from scenario-driven tests (Cest). -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +## ConfigValidate -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## DryRun +Load config: -Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## GenerateFeature + +Generates Feature file (in Gherkin): + +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` + + + + +## GherkinSteps + +Prints all steps from all Gherkin contexts for a specific suite + +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} + + + + +## GeneratePageObject + +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. + +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` + + + +## GenerateEnvironment + +Generates empty environment configuration file into envs dir: + + * `codecept g:env firefox` + +Required to have `envs` path to be specified in `codeception.yml` + + + +## GenerateCest + +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` + + + + +## Clean + +Recursively cleans `output` directory and generated code. + +* `codecept clean` -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` @@ -68,6 +138,42 @@ Creates empty Helper class. +## GenerateSuite + +Create new test suite. Requires suite name and actor name + +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester + + + + +## Console + +Try to execute test commands in run-time. You may try commands before writing the test. + +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. + + + +## GenerateSnapshot + +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder + +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` + + + +## Init + + + ## GherkinSnippets Generates code snippets for matched feature files in a suite. @@ -82,24 +188,42 @@ Usage: -## GeneratePageObject +## GenerateStepObject -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateEnvironment -Generates empty environment configuration file into envs dir: +## CompletionFallback - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` + +## GenerateTest + +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. + +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` + + + +## Bootstrap + +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. + +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. + +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed + @@ -192,75 +316,6 @@ Options: -## CompletionFallback - - - -## GherkinSteps - -Prints all steps from all Gherkin contexts for a specific suite - -{% highlight yaml %} -codecept gherkin:steps acceptance - -{% endhighlight %} - - - - -## Clean - -Recursively cleans `output` directory and generated code. - -* `codecept clean` - - - - -## Init - - - -## GenerateCest - -Generates Cest (scenario-driven object-oriented test) file: - -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` - - - - -## Console - -Try to execute test commands in run-time. You may try commands before writing the test. - -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. - - - -## GenerateSuite - -Create new test suite. Requires suite name and actor name - -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester - - - - -## GenerateGroup - -Creates empty GroupObject - extension which handles all group events. - -* `codecept g:group Admin` - - - ## SelfUpdate Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . @@ -271,66 +326,11 @@ Auto-updates phar archive from official site: 'https://codeception.com/codecept. -## Build - -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. - -* `codecept build` -* `codecept build path/to/project` - - - - -## GenerateFeature - -Generates Feature file (in Gherkin): - -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` - - - - -## Bootstrap - -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. - -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. - -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed - - - - -## ConfigValidate - -Validates and prints Codeception config. -Use it do debug Yaml configs - -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config - -Load config: - -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file - -Check overriding config values (like in `run` command) - -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +## GenerateGroup +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From 6ccf20ae1a4aef4b6e265c8c0e44dd791f9cd072 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 26 May 2025 08:32:23 +0000 Subject: [PATCH 112/156] updated --- changelog.markdown | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/changelog.markdown b/changelog.markdown index 90fe97d11..5271781a8 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,18 @@ title: Codeception Changelog +### Codeception 5.3.2: 5.3.2 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/26 07:51:41 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) + + + +## What's Changed +* Rollback getSubscribedEvents Extension refactor by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/Codeception/pull/6862 + +**Full Changelog**: https://github.com/Codeception/Codeception/compare/5.3.1...5.3.2 + + ### Codeception 5.3.1: 5.3.1 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/13 23:25:43 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) @@ -1691,21 +1703,6 @@ Released by [![](https://avatars.githubusercontent.com/u/47294?v=4&s=16) samdark -### Codeception 4.2.0: 4.2.0 - -Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2022/06/16 05:51:13 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) - - - -* Improved multi-application experience, allow filtering suites by name ([#6435](https://github.com/Codeception/Codeception/issues/6435)) by **[calvinalkan](https://github.com/calvinalkan)** -* Configuration override is passed to included suites ([#5978](https://github.com/Codeception/Codeception/issues/5978)) by **[calvinalkan](https://github.com/calvinalkan)** -* Made dry-run command work with module methods having return types ([#6470](https://github.com/Codeception/Codeception/issues/6470)) -* Support for expectError/Warning/Notice/Deprecation methods in unit tests (Requires PHPUnit 8.4+) -* Implemented new setting `convert_deprecations_to_exceptions` ([#6469](https://github.com/Codeception/Codeception/issues/6469)) -* Action file generator: Do not return when return type is never ([#6462](https://github.com/Codeception/Codeception/issues/6462)) -* Backported test.useless event from Codeception 5.0 ([#6459](https://github.com/Codeception/Codeception/issues/6459)) - - ### module-phalcon5 v2.0.0: v2.0.0 Released by [![](https://avatars.githubusercontent.com/u/1073784?v=4&s=16) niden](https://github.com/niden) on 2022/06/03 15:20:26 / [Repository](https://github.com/Codeception/module-phalcon5) / [Releases](https://github.com/Codeception/module-phalcon5/releases) From da7ee99320fe0a559db69458784e95adf0efd29b Mon Sep 17 00:00:00 2001 From: Nikolay Vasilev <48645940+MercerMorning@users.noreply.github.com> Date: Mon, 26 May 2025 22:56:21 +0300 Subject: [PATCH 113/156] Update modules.yml add grpc module --- _data/modules.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_data/modules.yml b/_data/modules.yml index 999b6a164..06df2206a 100644 --- a/_data/modules.yml +++ b/_data/modules.yml @@ -165,3 +165,7 @@ - name: Yandex link: https://github.com/portrino/codeception-yandex-module description: Validation of structured data via yandex API. + +- name: Grpc + link: https://github.com/MercerMorning/codeception-grpc-module + description: Validation of grpc server. From 102033844884a5247f8343347d0ea47a2516d20b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 May 2025 06:23:23 +0000 Subject: [PATCH 114/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f10c46c45 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,116 +5,166 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun +## CompletionFallback -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Run +Executes tests. +Usage: -## Build +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Verbosity modes: -* `codecept build` -* `codecept build path/to/project` +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateScenarios +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Run with specific extension -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## GenerateEnvironment -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +Generates empty environment configuration file into envs dir: -Check overriding config values (like in `run` command) + * `codecept g:env firefox` -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Required to have `envs` path to be specified in `codeception.yml` +## GherkinSnippets -## GenerateFeature +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Generates Feature file (in Gherkin): +Usage: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## Build -## GherkinSteps +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept build` +* `codecept build path/to/project` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. -## GeneratePageObject +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateFeature +Generates Feature file (in Gherkin): -## GenerateEnvironment +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Bootstrap -## GenerateCest +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -Generates Cest (scenario-driven object-oriented test) file: +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed @@ -128,209 +178,159 @@ Recursively cleans `output` directory and generated code. -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateSnapshot -## GenerateSuite +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Create new test suite. Requires suite name and actor name +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. -## Console +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GenerateCest -## GenerateSnapshot +Generates Cest (scenario-driven object-oriented test) file: -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## ConfigValidate -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## GenerateStepObject +Load config: -Generates StepObject class. You will be asked for steps you want to implement. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## CompletionFallback +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. -## GenerateTest +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## SelfUpdate -## Bootstrap +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `php codecept.phar self-update` -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +@author Franck Cassedanne -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite +Create new test suite. Requires suite name and actor name -## Run +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: +## Init -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateGroup -Override config values: +Creates empty GroupObject - extension which handles all group events. -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:group Admin` -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +## GenerateScenarios -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% endhighlight %} +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateHelper -## SelfUpdate +Creates empty Helper class. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `php codecept.phar self-update` -@author Franck Cassedanne +## GherkinSteps -## GenerateGroup +Prints all steps from all Gherkin contexts for a specific suite -Creates empty GroupObject - extension which handles all group events. +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} -* `codecept g:group Admin` From e3efa01c4e05ee52b34a05db2821d9af17662efa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 May 2025 07:15:59 +0000 Subject: [PATCH 115/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f10c46c45..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,166 +5,116 @@ title: Commands - Codeception - Documentation # Console Commands -## CompletionFallback +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +## Build -Verbosity modes: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept build` +* `codecept build path/to/project` -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +## GenerateScenarios -Run with specific extension +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests -{% endhighlight %} +## ConfigValidate +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: -## GenerateEnvironment +* `codecept config`: check global config +* `codecept config unit`: check suite config -Generates empty environment configuration file into envs dir: +Load config: - * `codecept g:env firefox` +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Required to have `envs` path to be specified in `codeception.yml` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## GenerateFeature -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Console -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## GenerateFeature +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -Generates Feature file (in Gherkin): -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateCest -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` @@ -178,159 +128,209 @@ Recursively cleans `output` directory and generated code. -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateHelper -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## DryRun -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## Init -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GherkinSnippets -## ConfigValidate +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Validates and prints Codeception config. -Use it do debug Yaml configs +Usage: -Check config: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## GenerateStepObject -Check overriding config values (like in `run` command) +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateStepObject +## CompletionFallback -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## Bootstrap -@author Franck Cassedanne +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Run +Executes tests. +Usage: -## Init +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## GenerateGroup +Load config: -Creates empty GroupObject - extension which handles all group events. +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept g:group Admin` +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateGroup -{% endhighlight %} +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From 62f66f5d9035fcef3df7581d15d107693b728755 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 May 2025 08:21:30 +0000 Subject: [PATCH 116/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f10c46c45 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,116 +5,166 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun +## CompletionFallback -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Run +Executes tests. +Usage: -## Build +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Verbosity modes: -* `codecept build` -* `codecept build path/to/project` +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateScenarios +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Run with specific extension -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## GenerateEnvironment -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +Generates empty environment configuration file into envs dir: -Check overriding config values (like in `run` command) + * `codecept g:env firefox` -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Required to have `envs` path to be specified in `codeception.yml` +## GherkinSnippets -## GenerateFeature +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Generates Feature file (in Gherkin): +Usage: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## Build -## GherkinSteps +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept build` +* `codecept build path/to/project` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. -## GeneratePageObject +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateFeature +Generates Feature file (in Gherkin): -## GenerateEnvironment +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Bootstrap -## GenerateCest +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -Generates Cest (scenario-driven object-oriented test) file: +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed @@ -128,209 +178,159 @@ Recursively cleans `output` directory and generated code. -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateSnapshot -## GenerateSuite +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Create new test suite. Requires suite name and actor name +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. -## Console +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GenerateCest -## GenerateSnapshot +Generates Cest (scenario-driven object-oriented test) file: -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## ConfigValidate -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## GenerateStepObject +Load config: -Generates StepObject class. You will be asked for steps you want to implement. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## CompletionFallback +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. -## GenerateTest +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## SelfUpdate -## Bootstrap +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `php codecept.phar self-update` -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +@author Franck Cassedanne -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite +Create new test suite. Requires suite name and actor name -## Run +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: +## Init -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateGroup -Override config values: +Creates empty GroupObject - extension which handles all group events. -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:group Admin` -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +## GenerateScenarios -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% endhighlight %} +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateHelper -## SelfUpdate +Creates empty Helper class. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `php codecept.phar self-update` -@author Franck Cassedanne +## GherkinSteps -## GenerateGroup +Prints all steps from all Gherkin contexts for a specific suite -Creates empty GroupObject - extension which handles all group events. +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} -* `codecept g:group Admin` From 9967b66961491cc593894de24337bc7ff0a3461a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 May 2025 09:17:15 +0000 Subject: [PATCH 117/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f10c46c45..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,166 +5,116 @@ title: Commands - Codeception - Documentation # Console Commands -## CompletionFallback +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +## Build -Verbosity modes: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept build` +* `codecept build path/to/project` -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +## GenerateScenarios -Run with specific extension +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests -{% endhighlight %} +## ConfigValidate +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: -## GenerateEnvironment +* `codecept config`: check global config +* `codecept config unit`: check suite config -Generates empty environment configuration file into envs dir: +Load config: - * `codecept g:env firefox` +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Required to have `envs` path to be specified in `codeception.yml` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## GenerateFeature -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Console -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## GenerateFeature +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -Generates Feature file (in Gherkin): -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateCest -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` @@ -178,159 +128,209 @@ Recursively cleans `output` directory and generated code. -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateHelper -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## DryRun -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## Init -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GherkinSnippets -## ConfigValidate +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Validates and prints Codeception config. -Use it do debug Yaml configs +Usage: -Check config: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## GenerateStepObject -Check overriding config values (like in `run` command) +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateStepObject +## CompletionFallback -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## Bootstrap -@author Franck Cassedanne +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Run +Executes tests. +Usage: -## Init +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## GenerateGroup +Load config: -Creates empty GroupObject - extension which handles all group events. +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept g:group Admin` +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateGroup -{% endhighlight %} +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From 54162b319308586b6ac07cab82faac5fedc00a44 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 31 May 2025 07:14:25 +0000 Subject: [PATCH 118/156] updated --- changelog.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 5271781a8..0c2b3b9e6 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,24 @@ title: Codeception Changelog +### module-yii2 v2.0.4: v2.0.4 + +Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/05/31 06:53:23 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) + + + +## [2.0.4](https://github.com/Codeception/module-yii2/compare/v2.0.3...v2.0.4) (2025-05-31) + + +### Bug Fixes + +* fixes [[#131](https://github.com/Codeception/module-yii2/issues/131)](https://github.com/Codeception/module-yii2/issues/131) yiilogger may not be initialized in _failed ([b480bf1](https://github.com/Codeception/module-yii2/commit/b480bf18befdc8ede138f2f3a6b09a8989d11cb9)) + + + + + + ### Codeception 5.3.2: 5.3.2 Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/05/26 07:51:41 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases) From 66abc2f2e9300df8594bab118ecfd34d20b4268d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Jun 2025 14:13:38 +0000 Subject: [PATCH 119/156] updated --- changelog.markdown | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/changelog.markdown b/changelog.markdown index 0c2b3b9e6..9bb400e4b 100644 --- a/changelog.markdown +++ b/changelog.markdown @@ -9,6 +9,27 @@ title: Codeception Changelog +### module-symfony 3.6.0: 3.6.0 + +Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2025/06/04 14:01:56 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases) + + + +## What's Changed +* Document new Symfony assertions by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/208 +* Fix parameter name in exception for case when Kernel has custom names… by **[prophetz](https://github.com/prophetz)** in https://github.com/Codeception/module-symfony/pull/199 +* Update MailerAssertionsTrait.php: Adding Mailpit by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/204 +* Remove PHP 8.1 Support by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/211 +* Update ServicesAssertionsTrait.php: Adding another hint about private… by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/210 +* Replace kernel reboot with actual boot to reset services by **[Seros](https://github.com/Seros)** in https://github.com/Codeception/module-symfony/pull/209 + +## New Contributors +* **[prophetz](https://github.com/prophetz)** made their first contribution in https://github.com/Codeception/module-symfony/pull/199 +* **[Seros](https://github.com/Seros)** made their first contribution in https://github.com/Codeception/module-symfony/pull/209 + +**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.5.1...3.6.0 + + ### module-yii2 v2.0.4: v2.0.4 Released by [![](https://avatars.githubusercontent.com/in/15368?v=4&s=16) github-actions[bot]](https://github.com/apps/github-actions) on 2025/05/31 06:53:23 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases) From 35408fcf5b9c5a67f504a198f2014ec19323cccb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 01:17:54 +0000 Subject: [PATCH 120/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f10c46c45 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,116 +5,166 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun +## CompletionFallback -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Run +Executes tests. +Usage: -## Build +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Verbosity modes: -* `codecept build` -* `codecept build path/to/project` +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateScenarios +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Run with specific extension -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## GenerateEnvironment -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +Generates empty environment configuration file into envs dir: -Check overriding config values (like in `run` command) + * `codecept g:env firefox` -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Required to have `envs` path to be specified in `codeception.yml` +## GherkinSnippets -## GenerateFeature +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Generates Feature file (in Gherkin): +Usage: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## Build -## GherkinSteps +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept build` +* `codecept build path/to/project` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. -## GeneratePageObject +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateFeature +Generates Feature file (in Gherkin): -## GenerateEnvironment +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Bootstrap -## GenerateCest +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -Generates Cest (scenario-driven object-oriented test) file: +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed @@ -128,209 +178,159 @@ Recursively cleans `output` directory and generated code. -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateSnapshot -## GenerateSuite +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Create new test suite. Requires suite name and actor name +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. -## Console +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GenerateCest -## GenerateSnapshot +Generates Cest (scenario-driven object-oriented test) file: -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## ConfigValidate -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## GenerateStepObject +Load config: -Generates StepObject class. You will be asked for steps you want to implement. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## CompletionFallback +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. -## GenerateTest +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## SelfUpdate -## Bootstrap +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `php codecept.phar self-update` -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +@author Franck Cassedanne -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite +Create new test suite. Requires suite name and actor name -## Run +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: +## Init -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateGroup -Override config values: +Creates empty GroupObject - extension which handles all group events. -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:group Admin` -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +## GenerateScenarios -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% endhighlight %} +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateHelper -## SelfUpdate +Creates empty Helper class. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `php codecept.phar self-update` -@author Franck Cassedanne +## GherkinSteps -## GenerateGroup +Prints all steps from all Gherkin contexts for a specific suite -Creates empty GroupObject - extension which handles all group events. +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} -* `codecept g:group Admin` From 95d79ff3a493a5355d33eb3525cc73671f7a50c0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 03:16:23 +0000 Subject: [PATCH 121/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f10c46c45..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,166 +5,116 @@ title: Commands - Codeception - Documentation # Console Commands -## CompletionFallback +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +## Build -Verbosity modes: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept build` +* `codecept build path/to/project` -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +## GenerateScenarios -Run with specific extension +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests -{% endhighlight %} +## ConfigValidate +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: -## GenerateEnvironment +* `codecept config`: check global config +* `codecept config unit`: check suite config -Generates empty environment configuration file into envs dir: +Load config: - * `codecept g:env firefox` +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Required to have `envs` path to be specified in `codeception.yml` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## GenerateFeature -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Console -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## GenerateFeature +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -Generates Feature file (in Gherkin): -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateCest -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` @@ -178,159 +128,209 @@ Recursively cleans `output` directory and generated code. -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateHelper -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## DryRun -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## Init -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GherkinSnippets -## ConfigValidate +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Validates and prints Codeception config. -Use it do debug Yaml configs +Usage: -Check config: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## GenerateStepObject -Check overriding config values (like in `run` command) +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateStepObject +## CompletionFallback -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## Bootstrap -@author Franck Cassedanne +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Run +Executes tests. +Usage: -## Init +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## GenerateGroup +Load config: -Creates empty GroupObject - extension which handles all group events. +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept g:group Admin` +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateGroup -{% endhighlight %} +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From 8f061dd0019553f4e2c034f8083f4a3f2d636f23 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 04:24:36 +0000 Subject: [PATCH 122/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f10c46c45 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,116 +5,166 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun +## CompletionFallback -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Run +Executes tests. +Usage: -## Build +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Verbosity modes: -* `codecept build` -* `codecept build path/to/project` +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateScenarios +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Run with specific extension -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## GenerateEnvironment -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +Generates empty environment configuration file into envs dir: -Check overriding config values (like in `run` command) + * `codecept g:env firefox` -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Required to have `envs` path to be specified in `codeception.yml` +## GherkinSnippets -## GenerateFeature +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Generates Feature file (in Gherkin): +Usage: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## Build -## GherkinSteps +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept build` +* `codecept build path/to/project` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. -## GeneratePageObject +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateFeature +Generates Feature file (in Gherkin): -## GenerateEnvironment +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Bootstrap -## GenerateCest +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -Generates Cest (scenario-driven object-oriented test) file: +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed @@ -128,209 +178,159 @@ Recursively cleans `output` directory and generated code. -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateSnapshot -## GenerateSuite +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Create new test suite. Requires suite name and actor name +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. -## Console +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GenerateCest -## GenerateSnapshot +Generates Cest (scenario-driven object-oriented test) file: -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## ConfigValidate -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## GenerateStepObject +Load config: -Generates StepObject class. You will be asked for steps you want to implement. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## CompletionFallback +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. -## GenerateTest +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## SelfUpdate -## Bootstrap +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `php codecept.phar self-update` -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +@author Franck Cassedanne -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite +Create new test suite. Requires suite name and actor name -## Run +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: +## Init -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateGroup -Override config values: +Creates empty GroupObject - extension which handles all group events. -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:group Admin` -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +## GenerateScenarios -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% endhighlight %} +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateHelper -## SelfUpdate +Creates empty Helper class. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `php codecept.phar self-update` -@author Franck Cassedanne +## GherkinSteps -## GenerateGroup +Prints all steps from all Gherkin contexts for a specific suite -Creates empty GroupObject - extension which handles all group events. +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} -* `codecept g:group Admin` From 7626c3915744c0b3714db3303d385d0d3d1e114f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 05:16:12 +0000 Subject: [PATCH 123/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f10c46c45..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,166 +5,116 @@ title: Commands - Codeception - Documentation # Console Commands -## CompletionFallback +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +## Build -Verbosity modes: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept build` +* `codecept build path/to/project` -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +## GenerateScenarios -Run with specific extension +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests -{% endhighlight %} +## ConfigValidate +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: -## GenerateEnvironment +* `codecept config`: check global config +* `codecept config unit`: check suite config -Generates empty environment configuration file into envs dir: +Load config: - * `codecept g:env firefox` +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Required to have `envs` path to be specified in `codeception.yml` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## GenerateFeature -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Console -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## GenerateFeature +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -Generates Feature file (in Gherkin): -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateCest -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` @@ -178,159 +128,209 @@ Recursively cleans `output` directory and generated code. -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateHelper -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## DryRun -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## Init -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GherkinSnippets -## ConfigValidate +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Validates and prints Codeception config. -Use it do debug Yaml configs +Usage: -Check config: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## GenerateStepObject -Check overriding config values (like in `run` command) +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateStepObject +## CompletionFallback -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## Bootstrap -@author Franck Cassedanne +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Run +Executes tests. +Usage: -## Init +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## GenerateGroup +Load config: -Creates empty GroupObject - extension which handles all group events. +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept g:group Admin` +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateGroup -{% endhighlight %} +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From dcbd016ab7046ac0386b89d6d7e22db55617c2f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 08:22:21 +0000 Subject: [PATCH 124/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f10c46c45 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,116 +5,166 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun +## CompletionFallback -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Run +Executes tests. +Usage: -## Build +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Verbosity modes: -* `codecept build` -* `codecept build path/to/project` +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateScenarios +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Run with specific extension -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## GenerateEnvironment -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +Generates empty environment configuration file into envs dir: -Check overriding config values (like in `run` command) + * `codecept g:env firefox` -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Required to have `envs` path to be specified in `codeception.yml` +## GherkinSnippets -## GenerateFeature +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Generates Feature file (in Gherkin): +Usage: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## Build -## GherkinSteps +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept build` +* `codecept build path/to/project` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. -## GeneratePageObject +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateFeature +Generates Feature file (in Gherkin): -## GenerateEnvironment +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Bootstrap -## GenerateCest +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -Generates Cest (scenario-driven object-oriented test) file: +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed @@ -128,209 +178,159 @@ Recursively cleans `output` directory and generated code. -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateSnapshot -## GenerateSuite +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Create new test suite. Requires suite name and actor name +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. -## Console +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GenerateCest -## GenerateSnapshot +Generates Cest (scenario-driven object-oriented test) file: -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## ConfigValidate -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## GenerateStepObject +Load config: -Generates StepObject class. You will be asked for steps you want to implement. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## CompletionFallback +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. -## GenerateTest +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## SelfUpdate -## Bootstrap +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `php codecept.phar self-update` -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +@author Franck Cassedanne -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite +Create new test suite. Requires suite name and actor name -## Run +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: +## Init -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateGroup -Override config values: +Creates empty GroupObject - extension which handles all group events. -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:group Admin` -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +## GenerateScenarios -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% endhighlight %} +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateHelper -## SelfUpdate +Creates empty Helper class. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `php codecept.phar self-update` -@author Franck Cassedanne +## GherkinSteps -## GenerateGroup +Prints all steps from all Gherkin contexts for a specific suite -Creates empty GroupObject - extension which handles all group events. +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} -* `codecept g:group Admin` From d2fd51a2e70d5632d10a1367c449a61cb085f14d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 09:18:00 +0000 Subject: [PATCH 125/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f10c46c45..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,166 +5,116 @@ title: Commands - Codeception - Documentation # Console Commands -## CompletionFallback +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +## Build -Verbosity modes: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept build` +* `codecept build path/to/project` -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +## GenerateScenarios -Run with specific extension +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests -{% endhighlight %} +## ConfigValidate +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: -## GenerateEnvironment +* `codecept config`: check global config +* `codecept config unit`: check suite config -Generates empty environment configuration file into envs dir: +Load config: - * `codecept g:env firefox` +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Required to have `envs` path to be specified in `codeception.yml` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## GenerateFeature -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Console -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## GenerateFeature +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -Generates Feature file (in Gherkin): -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateCest -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` @@ -178,159 +128,209 @@ Recursively cleans `output` directory and generated code. -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateHelper -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## DryRun -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## Init -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GherkinSnippets -## ConfigValidate +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Validates and prints Codeception config. -Use it do debug Yaml configs +Usage: -Check config: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## GenerateStepObject -Check overriding config values (like in `run` command) +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateStepObject +## CompletionFallback -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## Bootstrap -@author Franck Cassedanne +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Run +Executes tests. +Usage: -## Init +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## GenerateGroup +Load config: -Creates empty GroupObject - extension which handles all group events. +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept g:group Admin` +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateGroup -{% endhighlight %} +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From 0a0236709111aeef1f8eeeb58127988272dc5858 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 10:17:38 +0000 Subject: [PATCH 126/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index 43c021406..f10c46c45 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,116 +5,166 @@ title: Commands - Codeception - Documentation # Console Commands -## DryRun +## CompletionFallback -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Run +Executes tests. +Usage: -## Build +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. +Verbosity modes: -* `codecept build` -* `codecept build path/to/project` +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information +Load config: +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file +Override config values: -## GenerateScenarios +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Run with specific extension -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## ConfigValidate -Validates and prints Codeception config. -Use it do debug Yaml configs -Check config: - -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: +## GenerateEnvironment -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +Generates empty environment configuration file into envs dir: -Check overriding config values (like in `run` command) + * `codecept g:env firefox` -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +Required to have `envs` path to be specified in `codeception.yml` +## GherkinSnippets -## GenerateFeature +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Generates Feature file (in Gherkin): +Usage: -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +## Build -## GherkinSteps +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -Prints all steps from all Gherkin contexts for a specific suite +* `codecept build` +* `codecept build path/to/project` -{% highlight yaml %} -codecept gherkin:steps acceptance -{% endhighlight %} +## Console +Try to execute test commands in run-time. You may try commands before writing the test. -## GeneratePageObject +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +## GenerateFeature +Generates Feature file (in Gherkin): -## GenerateEnvironment +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -Generates empty environment configuration file into envs dir: - * `codecept g:env firefox` -Required to have `envs` path to be specified in `codeception.yml` +## Bootstrap -## GenerateCest +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. -Generates Cest (scenario-driven object-oriented test) file: +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed @@ -128,209 +178,159 @@ Recursively cleans `output` directory and generated code. -## GenerateHelper +## GeneratePageObject -Creates empty Helper class. +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` +## GenerateSnapshot -## GenerateSuite +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder -Create new test suite. Requires suite name and actor name +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. -## Console +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GenerateCest -## GenerateSnapshot +Generates Cest (scenario-driven object-oriented test) file: -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` -## Init +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## ConfigValidate -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: +* `codecept config`: check global config +* `codecept config unit`: check suite config -## GenerateStepObject +Load config: -Generates StepObject class. You will be asked for steps you want to implement. +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## CompletionFallback +## GenerateStepObject +Generates StepObject class. You will be asked for steps you want to implement. -## GenerateTest +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## SelfUpdate -## Bootstrap +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. +* `php codecept.phar self-update` -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +@author Franck Cassedanne -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +## GenerateSuite +Create new test suite. Requires suite name and actor name -## Run +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites -Verbosity modes: +## Init -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file +## GenerateGroup -Override config values: +Creates empty GroupObject - extension which handles all group events. -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +* `codecept g:group Admin` -Run with specific extension -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run +## GenerateScenarios -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests +Generates user-friendly text scenarios from scenario-driven tests (Cest). -{% endhighlight %} +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +## GenerateHelper -## SelfUpdate +Creates empty Helper class. -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -* `php codecept.phar self-update` -@author Franck Cassedanne +## GherkinSteps -## GenerateGroup +Prints all steps from all Gherkin contexts for a specific suite -Creates empty GroupObject - extension which handles all group events. +{% highlight yaml %} +codecept gherkin:steps acceptance + +{% endhighlight %} -* `codecept g:group Admin` From a60713dfa024410131033892cc53256255ef8b3f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 11:14:12 +0000 Subject: [PATCH 127/156] updated --- docs/reference/Commands.md | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/docs/reference/Commands.md b/docs/reference/Commands.md index f10c46c45..43c021406 100644 --- a/docs/reference/Commands.md +++ b/docs/reference/Commands.md @@ -5,166 +5,116 @@ title: Commands - Codeception - Documentation # Console Commands -## CompletionFallback +## DryRun +Shows step-by-step execution process for scenario driven tests without actually running them. +* `codecept dry-run acceptance` +* `codecept dry-run acceptance MyCest` +* `codecept dry-run acceptance checkout.feature` +* `codecept dry-run tests/acceptance/MyCest.php` -## Run -Executes tests. -Usage: -* `codecept run acceptance`: run all acceptance tests -* `codecept run tests/acceptance/MyCest.php`: run only MyCest -* `codecept run acceptance MyCest`: same as above -* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest -* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number -* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items -* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names -* `codecept run acceptance checkout.feature`: run feature-file -* `codecept run acceptance -g slow`: run tests from *slow* group -* `codecept run unit,functional`: run only unit and functional suites +## Build -Verbosity modes: +Generates Actor classes (initially Guy classes) from suite configs. +Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept run -v`: -* `codecept run --steps`: print step-by-step execution -* `codecept run -vv`: print steps and debug information -* `codecept run --debug`: alias for `-vv` -* `codecept run -vvv`: print Codeception-internal debug information +* `codecept build` +* `codecept build path/to/project` -Load config: -* `codecept run -c path/to/another/config`: from another dir -* `codecept run -c another_config.yml`: from another config file -Override config values: -* `codecept run -o "settings: shuffle: true"`: enable shuffle -* `codecept run -o "settings: lint: false"`: disable linting +## GenerateScenarios -Run with specific extension +Generates user-friendly text scenarios from scenario-driven tests (Cest). -* `codecept run --ext Recorder` run with Recorder extension enabled -* `codecept run --ext DotReporter` run with DotReporter printer -* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name +* `codecept g:scenarios acceptance` - for all acceptance tests +* `codecept g:scenarios acceptance --format html` - in html format +* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir -Full reference: -{% highlight yaml %} -Arguments: - suite suite to be tested - test test to be run -Options: - -o, --override=OVERRIDE Override config values (multiple values allowed) - --config (-c) Use custom path for config - --report Show output in compact style - --html Generate html with results (default: "report.html") - --xml Generate JUnit XML Log (default: "report.xml") - --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") - --no-redirect Do not redirect to Composer-installed version in vendor/codeception - --colors Use colors in output - --no-colors Force no colors in output (useful to override config file) - --silent Only outputs suite names and final results. Almost the same as `--quiet` - --steps Show steps in output - --debug (-d) Alias for `-vv` - --bootstrap Execute bootstrap script before the test - --coverage Run with code coverage (default: "coverage.serialized") - --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format - --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") - --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") - --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") - --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") - --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") - --no-exit Don't finish with exit code - --group (-g) Groups of tests to be executed (multiple values allowed) - --skip (-s) Skip selected suites (multiple values allowed) - --skip-group (-x) Skip selected groups (multiple values allowed) - --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') - --fail-fast (-f) Stop after nth failure (defaults to 1) - --no-rebuild Do not rebuild actor classes on start - --help (-h) Display this help message. - --quiet (-q) Do not output any message. Almost the same as `--silent` - --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - --seed Use the given seed for shuffling tests -{% endhighlight %} +## ConfigValidate +Validates and prints Codeception config. +Use it do debug Yaml configs +Check config: -## GenerateEnvironment +* `codecept config`: check global config +* `codecept config unit`: check suite config -Generates empty environment configuration file into envs dir: +Load config: - * `codecept g:env firefox` +* `codecept config:validate -c path/to/another/config`: from another dir +* `codecept config:validate -c another_config.yml`: from another config file -Required to have `envs` path to be specified in `codeception.yml` +Check overriding config values (like in `run` command) +* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle +* `codecept config:validate -o "settings: lint: false"`: disable linting +* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter -## GherkinSnippets -Generates code snippets for matched feature files in a suite. -Code snippets are expected to be implemented in Actor or PageObjects -Usage: +## GenerateFeature -* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests -* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests -* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file -* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir +Generates Feature file (in Gherkin): +* `codecept generate:feature suite Login` +* `codecept g:feature suite subdir/subdir/login.feature` +* `codecept g:feature suite login.feature -c path/to/project` -## Build -Generates Actor classes (initially Guy classes) from suite configs. -Starting from Codeception 2.0 actor classes are auto-generated. Use this command to generate them manually. -* `codecept build` -* `codecept build path/to/project` +## GherkinSteps +Prints all steps from all Gherkin contexts for a specific suite +{% highlight yaml %} +codecept gherkin:steps acceptance +{% endhighlight %} -## Console -Try to execute test commands in run-time. You may try commands before writing the test. -* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. +## GeneratePageObject +Generates PageObject. Can be generated either globally, or just for one suite. +If PageObject is generated globally it will act as UIMap, without any logic in it. -## GenerateFeature +* `codecept g:page Login` +* `codecept g:page Registration` +* `codecept g:page acceptance Login` -Generates Feature file (in Gherkin): -* `codecept generate:feature suite Login` -* `codecept g:feature suite subdir/subdir/login.feature` -* `codecept g:feature suite login.feature -c path/to/project` +## GenerateEnvironment +Generates empty environment configuration file into envs dir: + * `codecept g:env firefox` +Required to have `envs` path to be specified in `codeception.yml` -## Bootstrap -Creates default config, tests directory and sample suites for current project. -Use this command to start building a test suite. -By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +## GenerateCest -* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. -* `codecept bootstrap --empty` - creates `tests` dir without suites -* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. -* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. -* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed +Generates Cest (scenario-driven object-oriented test) file: + +* `codecept generate:cest suite Login` +* `codecept g:cest suite subdir/subdir/testnameCest.php` +* `codecept g:cest suite LoginCest -c path/to/project` +* `codecept g:cest "App\Login"` @@ -178,159 +128,209 @@ Recursively cleans `output` directory and generated code. -## GeneratePageObject - -Generates PageObject. Can be generated either globally, or just for one suite. -If PageObject is generated globally it will act as UIMap, without any logic in it. +## GenerateHelper -* `codecept g:page Login` -* `codecept g:page Registration` -* `codecept g:page acceptance Login` +Creates empty Helper class. +* `codecept g:helper MyHelper` +* `codecept g:helper "My\Helper"` -## GenerateSnapshot -Generates Snapshot. -Snapshot can be used to test dynamical data. -If suite name is provided, an actor class will be included into placeholder -* `codecept g:snapshot UserEmails` -* `codecept g:snapshot Products` -* `codecept g:snapshot acceptance UserEmails` +## GenerateSuite +Create new test suite. Requires suite name and actor name +* `` +* `codecept g:suite api` -> api + ApiTester +* `codecept g:suite integration Code` -> integration + CodeTester +* `codecept g:suite frontend Front` -> frontend + FrontTester -## DryRun -Shows step-by-step execution process for scenario driven tests without actually running them. -* `codecept dry-run acceptance` -* `codecept dry-run acceptance MyCest` -* `codecept dry-run acceptance checkout.feature` -* `codecept dry-run tests/acceptance/MyCest.php` +## Console +Try to execute test commands in run-time. You may try commands before writing the test. +* `codecept console acceptance` - starts acceptance suite environment. If you use WebDriver you can manipulate browser with Codeception commands. -## GenerateCest -Generates Cest (scenario-driven object-oriented test) file: -* `codecept generate:cest suite Login` -* `codecept g:cest suite subdir/subdir/testnameCest.php` -* `codecept g:cest suite LoginCest -c path/to/project` -* `codecept g:cest "App\Login"` +## GenerateSnapshot +Generates Snapshot. +Snapshot can be used to test dynamical data. +If suite name is provided, an actor class will be included into placeholder +* `codecept g:snapshot UserEmails` +* `codecept g:snapshot Products` +* `codecept g:snapshot acceptance UserEmails` -## GenerateTest -Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +## Init -* `codecept g:test unit User` -* `codecept g:test unit "App\User"` +## GherkinSnippets -## ConfigValidate +Generates code snippets for matched feature files in a suite. +Code snippets are expected to be implemented in Actor or PageObjects -Validates and prints Codeception config. -Use it do debug Yaml configs +Usage: -Check config: +* `codecept gherkin:snippets acceptance` - snippets from all feature of acceptance tests +* `codecept gherkin:snippets acceptance/feature/users` - snippets from `feature/users` dir of acceptance tests +* `codecept gherkin:snippets acceptance user_account.feature` - snippets from a single feature file +* `codecept gherkin:snippets acceptance/feature/users/user_accout.feature` - snippets from feature file in a dir -* `codecept config`: check global config -* `codecept config unit`: check suite config -Load config: -* `codecept config:validate -c path/to/another/config`: from another dir -* `codecept config:validate -c another_config.yml`: from another config file +## GenerateStepObject -Check overriding config values (like in `run` command) +Generates StepObject class. You will be asked for steps you want to implement. -* `codecept config:validate -o "settings: shuffle: true"`: enable shuffle -* `codecept config:validate -o "settings: lint: false"`: disable linting -* `codecept config:validate -o "reporters: report: \Custom\Reporter" --report`: use custom reporter +* `codecept g:stepobject acceptance AdminSteps` +* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions -## GenerateStepObject +## CompletionFallback -Generates StepObject class. You will be asked for steps you want to implement. -* `codecept g:stepobject acceptance AdminSteps` -* `codecept g:stepobject acceptance UserSteps --silent` - skip action questions +## GenerateTest +Generates skeleton for Unit Test that extends `Codeception\TestCase\Test`. +* `codecept g:test unit User` +* `codecept g:test unit "App\User"` -## SelfUpdate -Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . -* `php codecept.phar self-update` +## Bootstrap -@author Franck Cassedanne +Creates default config, tests directory and sample suites for current project. +Use this command to start building a test suite. +By default, it will create 3 suites **Acceptance**, **Functional**, and **Unit**. +* `codecept bootstrap` - creates `tests` dir and `codeception.yml` in current dir. +* `codecept bootstrap --empty` - creates `tests` dir without suites +* `codecept bootstrap --namespace Frontend` - creates tests, and use `Frontend` namespace for actor classes and helpers. +* `codecept bootstrap --actor Wizard` - sets actor as Wizard, to have `TestWizard` actor in tests. +* `codecept bootstrap path/to/the/project` - provide different path to a project, where tests should be placed -## GenerateSuite -Create new test suite. Requires suite name and actor name -* `` -* `codecept g:suite api` -> api + ApiTester -* `codecept g:suite integration Code` -> integration + CodeTester -* `codecept g:suite frontend Front` -> frontend + FrontTester +## Run +Executes tests. +Usage: -## Init +* `codecept run acceptance`: run all acceptance tests +* `codecept run tests/acceptance/MyCest.php`: run only MyCest +* `codecept run acceptance MyCest`: same as above +* `codecept run acceptance MyCest:myTestInIt`: run one test from a Cest +* `codecept run acceptance MyCest:myTestInIt#1`: run one example or data provider item by number +* `codecept run acceptance MyCest:myTestInIt#1-3`: run a range of examples or data provider items +* `codecept run acceptance MyCest:myTestInIt@name.*`: run data provider items with matching names +* `codecept run acceptance checkout.feature`: run feature-file +* `codecept run acceptance -g slow`: run tests from *slow* group +* `codecept run unit,functional`: run only unit and functional suites +Verbosity modes: +* `codecept run -v`: +* `codecept run --steps`: print step-by-step execution +* `codecept run -vv`: print steps and debug information +* `codecept run --debug`: alias for `-vv` +* `codecept run -vvv`: print Codeception-internal debug information -## GenerateGroup +Load config: -Creates empty GroupObject - extension which handles all group events. +* `codecept run -c path/to/another/config`: from another dir +* `codecept run -c another_config.yml`: from another config file -* `codecept g:group Admin` +Override config values: +* `codecept run -o "settings: shuffle: true"`: enable shuffle +* `codecept run -o "settings: lint: false"`: disable linting +Run with specific extension -## GenerateScenarios +* `codecept run --ext Recorder` run with Recorder extension enabled +* `codecept run --ext DotReporter` run with DotReporter printer +* `codecept run --ext "My\Custom\Extension"` run with an extension loaded by class name -Generates user-friendly text scenarios from scenario-driven tests (Cest). +Full reference: +{% highlight yaml %} +Arguments: + suite suite to be tested + test test to be run -* `codecept g:scenarios acceptance` - for all acceptance tests -* `codecept g:scenarios acceptance --format html` - in html format -* `codecept g:scenarios acceptance --path doc` - generate scenarios to `doc` dir +Options: + -o, --override=OVERRIDE Override config values (multiple values allowed) + --config (-c) Use custom path for config + --report Show output in compact style + --html Generate html with results (default: "report.html") + --xml Generate JUnit XML Log (default: "report.xml") + --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") + --no-redirect Do not redirect to Composer-installed version in vendor/codeception + --colors Use colors in output + --no-colors Force no colors in output (useful to override config file) + --silent Only outputs suite names and final results. Almost the same as `--quiet` + --steps Show steps in output + --debug (-d) Alias for `-vv` + --bootstrap Execute bootstrap script before the test + --coverage Run with code coverage (default: "coverage.serialized") + --disable-coverage-php Don't generate CodeCoverage report in raw PHP serialized format + --coverage-html Generate CodeCoverage HTML report in path (default: "coverage") + --coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml") + --coverage-text Generate CodeCoverage text report in file (default: "coverage.txt") + --coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit") + --coverage-cobertura Generate CodeCoverage Cobertura report in file (default: "coverage-cobertura") + --no-exit Don't finish with exit code + --group (-g) Groups of tests to be executed (multiple values allowed) + --skip (-s) Skip selected suites (multiple values allowed) + --skip-group (-x) Skip selected groups (multiple values allowed) + --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') + --fail-fast (-f) Stop after nth failure (defaults to 1) + --no-rebuild Do not rebuild actor classes on start + --help (-h) Display this help message. + --quiet (-q) Do not output any message. Almost the same as `--silent` + --verbose (-v|vv|vvv) Increase the verbosity of messages: `v` for normal output, `vv` for steps and debug, `vvv` for Codeception-internal debug + --version (-V) Display this application version. + --ansi Force ANSI output. + --no-ansi Disable ANSI output. + --no-interaction (-n) Do not ask any interactive question. + --seed Use the given seed for shuffling tests +{% endhighlight %} -## GenerateHelper -Creates empty Helper class. -* `codecept g:helper MyHelper` -* `codecept g:helper "My\Helper"` +## SelfUpdate +Auto-updates phar archive from official site: 'https://codeception.com/codecept.phar' . +* `php codecept.phar self-update` +@author Franck Cassedanne -## GherkinSteps -Prints all steps from all Gherkin contexts for a specific suite -{% highlight yaml %} -codecept gherkin:steps acceptance +## GenerateGroup -{% endhighlight %} +Creates empty GroupObject - extension which handles all group events. +* `codecept g:group Admin` From f365d841eb97d3c2a38ee00646a3929ec9fea718 Mon Sep 17 00:00:00 2001 From: Ihor Sychevskyi Date: Thu, 19 Jun 2025 00:45:09 +0300 Subject: [PATCH 128/156] update Community dropdown (#890) --- _layouts/bootstrap.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/_layouts/bootstrap.html b/_layouts/bootstrap.html index ff47fefa9..f8abba6f5 100644 --- a/_layouts/bootstrap.html +++ b/_layouts/bootstrap.html @@ -145,12 +145,7 @@

    Modules

  • Join our Slack
  • Follow us in Twitter
  • -
  • Page in Facebook -
  • - -
  • Russian Forum @ AT.info -
  • StackOverflow
  • GitHub Issues
  • Github discussions
  • From c445b836d9b1561a0cf952b6da25ae42a19188ac Mon Sep 17 00:00:00 2001 From: Ihor Sychevskyi Date: Sat, 28 Jun 2025 00:08:05 +0300 Subject: [PATCH 129/156] remove links (#892) --- _layouts/bootstrap.html | 8 -------- credits.html | 1 - 2 files changed, 9 deletions(-) diff --git a/_layouts/bootstrap.html b/_layouts/bootstrap.html index f8abba6f5..299f8ffea 100644 --- a/_layouts/bootstrap.html +++ b/_layouts/bootstrap.html @@ -122,10 +122,6 @@

    Modules

    Blog