Skip to content

Commit 15e039b

Browse files
github-actions[bot]github-actions[bot]
github-actions[bot]
authored and
github-actions[bot]
committed
updated
1 parent 5a2efd5 commit 15e039b

File tree

1 file changed

+37
-23
lines changed

1 file changed

+37
-23
lines changed

_includes/extensions.md

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
## DotReporter
44

5-
[See Source](https://github.com/Codeception/Codeception/blob/main/ext/DotReporter.php)
5+
[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/DotReporter.php)
66

77
DotReporter provides less verbose output for test execution.
8-
Like PHPUnit printer it prints dots "." for successful tests and "F" for failures.
8+
Like PHPUnit printer it prints dots "." for successful testes and "F" for failures.
99

1010
![](https://cloud.githubusercontent.com/assets/220264/26132800/4d23f336-3aab-11e7-81ba-2896a4c623d2.png)
1111

@@ -34,9 +34,11 @@ codecept run --ext DotReporter
3434
Failures and Errors are printed by a standard Codeception reporter.
3535
Use this extension as an example for building custom reporters.
3636

37+
38+
3739
## Logger
3840

39-
[See Source](https://github.com/Codeception/Codeception/blob/main/ext/Logger.php)
41+
[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/Logger.php)
4042

4143
Log suites/tests/steps using Monolog library.
4244
Monolog should be installed additionally by Composer.
@@ -60,18 +62,20 @@ extensions:
6062
* `max_files` (default: 3) - how many log files to keep
6163

6264

65+
66+
6367
## Recorder
6468

65-
[See Source](https://github.com/Codeception/Codeception/blob/main/ext/Recorder.php)
69+
[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/Recorder.php)
6670

67-
Saves a screenshot of each step in acceptance tests and shows them as a slideshow on one HTML page (here's an [example](https://codeception.com/images/recorder.gif)).
68-
Works only for suites with WebDriver module enabled.
71+
Saves a screenshot of each step in acceptance tests and shows them as a slideshow on one HTML page (here's an [example](https://codeception.com/images/recorder.gif))
72+
Activated only for suites with WebDriver module enabled.
6973

7074
The screenshots are saved to `tests/_output/record_*` directories, open `index.html` to see them as a slideshow.
7175

7276
#### Installation
7377

74-
Add this to the list of enabled extensions in `codeception.yml` or `Acceptance.suite.yml`:
78+
Add this to the list of enabled extensions in `codeception.yml` or `acceptance.suite.yml`:
7579

7680
``` yaml
7781
extensions:
@@ -102,23 +106,26 @@ extensions:
102106
```
103107
#### Skipping recording of steps with annotations
104108

105-
It is also possible to skip recording of steps for specified tests by using the `@skipRecording` annotation.
109+
It is also possible to skip recording of steps for specified tests by using the @skipRecording annotation.
106110

107111
```php
108112
/**
109113
* @skipRecording login
110114
* @skipRecording amOnUrl
111-
*/
115+
*\/
112116
public function testLogin(AcceptanceTester $I)
113117
{
114118
$I->login();
115119
$I->amOnUrl('https://codeception.com');
116120
}
117121
```
118122

123+
124+
125+
119126
## RunBefore
120127

121-
[See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunBefore.php)
128+
[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/RunBefore.php)
122129

123130
Extension for execution of some processes before running tests.
124131

@@ -143,13 +150,15 @@ extensions:
143150
- dependent_process_2_2
144151
```
145152

146-
HINT: You can use different configurations per environment.
153+
HINT: you can use different configurations per environment.
154+
155+
147156

148157
## RunFailed
149158

150-
[See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunFailed.php)
159+
[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/RunFailed.php)
151160

152-
Saves failed tests into `tests/_output/failed` in order to rerun failed tests.
161+
Saves failed tests into tests/_output/failed in order to rerun failed tests.
153162

154163
To rerun failed tests just run the `failed` group:
155164

@@ -161,26 +170,30 @@ To change failed group name add:
161170
```
162171
--override "extensions: config: Codeception\Extension\RunFailed: fail-group: another_group1"
163172
```
164-
Remember: If you run tests and they generated custom-named fail group, to run this group, you should add override too.
173+
Remember: if you run tests and they generated custom-named fail group, to run this group, you should add override too
165174

166-
**This extension is enabled by default**.
175+
Starting from Codeception 2.1 **this extension is enabled by default**.
167176

168177
``` yaml
169178
extensions:
170179
enabled: [Codeception\Extension\RunFailed]
171180
```
172181

182+
On each execution failed tests are logged and saved into `tests/_output/failed` file.
183+
184+
185+
173186
## RunProcess
174187

175-
[See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunProcess.php)
188+
[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/RunProcess.php)
176189

177190
Extension to start and stop processes per suite.
178-
Can be used to start/stop chromedriver, MailCatcher, etc.
191+
Can be used to start/stop selenium server, chromedriver, mailcatcher, etc.
179192

180-
Can be enabled in suite config:
193+
Can be configured in suite config:
181194

182195
```yaml
183-
# Acceptance.suite.yml
196+
# acceptance.suite.yml
184197
extensions:
185198
enabled:
186199
- Codeception\Extension\RunProcess:
@@ -190,7 +203,7 @@ extensions:
190203
Multiple parameters can be passed as array:
191204

192205
```yaml
193-
# Acceptance.suite.yml
206+
# acceptance.suite.yml
194207
195208
extensions:
196209
enabled:
@@ -201,7 +214,8 @@ extensions:
201214

202215
In the end of a suite all launched processes will be stopped.
203216

204-
To wait for the process to be launched, use the `sleep` option. In this case the configuration needs to be specified as object:
217+
To wait for the process to be launched use `sleep` option.
218+
In this case you need configuration to be specified as object:
205219

206220
```yaml
207221
extensions:
@@ -212,13 +226,13 @@ extensions:
212226
sleep: 5 # wait 5 seconds for processes to boot
213227
```
214228

215-
HINT: You can use different configurations per environment.
229+
HINT: you can use different configurations per environment.
216230

217231

218232

219233
## SimpleReporter
220234

221-
[See Source](https://github.com/Codeception/Codeception/blob/main/ext/SimpleReporter.php)
235+
[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/SimpleReporter.php)
222236

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

0 commit comments

Comments
 (0)