Core Testing
Pimcore uses Codeception for testing its core features.
To execute core tests, Pimcore provides a docker-compose.yaml
file to create a setup for running the tests.
The docker images are based on the debug images, thus it is also possible to debug the tests using xdebug. Make sure, that path mappings are applied correctly though
Requirements
docker
anddocker compose
installed on your system.- Pimcore git repository cloned locally
Preparations
- Change to
tests\bin
directory of the Pimcore repository - Execute
./init-tests.sh
, this does:- Running
docker compose up -d
and setting up all necessary services (like db and redis). Pimcore source code files are mounted into docker container, so you can change files and test the changes right away. - Copying some files from
.github\ci\file
to prepare system for executing the tests (actually same as for github actions) - Executing
composer install
to install all dependencies - Print out further instructions
- Running
Now the system is ready and tests can be executed inside the docker containers (see also commands below).
After finishing, shutdown docker containers and cleanup volumes with docker compose down -v --remove-orphans
.