Task #92205
closed
Provide web server url configuration for acceptance tests
Added by Alexander Nitsche about 4 years ago.
Updated about 4 years ago.
Description
In order to run TYPO3 Core acceptance tests not only in the TYPO3 Core own docker environment but in an arbitrary environment the web server url of the testing environment should be configurable.
For example, having a LEMP docker stack with an Nginx web server available internally at http://nginx:8080
you should be able to set the docker service of the acceptance tests runner accordingly:
acceptance_backend_mariadb10:
image: {YOUR_DOCKER_PHP_IMAGE_INCLUDING_TYPO3}
environment:
typo3TestingAcceptanceBaseUrl: http://nginx:8080
Currently the web server url is set fix to http://web:8000
.
- Status changed from New to Under Review
I tested this patch by
1) replacing "web" by "nginx" in Build/testing-docker/local/docker-compose.yml
2) running all available acceptance tests:
./Build/Scripts/runTests.sh -s composerInstall
./Build/Scripts/runTests.sh -s acceptance -p 7.3
./Build/Scripts/runTests.sh -s acceptancePagetree -p 7.3
./Build/Scripts/runTests.sh -s acceptanceInstallTool -p 7.3
./Build/Scripts/runTests.sh -s install -d mariadb
./Build/Scripts/runTests.sh -s install -d postgres
./Build/Scripts/runTests.sh -s install -d sqlite
The acceptance test output showed the correct web server urls and the tests had the same results as before with the fixed web:8000 web server address.
Added a default acceptance tests web server url http://web:8000
such that all currently running configurations on bamboo continue to work seamlessly.
The way to test this patch changed slightly by
1) replacing "web" by "nginx" in Build/testing-docker/local/docker-compose.yml
2) adding environment variable typo3TestingAcceptanceBaseUrl: http://nginx:8000
to the following services of Build/testing-docker/local/docker-compose.yml
acceptance_backend_mariadb10:
acceptance_pagetree_mariadb10:
acceptance_installtool_mariadb10:
acceptance_install_mariadb10:
acceptance_install_postgres10:
acceptance_install_sqlite:
3) running all available acceptance tests:
./Build/Scripts/runTests.sh -s composerInstall
./Build/Scripts/runTests.sh -s acceptance -p 7.3
./Build/Scripts/runTests.sh -s acceptancePagetree -p 7.3
./Build/Scripts/runTests.sh -s acceptanceInstallTool -p 7.3
./Build/Scripts/runTests.sh -s install -d mariadb
./Build/Scripts/runTests.sh -s install -d postgres
./Build/Scripts/runTests.sh -s install -d sqlite
- Tracker changed from Feature to Task
- TYPO3 Version set to 11
Missed to pass Codeception configuration parameters to tests. This is done now by a new Codeception Helper Config
which can read and expose the configuration of itself (can be used to pass arbitrary parameters to any test class) and to expose the configuration of other modules. The latter is used to retrieve the parameter url
of the Codeception module WebDriver in the test classes.
Note: It might be appropriate to move that new helper Config
to the https://github.com/TYPO3/testing-framework extension in order to provide it to all TYPO3 3rd-party extensions as well.
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF