LICENSE | ||
readme.rst |
Acceptance Tests for TYPO3 with help of PHP Codeception
They can be executed within
- a docker image
- GitHub Actions
- GitLab CI
Our goal
- TDD JavaScript functionality in Frontend of website
- Cover TYPO3 backend modifications for easier TYPO3 updates
- Robust, very few to none false positives
- No cross browser testing
- No visual regression testing
Used components
- Firefox + geckodriver
- Nix
- PHP Built-in web server
-
https://www.php.net/manual/en/features.commandline.webserver.php
- TYPO3 Testing Framework
Alternatives
runTests.sh
-
As used and documented by TYPO3
- Docker Images by SeleniumHQ
- cypress
Concept
Keep things simple to use: a single command to execute tests.
Get to know the stack: so you are free to adapt to your setup.
The Command
./vendor/bin/codecept run
The Stack
- Browser
-
Firefox (could be Chrome, Chromium, Edge, …)
- Driver
-
geckodriver (could be chromedriver, selenium, …)
- Server
-
PHP Built-in web server (could be nginx, apache, …)
- Test Runner
-
Codeception (could be CodeceptJS, Cypress, …)
Codeception Extensions
Codeception\Extension\RunProcess
-
Used to start geckodriver and PHP server
TYPO3\TestingFramework\Core\Acceptance\Extension\BackendEnvironment
-
Used to create environment with extensions
My suggestions
- Use smart wait
-
https://codeception.com/docs/modules/WebDriver#Configuration
- Use retry
-
Codeception\Step\Retry
- Use a namespace
- Use modules and dependencies
- Use recorder
-
Codeception\Extension\Recorder
Current Issues
- https://github.com/Codeception/Codeception/issues/5246
- https://github.com/symfony/symfony/issues/34406
Sources
- Website
- Repository
- TYPO3 Documentation
-
https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/Testing/WritingAcceptance.html
- Sponsored by our customers
-
-
See watchlist extension
-
Used for TYPO3 backend modification coverage
-
Migrated from a SaaS to Codeception tests
-