diff --git a/_posts/2022-07-28-codeception-5.markdown b/_posts/2022-07-28-codeception-5.markdown index fd0e3f34c..41fbd9cc8 100644 --- a/_posts/2022-07-28-codeception-5.markdown +++ b/_posts/2022-07-28-codeception-5.markdown @@ -26,7 +26,7 @@ tests/ Unit/ ``` -All suite names will have their own namespace, as well as actor and helper classes: +All suite names have their own namespace, as well as actor and helper classes: ```php `Acceptance.suite.yml` + `functional.suite.yml` => `Functional.suite.yml` + `unit.suite.yml` => `Unit.suite.yml` +2. Inside those configuration files, update to the new namespace: + ```yaml + modules: + enabled: + - Tests\Support\Helper\Unit + ``` +3. In your `composer.json`, update to the new namespace: + ```json + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + ``` +4. In your `tests/Support/Acceptance|Functional|UnitTester.php` files, update to the new namespace. +5. Run `vendor/bin/codecept build` to create the files in `tests/Support/_generated`. +6. Modify the namespaces in all your test/cest files. +7. Run the tests with capitalized suite names: `vendor/bin/codecept run Unit` ## Attributes @@ -103,6 +149,10 @@ Also new functions were added: * `codecept_pause()` - starts interactive pause anywhere in debug mode * `codecept_debug()` - prints a variable to console using Symfony VarDumper +### Upgrading from Codeception 4 + +Just remove `hoa/console` from your `composer.json`. + ## Sharding The [Parallel Execution guide](/docs/ParallelExecution) has been rewritten and focused on a new feature: sharding. It is the simplest way to run slow tests (think of acceptance tests first) in parallel on multiple agents.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: