You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: changelog.markdown
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,36 @@ title: Codeception Changelog
7
7
8
8
# Changelog
9
9
10
+
#### 2.2.5
11
+
12
+
* Support for PhpUnit 5.x.
13
+
***[Lumen]** Major refactoring of Lumen module. See [[#3533](https://github.com/Codeception/Codeception/issues/3533)](https://github.com/Codeception/Codeception/pull/3533). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
14
+
***[Laravel5]** Removed calls to `Auth::logout()`, `Session::flush()` and `Cache::flush()` from after hook. See [#3493](https://github.com/Codeception/Codeception/issues/3493). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
15
+
***[Memcache]** Updated `Memcache::seeInMemcached` to check if the key exists alone or with the desired value. By **[sergeyklay](https://github.com/sergeyklay)**
16
+
***[Memcache]** Added `Memcache::haveInMemcached`. By **[sergeyklay](https://github.com/sergeyklay)**
17
+
***[Memcache]** Fixed `Memcache::dontSeeInMemcached`. By **[sergeyklay](https://github.com/sergeyklay)**
18
+
***[ZF2]** Zend Framework 3 Support. Made `init_autoloader` optional, because ZF3 uses composer for autoloading [#3525](https://github.com/Codeception/Codeception/issues/3525). By **[Naktibalda](https://github.com/Naktibalda)**
19
+
***[ZF2]** Fixed accessing Doctrine Entity Manager when client is not initialized. By **[chris1312](https://github.com/chris1312)**. See [#3524](https://github.com/Codeception/Codeception/issues/3524)
20
+
***[Yii2]** Allow to load fixtures from `_fixtures` method of a testcase. [See reference](http://codeception.com/docs/modules/Yii2#Fixtures). Fixes usage of nested transactions [#3520](https://github.com/Codeception/Codeception/issues/3520). By **[kalyabin](https://github.com/kalyabin)** and **[davertmik](https://github.com/davertmik)**
21
+
***[Yii1]** Fix private property accessible; allows to change urlManager class to subclass of CUrlManager. See **[3287](https://github.com/3287)**. By **[amashigeseiji](https://github.com/amashigeseiji)**
22
+
* Escaped tags in debug output by **[Naktibalda](https://github.com/Naktibalda)**. See [#3507](https://github.com/Codeception/Codeception/issues/3507). Fixes [#3495](https://github.com/Codeception/Codeception/issues/3495)
23
+
* Fixed [#3410](https://github.com/Codeception/Codeception/issues/3410): Wrong subSteps rendering in HTML ResultPrinter by **[niclopez](https://github.com/niclopez)**
24
+
***[WebDriver]** Improved exception message thrown when click('name') does not match any element [#3546](https://github.com/Codeception/Codeception/issues/3546) by **[Naktibalda](https://github.com/Naktibalda)**. Fixes [#3528](https://github.com/Codeception/Codeception/issues/3528)
25
+
***[SOAP]** Removed conflict with REST module. `seeResponseCodeIs` is deprecated in favor of `seeSoapResponseCodeIs` by **[eXorus](https://github.com/eXorus)**. See [#3512](https://github.com/Codeception/Codeception/issues/3512). Fixes [#3512](https://github.com/Codeception/Codeception/issues/3512)
26
+
* Fixed [#3472](https://github.com/Codeception/Codeception/issues/3472): group Files not working with a non-empty data provider by **[eXorus](https://github.com/eXorus)**
27
+
***[REST]** Disabled resetting server parameters in _before. Fixed REST+Laravel usage: [#3263](https://github.com/Codeception/Codeception/issues/3263). See [#3539](https://github.com/Codeception/Codeception/issues/3539). By **[janhenkgerritsen](https://github.com/janhenkgerritsen)**
28
+
***[REST]** Improved output of failed JsonType assertions [#3480](https://github.com/Codeception/Codeception/issues/3480). By **[Naktibalda](https://github.com/Naktibalda)**. Fixes [#2858](https://github.com/Codeception/Codeception/issues/2858)
29
+
***[REST]** Requests are added to browser history [#3446](https://github.com/Codeception/Codeception/issues/3446). Fixes regression [#3197](https://github.com/Codeception/Codeception/issues/3197). By **[Naktibalda](https://github.com/Naktibalda)**
30
+
***[REST]** application/json header check made case insensitive. Fixes [#3516](https://github.com/Codeception/Codeception/issues/3516). By **[Naktibalda](https://github.com/Naktibalda)**
31
+
* Fix bug in Coverage Filter related to relative filepaths [#3518](https://github.com/Codeception/Codeception/issues/3518). By **[sbacic](https://github.com/sbacic)**
32
+
***[Db]** PostgreSQL: fixed a problem when sequences are not a standard format (ie. table_id_seq). See [#3506](https://github.com/Codeception/Codeception/issues/3506). By **[alexjeen](https://github.com/alexjeen)**
33
+
***[Symfony]** Persist doctrine.dbal.backend_connection if Doctrine2 module is used [#3500](https://github.com/Codeception/Codeception/issues/3500). Fixes [#3479](https://github.com/Codeception/Codeception/issues/3479). By **[Naktibalda](https://github.com/Naktibalda)**
34
+
***[Doctrine2]** Using `Doctrine\ORM\EntityManagerInterface` as valid em instance [#3467](https://github.com/Codeception/Codeception/issues/3467). Fixes [#3459](https://github.com/Codeception/Codeception/issues/3459). By **[akbwm](https://github.com/akbwm)**
35
+
***[MongoDb]** Fixes `mongorestore` command syntax and adds --quiet option to config
36
+
***[Facebook]** Replaced `facebook/php-sdk-v4` library with `facebook/graph-sdk`.
37
+
* Fixed [#3433](https://github.com/Codeception/Codeception/issues/3433) detection of relative path when `codeception.yml` is not in project root. See [#3434](https://github.com/Codeception/Codeception/issues/3434). By **[loren](https://github.com/loren)**-osborn
38
+
* Handle deprecation messages according to `error_level` setting [#3460](https://github.com/Codeception/Codeception/issues/3460). Fixes [#3424](https://github.com/Codeception/Codeception/issues/3424). By **[Naktibalda](https://github.com/Naktibalda)**.
39
+
10
40
#### 2.2.4
11
41
12
42
* Improved using complex params, nested params can be set using dot (`.`). See [#3339](https://github.com/Codeception/Codeception/issues/3339)
Copy file name to clipboardExpand all lines: docs/02-GettingStarted.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,15 +259,15 @@ php codecept run
259
259
260
260
{% endhighlight %}
261
261
262
-
With the first argument you can run tests from one suite.
262
+
With the first argument you can run all tests from one suite.
263
263
264
264
{% highlight bash %}
265
265
266
266
php codecept run acceptance
267
267
268
268
{% endhighlight %}
269
269
270
-
To run exactly one test, add a second argument. Provide a local path to the test, from the suite directory.
270
+
To limit tests run to a single class, add a second argument. Provide a local path to the test class, from the suite directory.
271
271
272
272
{% highlight bash %}
273
273
@@ -283,23 +283,29 @@ php codecept run tests/acceptance/SigninCept.php
283
283
284
284
{% endhighlight %}
285
285
286
-
You can execute one test from a test class(for Cest or Test formats)
286
+
You can further filter which tests are run by appending a method name to the class, separated by a colon (for Cest or Test formats):
287
287
288
288
{% highlight bash %}
289
289
290
-
php codecept run tests/acceptance/SignInCest.php:anonymousLogin
290
+
php codecept run tests/acceptance/SignInCest.php:^anonymousLogin$
291
291
292
292
{% endhighlight %}
293
293
294
-
You can provide a directory path as well:
294
+
You can provide a directory path as well. This will execute all tests from the backend dir:
295
295
296
296
{% highlight bash %}
297
297
298
298
php codecept run tests/acceptance/backend
299
299
300
300
{% endhighlight %}
301
301
302
-
This will execute all tests from the backend dir.
302
+
Using regular expressions, you can even run many different test methods from the same directory or class. For example, this will execute all tests from the backend dir beginning with the word login:
303
+
304
+
{% highlight bash %}
305
+
306
+
php codecept run tests/acceptance/backend:^login
307
+
308
+
{% endhighlight %}
303
309
304
310
To execute a group of tests that are not stored in the same directory, you can organize them in [groups](http://codeception.com/docs/07-AdvancedUsage#Groups).
Copy file name to clipboardExpand all lines: docs/06-ReusingTestCode.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,11 +118,11 @@ However, implementing all actions for a reuse in one actor class may lead to bre
118
118
### Session Snapshot
119
119
120
120
If you need to authorize user for each test you can do so by filling Login form in the beginning of each test.
121
-
Running those steps take time, and in case of Selenium tests (which are slow by themselves) can be this time can be significant.
121
+
Running those steps takes time, and in the case of Selenium tests (which are slow by themselves) that time loss can become significant.
122
122
123
-
Codeception allows you to share cookies between tests, so once logged in user could stay authorized for other tests.
123
+
Codeception allows you to share cookies between tests, so a test user can stay logged in for other tests.
124
124
125
-
Let's improve code of our `login` method by making it executed only once for the first login and then restore the session from cookies.
125
+
Let's improve the code of our `login` method, executing the form submission only once and restoring the session from cookies for each subsequent login function call.
126
126
127
127
{% highlight php %}
128
128
@@ -148,22 +148,21 @@ Let's improve code of our `login` method by making it executed only once for the
148
148
149
149
{% endhighlight %}
150
150
151
-
Please note that session restoration only works for `WebDriver` module (modules implementing `Codeception\Lib\Interfaces\SessionSnapshot`)
151
+
Please note that session restoration only works for `WebDriver` modules (modules implementing `Codeception\Lib\Interfaces\SessionSnapshot`).
152
152
153
153
## StepObjects
154
154
155
-
If `login` method defined in Actor class may be used in 90% of your tests,
156
-
StepObjects are great if you need some common functionality for a group of tests. Let's say you are going to test an admin area of a site. Probably, you won't need the same actions from admin area while testing the frontend, so it's a good idea to move those admin-specific into their own class. We will call such class a StepObject.
155
+
StepObjects are great if you need some common functionality for a group of tests. Let's say you are going to test an admin area of a site. Probably, you won't need the same actions from admin area while testing the frontend, so it's a good idea to move these admin-specific tests into their own class. We will call such a class a StepObject.
157
156
158
-
Lets create an Admin StepObject with generator, by specifying test suite, and passing method expected names on prompt.
157
+
Lets create an Admin StepObject with the generator:
159
158
160
159
{% highlight bash %}
161
160
162
161
php codecept generate:stepobject acceptance Admin
163
162
164
163
{% endhighlight %}
165
164
166
-
You will be asked to enter action names, but it's optional. Enter one at a time, and press Enter. After specifying all needed actions, leave empty line to go on to StepObject creation.
165
+
You can supply optional action names. Enter one at a time, followed by a newline. End with an empty line to continue to StepObject creation.
167
166
168
167
{% highlight bash %}
169
168
@@ -174,7 +173,7 @@ StepObject was created in /tests/acceptance/_support/Step/Acceptance/Admin.php
174
173
175
174
{% endhighlight %}
176
175
177
-
It will generate class in `/tests/_support/Step/Acceptance/Admin.php` similar to this:
176
+
This will generate a class in `/tests/_support/Step/Acceptance/Admin.php` similar to this:
178
177
179
178
{% highlight php %}
180
179
@@ -192,7 +191,7 @@ class Admin extends \AcceptanceTester
192
191
193
192
{% endhighlight %}
194
193
195
-
As you see, this class is very simple. It extends `AcceptanceTester` class, thus, all methods and properties of `AcceptanceTester` are available for usage in it.
194
+
As you see, this class is very simple. It extends `AcceptanceTester` class, meaning it can access all methods and properties of `AcceptanceTester`.
196
195
197
196
`loginAsAdmin` method may be implemented like this:
198
197
@@ -201,7 +200,7 @@ As you see, this class is very simple. It extends `AcceptanceTester` class, thus
Copy file name to clipboardExpand all lines: docs/09-Data.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ modules:
29
29
30
30
31
31
<divclass="alert alert-notice">
32
-
Use [module params](06-ModulesAndHelpers#DynamicConfiguration WithParams) to set database credentials from environment variables or from application configuration files.
32
+
Use <ahref="http://codeception.com/docs/06-ModulesAndHelpers#Dynamic-Configuration-With-Params">module params</a> to set database credentials from environment variables or from application configuration files.
33
33
</div>
34
34
35
35
After you enable this module in your test suite, it will automatically populate the database from a dump and repopulate it on each test run. These settings can be changed through the `populate` and `cleanup` options, which may be set to `false`.
0 commit comments