This year I spontaneously held a session on the subject of Acceptance Test at the TYPO3 Camp Rhein Ruhr (# t3crr). In addition to these few slides, I gave a brief introduction to Codeception.
1. TYPO3 Core Acceptance Tests
Presentation and Hands On
TYPO3camp RheinRuhr - #t3crr
6th November 2016
2. 6th Nov 2016TYPO3 Acceptance Tests2
About me
Daniel Lorenz
extco.de UG / Tritum GmbH
TYPO3 CMS Certified Developer
GitHub:
https://github.com/extcode
Twitter:
https://twitter.com/extcoder
3. 6th Nov 2016TYPO3 Acceptance Tests3
Acceptance Tests
Why we want Acceptance Tests
● therefore
● it's cool
● it's necessary
What are our goals?
● add acceptance tests for all backend modules
● devide acceptance tests to several bamboo agents
● add acceptance to the precommit hooks
4. 6th Nov 2016TYPO3 Acceptance Tests4
Docker for TYPO3 Testing (1)
● get Docker setup from Bamboo-Agents
docker pull typo3gmbh/php70:1.0
● start Docker from your TYPO3.CMS directory
docker run v $(pwd):/TYPO3.CMS it rm typo3gmbh/php70:1.0 /sbin/my_init bash
● run commands in Docker Container
cd /TYPO3.CMS
mkdir p typo3temp/var/tests/
export HOME=/root
export DISPLAY=":99"
export typo3DatabaseName="func"
export typo3DatabaseUsername="funcu"
export typo3DatabasePassword="funcp"
export typo3DatabaseHost="localhost"
export typo3InstallToolPassword="secure"
Xvfb :99 &
php S localhost:8000 >/dev/null 2>&1 &
./bin/seleniumserverstandalone >/dev/null 2>&1 &
5. 6th Nov 2016TYPO3 Acceptance Tests5
Docker for TYPO3 Testing (2)
● run all acceptance tests
./bin/codecept run Acceptance d c typo3/sysext/core/Build/AcceptanceTests.yml
● run all acceptance tests in a folder
./bin/codecept run Acceptance d c typo3/sysext/core/Build/AcceptanceTests.yml
typo3/sysext/core/Tests/Acceptance/Backend/Form
● run one acceptance test file
./bin/codecept run Acceptance d c typo3/sysext/core/Build/AcceptanceTests.yml
typo3/sysext/core/Tests/Acceptance/Backend/Form/FormCest.php
● run a specific acceptance test of a file
./bin/codecept run Acceptance d c typo3/sysext/core/Build/AcceptanceTests.yml
typo3/sysext/core/Tests/Acceptance/Backend/Form/FormCest.php:createNewForm
6. 6th Nov 2016TYPO3 Acceptance Tests6
Time for questions and suggestions.