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
+8
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,14 @@ title: Codeception Changelog
7
7
8
8
# Changelog
9
9
10
+
#### 2.2.12
11
+
12
+
* Don't skip other tests after a failed test [#4226](https://github.com/Codeception/Codeception/issues/4226) by **[Naktibalda](https://github.com/Naktibalda)**
13
+
***[REST]**`seeResponseContainsJson` doesn't crash when json response is not an array by **[Naktibalda](https://github.com/Naktibalda)**
14
+
***[PhpBrowser]** Fixed redirecting to schemaless url by **[Naktibalda](https://github.com/Naktibalda)**[#4218](https://github.com/Codeception/Codeception/issues/4218)
15
+
***[Doctrine2]** Added `grabEntityFromRepository`, `grabEntitiesFromRepository` methods by **[maximelebastard](https://github.com/maximelebastard)**
16
+
***[REST]** Don't fail dontSee*JsonPath assertions when response is scalar value. Closes [#4237](https://github.com/Codeception/Codeception/issues/4237) by **[Naktibalda](https://github.com/Naktibalda)**
17
+
10
18
#### 2.2.11
11
19
12
20
***[WebDriver]** Added `_restart` method to restart browser with a new configuration.
Copy file name to clipboardExpand all lines: docs/01-Introduction.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,10 @@ but with tests you can cover the most important parts of your app and at least b
15
15
16
16
There are plenty of ways to test your application.
17
17
The most popular paradigm is [Unit Testing](http://en.wikipedia.org/wiki/Unit_testing).
18
-
For web applications, testing just the controller and / or the model doesn't prove that your application is working.
18
+
For web applications, testing just the controller and/or the model doesn't prove that your application is working.
19
19
To test the behavior of your application as a whole, you should write functional or acceptance tests.
20
20
21
-
Codeception supports these testing types.
21
+
Codeception supports all three testing types.
22
22
Out of the box you have tools for writing unit, functional, and acceptance tests in a unified framework.
23
23
24
24
Let's review the listed testing paradigms in reverse order.
@@ -27,7 +27,7 @@ Let's review the listed testing paradigms in reverse order.
27
27
28
28
How does your client, manager, tester, or any other non-technical person know your website is working?
29
29
By opening the browser, accessing a site, clicking on links, filling in the forms,
30
-
and actually seeing the content on a web page. They has no idea of the framework, database, web-server,
30
+
and actually seeing the content on a web page. They have no idea of the framework, database, web-server,
31
31
or programming language you use or why the application did not behave as expected.
32
32
33
33
Acceptance tests can cover standard but complex scenarios from a user's perspective.
@@ -148,9 +148,9 @@ not a pure unit test)
148
148
149
149
## Conclusion
150
150
151
-
Despite the wide popularity of *TDD* (Test Driven Development), some PHP developers never write automated tests for their applications mostly because they think it's hard, slow or boring..
151
+
Despite the wide popularity of *TDD* (Test Driven Development), some PHP developers never write automated tests for their applications mostly because they think it's hard, slow or boring.
152
152
The Codeception framework was developed to actually make testing fun.
153
-
It allows writing unit, functional, integration, and acceptance tests, in a single, coherent style.
153
+
It allows writing unit, functional, integration, and acceptance tests in a single, coherent style.
154
154
155
155
It can be called a *BDD* (Behavior Driven Development) framework. All Codeception tests are written in a descriptive manner.
156
156
Just by looking at the test body, you can clearly understand what is being tested and how it is performed.
Let's take a look at Codeception's architecture. We'll assume that you have already [installed](http://codeception.com/install) it
9
9
and bootstrapped your first test suites. Codeception has generated three of them: unit, functional, and acceptance.
10
-
They are well described in the previous chapter. Inside your __/tests__ folder you will have three config files and three directories
11
-
with names corresponding to these suites. Suites are independent groups of tests with a common purpose.
10
+
They are well described in the [previous chapter](http://codeception.com/docs/01-Introduction). Inside your __/tests__ folder you will have three`.yml` config files and three directories
11
+
with names corresponding to these suites: `unit`, `functional`, `acceptance`. Suites are independent groups of tests with a common purpose.
12
12
13
13
## Actors
14
14
@@ -17,7 +17,7 @@ We have a UnitTester, who executes functions and tests the code. We also have a
17
17
who tests the application as a whole, with knowledge of its internals. Lastly we have an AcceptanceTester, a user who works with our application
18
18
through an interface that we provide.
19
19
20
-
Actor classes are not written but generated from suite configuration. **Methods of actor classes are generally taken from Codeception Modules**.
20
+
Actor classes are not written but generated from suite configuration. **Methods of actor classes are generally taken from [Codeception Modules](http://codeception.com/docs/06-ModulesAndHelpers)**.
21
21
Each module provides predefined actions for different testing purposes, and they can be combined to fit the testing environment.
22
22
Codeception tries to solve 90% of possible testing issues in its modules, so you don't have to reinvent the wheel.
23
23
We think that you can spend more time on writing tests and less on writing support code to make those tests run.
@@ -65,21 +65,21 @@ and choosing a proper action from the auto-completion list. Let's log in to our
65
65
{% highlight php %}
66
66
67
67
<?php
68
-
$I = new AcceptanceTester($scenario);
68
+
$I = new AcceptanceTester($scenario); // actor class initialization
69
69
$I->wantTo('login to website');
70
70
71
71
72
72
{% endhighlight %}
73
73
74
-
The `wantTo` section describes your scenario in brief. There are additional comment methods that are useful to describe context of a scenario:
74
+
The `wantTo` section describes your scenario in brief. There are additional comment methods that are useful to describe the context of a scenario:
75
75
76
76
{% highlight php %}
77
77
78
78
<?php
79
79
$I = new AcceptanceTester($scenario);
80
80
$I->am('user'); // actor's role
81
81
$I->wantTo('login to website'); // feature to test
82
-
$I->lookForwardTo('access all website features'); // result to achieve
82
+
$I->lookForwardTo('access website features for logged-in users'); // result to achieve
83
83
84
84
{% endhighlight %}
85
85
@@ -94,7 +94,7 @@ Then we are sent to a user page, where we see the text `Hello, %username%`. Let'
94
94
$I = new AcceptanceTester($scenario);
95
95
$I->am('user');
96
96
$I->wantTo('login to website');
97
-
$I->lookForwardTo('access all website features');
97
+
$I->lookForwardTo('access website features for logged-in users');
98
98
$I->amOnPage('/login');
99
99
$I->fillField('Username','davert');
100
100
$I->fillField('Password','qwerty');
@@ -109,7 +109,7 @@ this test transforms into plain English text:
109
109
{% highlight yaml %}
110
110
I am user
111
111
I wantTo login to website
112
-
I lookForwardTo access all website features
112
+
I lookForwardTo access website features for logged-in users
113
113
I amOnPage '/login'
114
114
I fillField 'Username','davert'
115
115
I fillField 'Password','qwerty'
@@ -182,7 +182,7 @@ Signature: SigninCept.php
182
182
Test: tests/acceptance/SigninCept.php
183
183
Scenario --
184
184
I am user
185
-
I look forward to access all website features
185
+
I look forward to access website features for logged-in users
186
186
I am on page "/login"
187
187
I fill field "Username" "davert"
188
188
I fill field "Password" "qwerty"
@@ -212,7 +212,7 @@ There is also a global bootstrap file located in the `tests` directory. It can b
212
212
Codeception supports three test formats. Beside the previously described scenario-based Cept format,
213
213
Codeception can also execute [PHPUnit test files for unit testing](http://codeception.com/docs/05-UnitTests), and Cest format.
214
214
215
-
Cest combines scenario-driven test approach with OOP design. In case you want to group a few testing scenarios into one you should consider using Cest format.
215
+
**Cest** combines scenario-driven test approach with OOP design. In case you want to group a few testing scenarios into one, you should consider using Cest format.
216
216
In the example below we are testing CRUD actions within a single file but with several tests (one per operation):
217
217
218
218
{% highlight php %}
@@ -321,7 +321,7 @@ php codecept run tests/acceptance/backend
321
321
{% endhighlight %}
322
322
323
323
Using regular expressions, you can even run many different test methods from the same directory or class.
324
-
For example, this will execute all acceptance tests from the `backend` dir beginning with the word login:
324
+
For example, this will execute all acceptance tests from the `backend` dir beginning with the word "login":
0 commit comments