Skip to content

Commit d08bef5

Browse files
committed
auto updated documentation
1 parent caffe2a commit d08bef5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+518
-395
lines changed

_includes/extensions.md

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
# Official Extensions
22

3-
## Codeception\Extension\Logger
3+
## DotReporter
4+
5+
[See Source](https://github.com/Codeception/Codeception/blob/2.3/ext/DotReporter.php)
6+
7+
DotReporter provides less verbose output for test execution.
8+
Like PHPUnit printer it prints dots "." for successful testes and "F" for failures.
9+
10+
![](https://cloud.githubusercontent.com/assets/220264/26132800/4d23f336-3aab-11e7-81ba-2896a4c623d2.png)
11+
12+
```bash
13+
..........
14+
..........
15+
..........
16+
..........
17+
..........
18+
..........
19+
..........
20+
..........
21+
22+
Time: 2.07 seconds, Memory: 20.00MB
23+
24+
OK (80 tests, 124 assertions)
25+
```
26+
27+
28+
Enable this reporter with `--ext option`
29+
30+
```
31+
codecept run --ext DotReporter
32+
```
33+
34+
Failures and Errors are printed by a standard Codeception reporter.
35+
Use this extension as an example for building custom reporters.
36+
37+
38+
39+
## Logger
40+
41+
[See Source](https://github.com/Codeception/Codeception/blob/2.3/ext/Logger.php)
442

543
Log suites/tests/steps using Monolog library.
644
Monolog should be installed additionally by Composer.
@@ -25,19 +63,20 @@ extensions:
2563

2664

2765

28-
## Codeception\Extension\Recorder
66+
## Recorder
67+
68+
[See Source](https://github.com/Codeception/Codeception/blob/2.3/ext/Recorder.php)
2969

30-
Saves screenshots of each step in acceptance tests and shows them as a slideshow.
70+
Saves a screenshot of each step in acceptance tests and shows them as a slideshow on one HTML page.
3171
Activated only for suites with WebDriver module enabled.
3272

3373
![recorder](http://codeception.com/images/recorder.gif)
3474

35-
Slideshows saves are saved into `tests/_output/record_*` directories.
36-
Open `index.html` to see the slideshow.
75+
The screenshots are saved to `tests/_output/record_*` directories, open `index.html` to see them as a slideshow.
3776

3877
#### Installation
3978

40-
Add to list of enabled extensions
79+
Add this to the list of enabled extensions in `codeception.yml` or `acceptance.suite.yml`:
4180

4281
``` yaml
4382
extensions:
@@ -47,8 +86,8 @@ extensions:
4786

4887
#### Configuration
4988

50-
* `delete_successful` (default: true) - delete records for successfully passed tests (log only failed and errored)
51-
* `module` (default: WebDriver) - which module for screenshots to use. Set `AngularJS` if you want to use it with AngularJS module. Generally, module should implement `Codeception\Lib\Interfaces\ScreenshotSaver` interface.
89+
* `delete_successful` (default: true) - delete screenshots for successfully passed tests (i.e. log only failed and errored tests).
90+
* `module` (default: WebDriver) - which module for screenshots to use. Set `AngularJS` if you want to use it with AngularJS module. Generally, the module should implement `Codeception\Lib\Interfaces\ScreenshotSaver` interface.
5291

5392

5493
#### Examples:
@@ -58,13 +97,15 @@ extensions:
5897
enabled:
5998
Codeception\Extension\Recorder:
6099
module: AngularJS # enable for Angular
61-
delete_successful: false # show successful reports
100+
delete_successful: false # keep screenshots of successful tests
62101
```
63102

64103

65104

66105

67-
## Codeception\Extension\RunFailed
106+
## RunFailed
107+
108+
[See Source](https://github.com/Codeception/Codeception/blob/2.3/ext/RunFailed.php)
68109

69110
Saves failed tests into tests/log/failed in order to rerun failed tests.
70111

@@ -85,7 +126,9 @@ On each execution failed tests are logged and saved into `tests/_output/failed`
85126

86127

87128

88-
## Codeception\Extension\SimpleOutput
129+
## SimpleReporter
130+
131+
[See Source](https://github.com/Codeception/Codeception/blob/2.3/ext/SimpleReporter.php)
89132

90133
This extension demonstrates how you can implement console output of your own.
91134
Recommended to be used for development purposes only.

changelog.markdown

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,26 @@ title: Codeception Changelog
77

88
# Changelog
99

10-
#### 2.2.12
10+
## 2.3.0
11+
12+
* **PHPUnit 6.x** support [#4142](https://github.com/Codeception/Codeception/issues/4142) by **[MontealegreLuis](https://github.com/MontealegreLuis)**. Class aliases are used, so PHPUnit 4.x and 5.x (for PHP <7) are still supported as well.
13+
* Suite customization. [Announcement](/05-22-2017/codeception-2-3.html#configuration-improvements)
14+
* Installation Templates. [Announcement](/05-22-2017/codeception-2-3.html#installation-templates)
15+
* DotReporter introduced. Use it with
16+
```
17+
codecept run --ext DotReporter
18+
```
19+
* `--ext` parameter added to load extensions dynamically.
20+
* Db Populator [Announcement](/05-22-2017/codeception-2-3.html#db-populator) by **[brutuscat](https://github.com/brutuscat)**
21+
* **[Db]** New configuration defaults, cleanups are disabled: `cleanup: false`, `populate: false`. Enable them to load dumps between tests.
22+
* **[Redis]** New configuration defaults, cleanups are disabled: `cleanupBefore: 'never'` by **[hchonan](https://github.com/hchonan)**
23+
* Command `generate:phpunit` removed.
24+
* Bootstrap `_bootstrap.php` files are disabled by default.#### 2.2.12
1125

1226
* Don't skip other tests after a failed test [#4226](https://github.com/Codeception/Codeception/issues/4226) by **[Naktibalda](https://github.com/Naktibalda)**
1327
* **[REST]** `seeResponseContainsJson` doesn't crash when json response is not an array by **[Naktibalda](https://github.com/Naktibalda)**
1428
* **[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)**
29+
* **[Doctrine2]** Added `grabEntityFromRepository`, `grabEntitiesFromRepository` methods by **[maximelebastard](https://github.com/maximelebastard)**
1730

1831
#### 2.2.11
1932

docs/02-GettingStarted.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ By default, AcceptanceTester relies on PhpBrowser module, which is set in the `t
2525

2626
{% highlight yaml %}
2727

28-
class_name: AcceptanceTester
28+
actor: AcceptanceTester
2929
modules:
3030
enabled:
3131
- PhpBrowser:
@@ -133,7 +133,7 @@ Let's open the `tests/acceptance.suite.yml` file and replace the URL with the UR
133133

134134
{% highlight yaml %}
135135

136-
class_name: AcceptanceTester
136+
actor: AcceptanceTester
137137
modules:
138138
enabled:
139139
- PhpBrowser:
@@ -202,11 +202,6 @@ by emulating the user's actions, you can test any of your websites.
202202

203203
Give it a try!
204204

205-
## Bootstrap
206-
207-
Each suite has its own bootstrap file. It's located in the suite directory and is named `_bootstrap.php`. It will be executed before the test suite.
208-
There is also a global bootstrap file located in the `tests` directory. It can be used to include additional files.
209-
210205
## Cept, Cest and Test Formats
211206

212207
Codeception supports three test formats. Beside the previously described scenario-based Cept format,
@@ -363,7 +358,6 @@ There are plenty of useful Codeception commands:
363358
* `generate:cept` *suite* *filename* - Generates a sample Cept scenario
364359
* `generate:cest` *suite* *filename* - Generates a sample Cest test
365360
* `generate:test` *suite* *filename* - Generates a sample PHPUnit Test with Codeception hooks
366-
* `generate:phpunit` *suite* *filename* - Generates a classic PHPUnit Test
367361
* `generate:feature` *suite* *filename* - Generates Gherkin feature file
368362
* `generate:suite` *suite* *actor* - Generates a new suite with the given Actor class name
369363
* `generate:scenarios` *suite* - Generates text files containing scenarios from tests

docs/03-AcceptanceTests.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ We need to specify the `url` parameter in the acceptance suite config (`tests/ac
5353

5454
{% highlight yaml %}
5555

56-
class_name: AcceptanceTester
56+
actor: AcceptanceTester
5757
modules:
5858
enabled:
5959
- PhpBrowser:
@@ -370,7 +370,7 @@ Modify your `acceptance.suite.yml` file:
370370

371371
{% highlight yaml %}
372372

373-
class_name: AcceptanceTester
373+
actor: AcceptanceTester
374374
modules:
375375
enabled:
376376
- WebDriver:
@@ -380,8 +380,8 @@ modules:
380380

381381
{% endhighlight %}
382382

383-
In order to run browser tests you will need Selenium Server or PhantomJS.
384-
WebDriver module contains a manual on [how to start them](http://codeception.com/docs/modules/WebDriver#Local-Testing).
383+
In order to run browser tests you will need Selenium Server or PhantomJS.
384+
See [WebDriver Module](http://codeception.com/docs/modules/WebDriver) for details.
385385

386386
Please note that actions executed in a browser will behave differently. For instance, `seeElement` won't just check that the element exists on a page,
387387
but it will also check that element is actually visible to the user:
@@ -394,7 +394,7 @@ $I->seeElement('#modal');
394394
{% endhighlight %}
395395

396396
While WebDriver duplicates the functionality of PhpBrowser, it has its limitations: It can't check headers, since browsers don't provide APIs for that.
397-
WebDriver also adds browser-specific functionality which will be listed in next sections.
397+
WebDriver also adds browser-specific functionality:
398398

399399
#### Wait
400400

@@ -561,7 +561,7 @@ with the help of the [Recorder extension](http://codeception.com/addons#Codecept
561561
Writing acceptance tests with Codeception and PhpBrowser is a good start.
562562
You can easily test your Joomla, Drupal, WordPress sites, as well as those made with frameworks.
563563
Writing acceptance tests is like describing a tester's actions in PHP. They are quite readable and very easy to write.
564-
Don't forget to repopulate the database on each test run.
564+
If you need to access the database, you can use the [Db Module](http://codeception.com/docs/modules/Db).
565565

566566

567567

docs/04-FunctionalTests.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Example of `functional.suite.yml`
6969

7070
{% highlight yaml %}
7171

72-
class_name: FunctionalTester
72+
actor: FunctionalTester
7373
modules:
7474
enabled:
7575
- Symfony
@@ -92,7 +92,7 @@ The [Laravel5](http://codeception.com/docs/modules/Laravel5) module is included
9292

9393
{% highlight yaml %}
9494

95-
class_name: FunctionalTester
95+
actor: FunctionalTester
9696
modules:
9797
enabled:
9898
- Laravel5
@@ -114,7 +114,7 @@ To use it with Yii include `Yii1` module into config:
114114

115115
{% highlight yaml %}
116116

117-
class_name: FunctionalTester
117+
actor: FunctionalTester
118118
modules:
119119
enabled:
120120
- Yii1
@@ -131,7 +131,7 @@ Use [the ZF2 module](http://codeception.com/docs/modules/ZF2) to run functional
131131

132132
{% highlight yaml %}
133133

134-
class_name: FunctionalTester
134+
actor: FunctionalTester
135135
modules:
136136
enabled:
137137
- ZF2
@@ -149,7 +149,7 @@ Example of `functional.suite.yml`
149149

150150
{% highlight yaml %}
151151

152-
class_name: FunctionalTester
152+
actor: FunctionalTester
153153
modules:
154154
enabled:
155155
- ZF1
@@ -167,7 +167,7 @@ and provide the path to this bootstrap file:
167167

168168
{% highlight yaml %}
169169

170-
class_name: FunctionalTester
170+
actor: FunctionalTester
171171
modules:
172172
enabled:
173173
- Phalcon:
@@ -270,7 +270,7 @@ The error reporting level can be set in the suite configuration file:
270270

271271
{% highlight yaml %}
272272

273-
class_name: FunctionalTester
273+
actor: FunctionalTester
274274
modules:
275275
enabled:
276276
- Yii1

0 commit comments

Comments
 (0)