DotReporter
extends Extension
in package
DotReporter provides less verbose output for test execution.
Like PHPUnit printer it prints dots "." for successful testes and "F" for failures.
..........
..........
..........
..........
..........
..........
..........
..........
Time: 2.07 seconds, Memory: 20.00MB
OK (80 tests, 124 assertions)
Enable this reporter with --ext option
codecept run --ext DotReporter
Failures and Errors are printed by a standard Codeception reporter. Use this extension as an example for building custom reporters.
Table of Contents
Properties
- $events : mixed
- $config : mixed
- $currentPos : mixed
- $errors : mixed
- $failures : mixed
- $globalConfig : mixed
- $options : mixed
- $output : mixed
- $standardReporter : Console
- $width : mixed
- $modules : mixed
Methods
- __construct() : mixed
- _initialize() : mixed
- You can do all preparations here. No need to override constructor.
- _reconfigure() : mixed
- Pass config variables that should be injected into global config.
- beforeSuite() : mixed
- error() : mixed
- fail() : mixed
- getCurrentModuleNames() : mixed
- getDataDir() : mixed
- getGlobalConfig() : mixed
- getLogDir() : mixed
- getModule() : mixed
- getRootDir() : mixed
- getSubscribedEvents() : array<string, string|array{0: string, 1: int}|array<int, array{0: string, 1?: int}>>
- Returns an array of event names this subscriber wants to listen to.
- getTestsDir() : mixed
- hasModule() : mixed
- printFailed() : mixed
- receiveModuleContainer() : mixed
- skipped() : mixed
- success() : mixed
- printChar() : mixed
- write() : mixed
- writeln() : mixed
Properties
$events
public
static mixed
$events
= [\Codeception\Events::SUITE_BEFORE => 'beforeSuite', \Codeception\Events::TEST_SUCCESS => 'success', \Codeception\Events::TEST_FAIL => 'fail', \Codeception\Events::TEST_ERROR => 'error', \Codeception\Events::TEST_SKIPPED => 'skipped', \Codeception\Events::TEST_FAIL_PRINT => 'printFailed']
$config
protected
mixed
$config
= []
$currentPos
protected
mixed
$currentPos
= 0
$errors
protected
mixed
$errors
= []
$failures
protected
mixed
$failures
= []
$globalConfig
protected
mixed
$globalConfig
$options
protected
mixed
$options
$output
protected
mixed
$output
$standardReporter
protected
Console
$standardReporter
$width
protected
mixed
$width
= 10
$modules
private
mixed
$modules
= []
Methods
__construct()
public
__construct(mixed $config, mixed $options) : mixed
Parameters
- $config : mixed
- $options : mixed
_initialize()
You can do all preparations here. No need to override constructor.
public
_initialize() : mixed
Also you can skip calling _reconfigure
if you don't need to.
_reconfigure()
Pass config variables that should be injected into global config.
public
_reconfigure([array<string|int, mixed> $config = [] ]) : mixed
Parameters
- $config : array<string|int, mixed> = []
beforeSuite()
public
beforeSuite() : mixed
error()
public
error(FailEvent $e) : mixed
Parameters
- $e : FailEvent
fail()
public
fail(FailEvent $e) : mixed
Parameters
- $e : FailEvent
getCurrentModuleNames()
public
getCurrentModuleNames() : mixed
getDataDir()
public
getDataDir() : mixed
getGlobalConfig()
public
getGlobalConfig() : mixed
getLogDir()
public
getLogDir() : mixed
getModule()
public
getModule(mixed $name) : mixed
Parameters
- $name : mixed
getRootDir()
public
getRootDir() : mixed
getSubscribedEvents()
Returns an array of event names this subscriber wants to listen to.
public
static getSubscribedEvents() : array<string, string|array{0: string, 1: int}|array<int, array{0: string, 1?: int}>>
The array keys are event names and the value can be:
- The method name to call (priority defaults to 0)
- An array composed of the method name to call and the priority
- An array of arrays composed of the method names to call and respective priorities, or 0 if unset
For instance:
- ['eventName' => 'methodName']
- ['eventName' => ['methodName', $priority]]
- ['eventName' => [['methodName1', $priority], ['methodName2']]]
The code must not depend on runtime state as it will only be called at compile time. All logic depending on runtime state must be put into the individual methods handling the events.
Return values
array<string, string|array{0: string, 1: int}|array<int, array{0: string, 1?: int}>>getTestsDir()
public
getTestsDir() : mixed
hasModule()
public
hasModule(mixed $name) : mixed
Parameters
- $name : mixed
printFailed()
public
printFailed(FailEvent $event) : mixed
Parameters
- $event : FailEvent
receiveModuleContainer()
public
receiveModuleContainer(SuiteEvent $e) : mixed
Parameters
- $e : SuiteEvent
skipped()
public
skipped() : mixed
success()
public
success() : mixed
printChar()
protected
printChar(mixed $char) : mixed
Parameters
- $char : mixed
write()
protected
write(mixed $message) : mixed
Parameters
- $message : mixed
writeln()
protected
writeln(mixed $message) : mixed
Parameters
- $message : mixed