diff --git a/_includes/extensions.md b/_includes/extensions.md index 742c0b9a2..eba482ccf 100644 --- a/_includes/extensions.md +++ b/_includes/extensions.md @@ -2,10 +2,10 @@ ## DotReporter -[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/DotReporter.php) +[See Source](https://github.com/Codeception/Codeception/blob/main/ext/DotReporter.php) DotReporter provides less verbose output for test execution. -Like PHPUnit printer it prints dots "." for successful testes and "F" for failures. +Like PHPUnit printer it prints dots "." for successful tests and "F" for failures.  @@ -34,11 +34,9 @@ codecept run --ext DotReporter Failures and Errors are printed by a standard Codeception reporter. Use this extension as an example for building custom reporters. - - ## Logger -[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/Logger.php) +[See Source](https://github.com/Codeception/Codeception/blob/main/ext/Logger.php) Log suites/tests/steps using Monolog library. Monolog should be installed additionally by Composer. @@ -62,20 +60,18 @@ extensions: * `max_files` (default: 3) - how many log files to keep - - ## Recorder -[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/Recorder.php) +[See Source](https://github.com/Codeception/Codeception/blob/main/ext/Recorder.php) -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)) -Activated only for suites with WebDriver module enabled. +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)). +Works only for suites with WebDriver module enabled. The screenshots are saved to `tests/_output/record_*` directories, open `index.html` to see them as a slideshow. #### Installation -Add this to the list of enabled extensions in `codeception.yml` or `acceptance.suite.yml`: +Add this to the list of enabled extensions in `codeception.yml` or `Acceptance.suite.yml`: ``` yaml extensions: @@ -106,13 +102,13 @@ extensions: ``` #### Skipping recording of steps with annotations -It is also possible to skip recording of steps for specified tests by using the @skipRecording annotation. +It is also possible to skip recording of steps for specified tests by using the `@skipRecording` annotation. ```php /** * @skipRecording login * @skipRecording amOnUrl -*\/ +*/ public function testLogin(AcceptanceTester $I) { $I->login(); @@ -120,12 +116,9 @@ public function testLogin(AcceptanceTester $I) } ``` - - - ## RunBefore -[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/RunBefore.php) +[See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunBefore.php) Extension for execution of some processes before running tests. @@ -150,15 +143,13 @@ extensions: - dependent_process_2_2 ``` -HINT: you can use different configurations per environment. - - +HINT: You can use different configurations per environment. ## RunFailed -[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/RunFailed.php) +[See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunFailed.php) -Saves failed tests into tests/_output/failed in order to rerun failed tests. +Saves failed tests into `tests/_output/failed` in order to rerun failed tests. To rerun failed tests just run the `failed` group: @@ -170,30 +161,26 @@ To change failed group name add: ``` --override "extensions: config: Codeception\Extension\RunFailed: fail-group: another_group1" ``` -Remember: if you run tests and they generated custom-named fail group, to run this group, you should add override too +Remember: If you run tests and they generated custom-named fail group, to run this group, you should add override too. -Starting from Codeception 2.1 **this extension is enabled by default**. +**This extension is enabled by default**. ``` yaml extensions: enabled: [Codeception\Extension\RunFailed] ``` -On each execution failed tests are logged and saved into `tests/_output/failed` file. - - - ## RunProcess -[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/RunProcess.php) +[See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunProcess.php) Extension to start and stop processes per suite. -Can be used to start/stop selenium server, chromedriver, mailcatcher, etc. +Can be used to start/stop chromedriver, MailCatcher, etc. -Can be configured in suite config: +Can be enabled in suite config: ```yaml -# acceptance.suite.yml +# Acceptance.suite.yml extensions: enabled: - Codeception\Extension\RunProcess: @@ -203,7 +190,7 @@ extensions: Multiple parameters can be passed as array: ```yaml -# acceptance.suite.yml +# Acceptance.suite.yml extensions: enabled: @@ -214,8 +201,7 @@ extensions: In the end of a suite all launched processes will be stopped. -To wait for the process to be launched use `sleep` option. -In this case you need configuration to be specified as object: +To wait for the process to be launched, use the `sleep` option. In this case the configuration needs to be specified as object: ```yaml extensions: @@ -226,13 +212,13 @@ extensions: sleep: 5 # wait 5 seconds for processes to boot ``` -HINT: you can use different configurations per environment. +HINT: You can use different configurations per environment. ## SimpleReporter -[See Source](https://github.com/Codeception/Codeception/blob/5.1/ext/SimpleReporter.php) +[See Source](https://github.com/Codeception/Codeception/blob/main/ext/SimpleReporter.php) This extension demonstrates how you can implement console output of your own. Recommended to be used for development purposes only.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: