Upload
extcode
View
114
Download
0
Embed Size (px)
Citation preview
TYPO3 Core Acceptance Tests
Presentation and Hands On
TYPO3camp RheinRuhr - #t3crr
6th November 2016
6th Nov 2016TYPO3 Acceptance Tests2
About me
Daniel Lorenzextco.de UG / Tritum GmbH
TYPO3 CMS Certified Developer
GitHub:https://github.com/extcode
Twitter:https://twitter.com/extcoder
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
6th Nov 2016TYPO3 Acceptance Tests4
Docker for TYPO3 Testing (1)
● get Docker setup from Bamboo-Agentsdocker pull typo3gmbh/php70:1.0
● start Docker from your TYPO3.CMS directorydocker run v $(pwd):/TYPO3.CMS it rm typo3gmbh/php70:1.0 /sbin/my_init bash
● run commands in Docker Containercd /TYPO3.CMSmkdir p typo3temp/var/tests/
export HOME=/rootexport 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 &
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
6th Nov 2016TYPO3 Acceptance Tests6
Time for questions and suggestions.