Skip to content

Commit 9a45e9b

Browse files
Adding upgrading instructions
1 parent e335905 commit 9a45e9b

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

_posts/2022-07-28-codeception-5.markdown

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tests/
2626
Unit/
2727
```
2828

29-
All suite names will have their own namespace, as well as actor and helper classes:
29+
All suite names have their own namespace, as well as actor and helper classes:
3030

3131
```php
3232
<?php
@@ -44,7 +44,28 @@ class LoginCest
4444
}
4545
```
4646

47-
This new directory structure will be generated by running `codecept bootstrap`. The directory structure is set with a new default config, so the previous directory structure is still valid.
47+
This new directory structure will be generated by running `codecept bootstrap`.
48+
49+
### Upgrading from Codeception 4
50+
51+
Codeception 5 is compatible with the Codeception 4 directory structure. So if you don't want to change your file locations now, just keep your existing `codeception.yml`, and everything's fine.
52+
53+
However, if you want to upgrade to the new Codeception 5 directory structure (recommended), here's the new default `codeception.yml`:
54+
55+
```yaml
56+
namespace: Tests
57+
support_namespace: Support
58+
paths:
59+
tests: tests
60+
output: tests/_output
61+
data: tests/Support/Data
62+
support: tests/Support
63+
envs: tests/_envs
64+
actor_suffix: Tester
65+
extensions:
66+
enabled:
67+
- Codeception\Extension\RunFailed
68+
```
4869
4970
## Attributes
5071
@@ -103,6 +124,10 @@ Also new functions were added:
103124
* `codecept_pause()` - starts interactive pause anywhere in debug mode
104125
* `codecept_debug()` - prints a variable to console using Symfony VarDumper
105126

127+
### Upgrading from Codeception 4
128+
129+
Just remove `hoa/console` from your `composer.json`.
130+
106131
## Sharding
107132

108133
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.

0 commit comments

Comments
 (0)