Skip to content

Commit 69d4729

Browse files
committed
auto updated documentation
1 parent 3916cca commit 69d4729

9 files changed

+179
-156
lines changed

changelog.markdown

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ title: Codeception Changelog
77

88
# Changelog
99

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+
1018
#### 2.2.11
1119

1220
* **[WebDriver]** Added `_restart` method to restart browser with a new configuration.

docs/01-Introduction.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ but with tests you can cover the most important parts of your app and at least b
1515

1616
There are plenty of ways to test your application.
1717
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.
1919
To test the behavior of your application as a whole, you should write functional or acceptance tests.
2020

21-
Codeception supports these testing types.
21+
Codeception supports all three testing types.
2222
Out of the box you have tools for writing unit, functional, and acceptance tests in a unified framework.
2323

2424
Let's review the listed testing paradigms in reverse order.
@@ -27,7 +27,7 @@ Let's review the listed testing paradigms in reverse order.
2727

2828
How does your client, manager, tester, or any other non-technical person know your website is working?
2929
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,
3131
or programming language you use or why the application did not behave as expected.
3232

3333
Acceptance tests can cover standard but complex scenarios from a user's perspective.
@@ -148,9 +148,9 @@ not a pure unit test)
148148

149149
## Conclusion
150150

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.
152152
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.
154154

155155
It can be called a *BDD* (Behavior Driven Development) framework. All Codeception tests are written in a descriptive manner.
156156
Just by looking at the test body, you can clearly understand what is being tested and how it is performed.

docs/02-GettingStarted.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ title: 02-GettingStarted - Codeception - Documentation
77

88
Let's take a look at Codeception's architecture. We'll assume that you have already [installed](http://codeception.com/install) it
99
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.
1212

1313
## Actors
1414

@@ -17,7 +17,7 @@ We have a UnitTester, who executes functions and tests the code. We also have a
1717
who tests the application as a whole, with knowledge of its internals. Lastly we have an AcceptanceTester, a user who works with our application
1818
through an interface that we provide.
1919

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)**.
2121
Each module provides predefined actions for different testing purposes, and they can be combined to fit the testing environment.
2222
Codeception tries to solve 90% of possible testing issues in its modules, so you don't have to reinvent the wheel.
2323
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
6565
{% highlight php %}
6666

6767
<?php
68-
$I = new AcceptanceTester($scenario);
68+
$I = new AcceptanceTester($scenario); // actor class initialization
6969
$I->wantTo('login to website');
7070

7171

7272
{% endhighlight %}
7373

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:
7575

7676
{% highlight php %}
7777

7878
<?php
7979
$I = new AcceptanceTester($scenario);
8080
$I->am('user'); // actor's role
8181
$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
8383

8484
{% endhighlight %}
8585

@@ -94,7 +94,7 @@ Then we are sent to a user page, where we see the text `Hello, %username%`. Let'
9494
$I = new AcceptanceTester($scenario);
9595
$I->am('user');
9696
$I->wantTo('login to website');
97-
$I->lookForwardTo('access all website features');
97+
$I->lookForwardTo('access website features for logged-in users');
9898
$I->amOnPage('/login');
9999
$I->fillField('Username','davert');
100100
$I->fillField('Password','qwerty');
@@ -109,7 +109,7 @@ this test transforms into plain English text:
109109
{% highlight yaml %}
110110
I am user
111111
I wantTo login to website
112-
I lookForwardTo access all website features
112+
I lookForwardTo access website features for logged-in users
113113
I amOnPage '/login'
114114
I fillField 'Username','davert'
115115
I fillField 'Password','qwerty'
@@ -182,7 +182,7 @@ Signature: SigninCept.php
182182
Test: tests/acceptance/SigninCept.php
183183
Scenario --
184184
I am user
185-
I look forward to access all website features
185+
I look forward to access website features for logged-in users
186186
I am on page "/login"
187187
I fill field "Username" "davert"
188188
I fill field "Password" "qwerty"
@@ -212,7 +212,7 @@ There is also a global bootstrap file located in the `tests` directory. It can b
212212
Codeception supports three test formats. Beside the previously described scenario-based Cept format,
213213
Codeception can also execute [PHPUnit test files for unit testing](http://codeception.com/docs/05-UnitTests), and Cest format.
214214

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.
216216
In the example below we are testing CRUD actions within a single file but with several tests (one per operation):
217217

218218
{% highlight php %}
@@ -321,7 +321,7 @@ php codecept run tests/acceptance/backend
321321
{% endhighlight %}
322322

323323
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":
325325

326326
{% highlight bash %}
327327

0 commit comments

Comments
 (0)