";
- }
- file_put_contents('_includes/guides.html', implode("\n", $guidesLinks));
- }
-
public function buildDocsModules()
{
$this->taskCleanDir('docs/modules')->run();
@@ -309,7 +263,7 @@ public function buildDocsExtensions()
->prepend("# Official Extensions\n")
->processClassSignature(function (ReflectionClass $r, $text) {
$name = $r->getShortName();
- return "## $name\n\n[See Source](" . self::REPO_BLOB_URL . "/" . self::BRANCH_5x . "/ext/$name.php)";
+ return "## $name\n\n[See Source](" . self::REPO_BLOB_URL . "/" . self::BRANCH_MAIN . "/ext/$name.php)";
})
->filterMethods(function (ReflectionMethod $r) {
return false;
@@ -323,7 +277,7 @@ public function buildDocsExtensions()
protected function documentApiClass($file, $className, $all = false, $repositoryName = null)
{
if ($repositoryName === null) {
- $repositoryUrl = self::REPO_BLOB_URL . "/" . self::BRANCH_5x;
+ $repositoryUrl = self::REPO_BLOB_URL . "/" . self::BRANCH_MAIN;
} else {
$repositoryUrl = 'https://github.com/Codeception/' . $repositoryName . '/blob/master';
}
@@ -458,102 +412,34 @@ private function postProcessFile($pageName, $documentationFile)
file_put_contents($documentationFile, $contents);
}
- public function buildPhar80()
+ public function buildPhar82()
{
- $version = self::BRANCH_5x . '.' . date('Ymd');
- $releaseDir = "releases/$version";
- $this->stopOnFail();
-
- $this->taskFilesystemStack()->mkdir('build/80')->run();
- $this->setCodeceptionVersionTo('^5.0');
- $this->setPlatformVersionTo('8.0.2');
- $buildFile = 'build/80/codecept.phar';
- $this->buildPhar($buildFile);
- $this->updateVersionFile($buildFile, 'php80/codecept.version');
- $versionedFile = "$releaseDir/codecept.phar";
- $this->taskFilesystemStack()
- ->stopOnFail()
- ->mkdir($releaseDir)
- ->copy($buildFile, $versionedFile)
- ->remove('php80/codecept.phar')
- ->symlink("../$versionedFile", 'php80/codecept.phar')
- ->run();
- }
+ $ignoredPlatformReqs = array(
+ 'ext-apcu',
+ 'ext-mongodb',
+ 'ext-phalcon',
+ );
- public function buildPhar72()
- {
- $version = self::BRANCH_4x . '.' . date('Ymd');
+ $version = self::BRANCH_5x . '.' . date('Ymd');
$releaseDir = "releases/$version";
$this->stopOnFail();
-
- $this->taskFilesystemStack()->mkdir('build/72')->run();
- $this->setCodeceptionVersionTo('^4.1');
- $this->setPlatformVersionTo('7.2.0');
- $this->requireHoaConsole();
- $buildFile = 'build/72/codecept.phar';
+ $this->taskFilesystemStack()->mkdir('build/82')->run();
+ $this->setCodeceptionVersionTo('^' . self::BRANCH_5x, $ignoredPlatformReqs);
+ $this->setPlatformVersionTo('8.2.0', $ignoredPlatformReqs);
+ $buildFile = 'build/82/codecept.phar';
$this->buildPhar($buildFile);
- $this->updateVersionFile($buildFile, 'codecept.version');
+ $this->updateVersionFile($buildFile, 'php82/codecept.version');
$versionedFile = "$releaseDir/codecept.phar";
$this->taskFilesystemStack()
->stopOnFail()
->mkdir($releaseDir)
->copy($buildFile, $versionedFile)
- ->remove('codecept.phar')
- ->symlink($versionedFile, 'codecept.phar')
+ ->remove('php82/codecept.phar')
+ ->symlink("../$versionedFile", 'php82/codecept.phar')
->run();
}
- public function buildPhar56()
- {
- $version = self::BRANCH_4x . '.' . date('Ymd');
- $releaseDir = "releases/$version";
- $this->stopOnFail();
-
- $this->taskFilesystemStack()->mkdir('build/56')->run();
- $this->setCodeceptionVersionTo('^4.1');
- $this->setPlatformVersionTo('5.6.4');
- $this->requireHoaConsole();
- //filenames must be different, because Phar refuses to build second file with the same name
- $buildFile = 'build/56/codecept.phar';
- $this->buildPhar($buildFile);
- $this->updateVersionFile($buildFile, 'php56/codecept.version');
- $versionedFile = "$releaseDir/php56/codecept.phar";
- $this->taskFilesystemStack()
- ->stopOnFail()
- ->mkdir("$releaseDir/php56")
- ->copy($buildFile, $versionedFile)
- ->remove('php56/codecept.phar')
- ->symlink("../$versionedFile", 'php56/codecept.phar')
- ->run();
- }
-
- private function requireHoaConsole(): void
- {
- $this->taskComposerRequire()
- ->dependency('hoa/console')
- ->workingDir('package')
- ->run();
- }
-
- public function release()
- {
- $version = self::BRANCH_4x . '.' . date('Ymd');
- $releaseDir = "releases/$version";
- $this->updateBuildsPage();
-
- $this->taskGitStack()
- ->stopOnFail()
- ->checkout('-- package/composer.json')
- ->add('builds.markdown')
- ->add('codecept.phar')
- ->add('codecept.version')
- ->add('php56/codecept.phar')
- ->add('php56/codecept.version')
- ->add($releaseDir)
- ->run();
- }
-
- public function release80()
+ public function release82()
{
$version = self::BRANCH_5x . '.' . date('Ymd');
$releaseDir = "releases/$version";
@@ -563,23 +449,30 @@ public function release80()
->stopOnFail()
->checkout('-- package/composer.json')
->add('builds.markdown')
- ->add('php80/codecept.phar')
- ->add('php80/codecept.version')
+ ->add('php82/codecept.phar')
+ ->add('php82/codecept.version')
->add($releaseDir)
->run();
}
- private function setPlatformVersionTo($version)
+ private function setPlatformVersionTo($version, $ignoredPlatformReqs = array())
{
$this->taskComposerConfig()->workingDir('package')->set('platform.php', $version)->run();
- $this->taskComposerUpdate()->preferDist()->optimizeAutoloader()->workingDir('package')->run();
+ $composerUpdate = $this->taskComposerUpdate();
+ foreach ($ignoredPlatformReqs as $ignoredPlatformReq) {
+ $composerUpdate->option('--ignore-platform-req', $ignoredPlatformReq);
+ }
+ $composerUpdate->preferDist()->optimizeAutoloader()->workingDir('package')->run();
}
- private function setCodeceptionVersionTo($version)
+ private function setCodeceptionVersionTo($version, $ignoredPlatformReqs = array())
{
- $this->taskComposerRequire()
- ->dependency('codeception/codeception', $version)
- ->workingDir('package')
+ $composerRequire = $this->taskComposerRequire()
+ ->dependency('codeception/codeception', $version);
+ foreach ($ignoredPlatformReqs as $ignoredPlatformReq) {
+ $composerRequire->option('--ignore-platform-req', $ignoredPlatformReq);
+ }
+ $composerRequire->workingDir('package')
->run();
}
@@ -684,7 +577,7 @@ public function processChangelog()
$repo = $release['repo'] ?? 'Codeception';
$changelog .= sprintf("\n\n### %s %s: %s\n\n", $repo, $release['tag_name'], $release['name']);
- $changelog .= sprintf("Released by [ %s](%s) on %s",
+ $changelog .= sprintf('Released by [{:height="16" width="16"} %s](%s) on %s',
$release['author']['avatar_url'] . '&s=16',
$release['author']['login'],
$release['author']['html_url'],
@@ -741,8 +634,10 @@ public function updateBuildsPage()
$releaseFile->line("*Requires: PHP 5.4 and higher + CURL*\n");
} elseif ($major < 5) {
$releaseFile->line("*Requires: PHP 5.6 and higher + CURL*\n");
- } else {
+ } elseif ($minor < 3) {
$releaseFile->line("*Requires: PHP 8.0 and higher + CURL*\n");
+ } else {
+ $releaseFile->line("*Requires: PHP 8.2 and higher + CURL*\n");
}
$releaseFile->line("* **[Download Latest $branch Release]($downloadUrl)**");
}
diff --git a/_config.yml b/_config.yml
index 4be72f287..1339b5f28 100644
--- a/_config.yml
+++ b/_config.yml
@@ -29,4 +29,4 @@ banner:
# disable content to show last blogpost
# content: 'π Codeception truns 10! Join online celebration on November 30!'
# content: 'Codeception is on OpenCollective! Support us π'
- content: 'π Codeception 5 is out! | πΊπ¦ Help Ukraine!'
+ content: 'πΊπ¦ Help Ukraine!'
diff --git a/_data/extensions.yml b/_data/extensions.yml
index fc0428a10..f5c77f180 100644
--- a/_data/extensions.yml
+++ b/_data/extensions.yml
@@ -1,3 +1,8 @@
+- name: Testomat.io Reporter
+ link: https://github.com/testomatio/php-reporter
+ description: Run reports and analytics via [Testomat.io](https://testomat.io)
+ image: https://testomat.io/wp-content/uploads/2022/03/Real_time_report_test_result-936x573.jpg
+
- name: Allure Codeception Adapter
link: https://github.com/allure-framework/allure-codeception
description: This is a Codeception adapter for [Allure Framework](http://allure.qatools.ru)
diff --git a/_data/modules.yml b/_data/modules.yml
index 6b8b770e3..d36e1192f 100644
--- a/_data/modules.yml
+++ b/_data/modules.yml
@@ -15,6 +15,10 @@
link: https://github.com/walterwhites/Appium-codeception-module
description: Easy Appium integration, iOS Automation
+- name: Axeception
+ link: https://github.com/flowdgmbh/codeception-axeception
+ description: Run axe-core acceptance tests in codeception
+
- name: BrowserMob
link: https://github.com/edno/codeception-browsermob
description: Codeception module for BrowserMob Proxy.
@@ -87,10 +91,14 @@
description: Codeception module to test email using MailCare.io (Free, Open Source or paid services).
color: "#e65722"
+- name: Mailpit
+ image: ../images/mailpit.svg
+ link: https://github.com/koehnlein/codeception-email-mailpit
+ description: Mailpit is a standalone local SMTP server to test email deliveries. The Codeception module provides assertions such as `$I->haveUnreadEmails();` or `$I->seeInOpenedEmailHtmlBody()`.
+
- name: MailCatcher
link: https://github.com/captbaritone/codeception-mailcatcher-module
description: MailCatcher is a standalone software which can be configured to catch *any* email sent by your development server, and display it on a webpage. The MailCatcher Module allows you to test the contents of those emails in an acceptance test.
- color: "#FFF5C4"
- name: MailSMTP
link: https://github.com/AhmedSamy/codeception-smtp-mail
@@ -161,3 +169,7 @@
- name: Yandex
link: https://github.com/portrino/codeception-yandex-module
description: Validation of structured data via yandex API.
+
+- name: Grpc
+ link: https://github.com/MercerMorning/codeception-grpc-module
+ description: Validation of grpc server.
diff --git a/_includes/algolia.html b/_includes/algolia.html
index 58043c85f..415a7dad3 100644
--- a/_includes/algolia.html
+++ b/_includes/algolia.html
@@ -1,24 +1,25 @@
diff --git a/_includes/announcement.html b/_includes/announcement.html
deleted file mode 100644
index 3a23886a3..000000000
--- a/_includes/announcement.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Training: Web Test Automation with Codeception - 04.09.2019-05.09.2019 Buy now!
-
\ No newline at end of file
diff --git a/_includes/cloudways.html b/_includes/cloudways.html
index 2ee33cbda..b283aee3a 100644
--- a/_includes/cloudways.html
+++ b/_includes/cloudways.html
@@ -1,3 +1,4 @@
-
-
+
+
diff --git a/_includes/comment.html b/_includes/comment.html
index 7fe39734b..0b52c8748 100644
--- a/_includes/comment.html
+++ b/_includes/comment.html
@@ -9,4 +9,4 @@
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
-
+
diff --git a/_includes/extensions.md b/_includes/extensions.md
index 107bd5f04..0552d693e 100644
--- a/_includes/extensions.md
+++ b/_includes/extensions.md
@@ -2,10 +2,10 @@
## DotReporter
-[See Source](https://github.com/Codeception/Codeception/blob/5.0/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.

@@ -38,7 +38,7 @@ Use this extension as an example for building custom reporters.
## Logger
-[See Source](https://github.com/Codeception/Codeception/blob/5.0/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.
@@ -66,16 +66,16 @@ extensions:
## Recorder
-[See Source](https://github.com/Codeception/Codeception/blob/5.0/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,7 +106,7 @@ 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
/**
@@ -122,10 +122,9 @@ public function testLogin(AcceptanceTester $I)
-
## RunBefore
-[See Source](https://github.com/Codeception/Codeception/blob/5.0/ext/RunBefore.php)
+[See Source](https://github.com/Codeception/Codeception/blob/main/ext/RunBefore.php)
Extension for execution of some processes before running tests.
@@ -156,9 +155,9 @@ HINT: you can use different configurations per environment.
## RunFailed
-[See Source](https://github.com/Codeception/Codeception/blob/5.0/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,9 +169,9 @@ 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:
@@ -185,15 +184,16 @@ On each execution failed tests are logged and saved into `tests/_output/failed`
## RunProcess
-[See Source](https://github.com/Codeception/Codeception/blob/5.0/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 selenium server, chromedriver, etc.
+Each command is executed only once, at the beginning of the test suite. To execute a command before each test, see [Before/After Attributes](https://codeception.com/docs/AdvancedUsage#BeforeAfter-Attributes).
-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,8 +203,7 @@ extensions:
Multiple parameters can be passed as array:
```yaml
-# acceptance.suite.yml
-
+# Acceptance.suite.yml
extensions:
enabled:
- Codeception\Extension\RunProcess:
@@ -214,28 +213,33 @@ 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 you need configuration to be specified as object:
```yaml
extensions:
enabled:
- Codeception\Extension\RunProcess:
- 0: java -jar ~/selenium-server.jar
- 1: mailcatcher
- sleep: 5 # wait 5 seconds for processes to boot
+ 0: php -S 127.0.0.1:8000 -t tests/data/app
+ 1: java -jar ~/selenium-server.jar
+ sleep: 5 # wait 5 seconds for the 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.0/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.
+## SuiteInitSubscriberTrait
+
+[See Source](https://github.com/Codeception/Codeception/blob/main/ext/SuiteInitSubscriberTrait.php)
+
+
+
diff --git a/_includes/for.html b/_includes/for.html
deleted file mode 100644
index c2d66ef98..000000000
--- a/_includes/for.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
- Codeception collects and shares best practices and solutions for testing PHP web applications. With a flexible
- set of included modules tests are easy to write, easy to use and easy to maintain.
-
+ Codeception collects and shares best practices and solutions for testing PHP web applications. With a
+ flexible
+ set of included modules tests are easy to write, easy to use and easy to maintain.
+
diff --git a/_includes/js.html b/_includes/js.html
index ab2622bd2..8bee78f05 100644
--- a/_includes/js.html
+++ b/_includes/js.html
@@ -1,5 +1,7 @@
-
+
\ No newline at end of file
diff --git a/_includes/laravel_hero.html b/_includes/laravel_hero.html
index 300478491..fad0bacef 100644
--- a/_includes/laravel_hero.html
+++ b/_includes/laravel_hero.html
@@ -1,15 +1,14 @@
-
-
-
-
-
- Codeception for
-
- Laravel
-
+
+
+
+
+
+ Codeception for
+ Laravel
+
+
+
-
-
\ No newline at end of file
diff --git a/_includes/modules.html b/_includes/modules.html
index 064f069d6..1a27a238f 100644
--- a/_includes/modules.html
+++ b/_includes/modules.html
@@ -4,7 +4,7 @@
\ No newline at end of file
diff --git a/_includes/reference.html b/_includes/reference.html
index 9ff7705ae..0e8a7cfc8 100644
--- a/_includes/reference.html
+++ b/_includes/reference.html
@@ -1 +1,11 @@
-
\ No newline at end of file
diff --git a/_includes/tweets.html b/_includes/tweets.html
index 64dd9df75..8bb370128 100644
--- a/_includes/tweets.html
+++ b/_includes/tweets.html
@@ -1,62 +1,82 @@
-
A couple of weeks ago we migrated from Zend
- Framework 1 to Symfony 3 and all the functional tests kept working. We basically only needed to replace the ZF1
- module with the Symfony module. Thanks @codeception for your awesome work there!
A couple of weeks ago we migrated from Zend
+ Framework 1 to Symfony 3 and all the functional tests kept working. We basically only needed to replace the
+ ZF1
+ module with the Symfony module. Thanks @codeception
+ for your awesome work there!
+
\ No newline at end of file
diff --git a/_includes/wp_hero.html b/_includes/wp_hero.html
index f4452c8ea..504013364 100644
--- a/_includes/wp_hero.html
+++ b/_includes/wp_hero.html
@@ -1,14 +1,13 @@
-
-
-
-
-
- Codeception for
-
-
+
+
+
+
+
+ Codeception for
+
+
+
-
-
\ No newline at end of file
diff --git a/_includes/yii_hero.html b/_includes/yii_hero.html
index d460d8dcd..67f7fbe11 100644
--- a/_includes/yii_hero.html
+++ b/_includes/yii_hero.html
@@ -1,15 +1,14 @@
-
-
-
-
-
- Codeception for
-
-
-
+
+
+
+
+
+ Codeception for
+
+
+
+
-
-
\ No newline at end of file
diff --git a/_includes/zf_hero.html b/_includes/zf_hero.html
index 02f0c9623..ef3e26f02 100644
--- a/_includes/zf_hero.html
+++ b/_includes/zf_hero.html
@@ -1,28 +1,26 @@