Skip to content

Commit f3652be

Browse files
committed
cleaned up reporters section
1 parent 29c0db2 commit f3652be

File tree

2 files changed

+8
-33
lines changed

2 files changed

+8
-33
lines changed

guides/08-Customization.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -469,39 +469,6 @@ class MyFormat implements \Codeception\Test\Loader\LoaderInterface
469469
}
470470
```
471471

472-
## Custom Reporters
473-
474-
Alternative reporters can be implemented as extension.
475-
There are [DotReporter](https://codeception.com/extensions#DotReporter) and [SimpleReporter](https://codeception.com/extensions#SimpleReporter) extensions included.
476-
Use them to change output or use them as an example to build your own reporter. They can be easily enabled with `--ext` option
477-
478-
```bash
479-
480-
php vendor/bin/codecept run --ext DotReporter
481-
482-
```
483-
484-
![](https://cloud.githubusercontent.com/assets/220264/26132800/4d23f336-3aab-11e7-81ba-2896a4c623d2.png)
485-
486-
If you want to use it as default reporter enable it in `codeception.yml`.
487-
488-
But what if you need to change the output format of the XML or JSON results triggered with the `--xml` or `--json` options?
489-
Codeception uses PHPUnit printers and overrides them. If you need to customize one of the standard reporters you can override them too.
490-
If you are thinking on implementing your own reporter you should add a `reporters` section to `codeception.yml`
491-
and override one of the standard printer classes with one of your own:
492-
493-
```yaml
494-
reporters:
495-
xml: Codeception\PHPUnit\Log\JUnit
496-
html: Codeception\PHPUnit\ResultPrinter\HTML
497-
report: Codeception\PHPUnit\ResultPrinter\Report
498-
499-
```
500-
501-
All PHPUnit printers implement the
502-
[PHPUnit_Framework_TestListener](https://phpunit.de/manual/current/en/extending-phpunit.html#extending-phpunit.PHPUnit_Framework_TestListener)
503-
interface. It is recommended to read the code of the original reporter before overriding it.
504-
505472
## Installation Templates
506473

507474
Codeception setup can be customized for the needs of your application.

guides/11-Reporting.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,13 @@ php vendor/bin/codecept run --xml
125125
Custom reporter can be built as an [Extension](https://codeception.com/docs/08-Customization#Extension). Extension can listen to all test events and log data from them.
126126
Look into the basic reporting extensions like [DotReporter](https://codeception.com/extensions#DotReporter) or [Logger](https://codeception.com/extensions#Logger) to learn how to build your own.
127127

128+
Use them to change output or use them as an example to build your own reporter. They can be easily enabled with `--ext` option
128129

130+
```bash
131+
php vendor/bin/codecept run --ext DotReporter
132+
```
133+
134+
![](https://cloud.githubusercontent.com/assets/220264/26132800/4d23f336-3aab-11e7-81ba-2896a4c623d2.png)
135+
136+
If you want to use it as default reporter enable extension in `codeception.yml`.
129137

0 commit comments

Comments
 (0)