pim-community-dev
pim-community-dev copied to clipboard
Use APP_DEBUG env var for test Kernel
This PR allows you to run integration tests without using the cache container. It can be useful when working on services DI definition by launching the integration test. Without this PR, you have to clear the cache each time you modify the DI, which is a real pain... :cry:
You can activate the debug several ways:
By adding the env var in the Docker command line:
APP_ENV=test docker-compose run --rm -e APP_DEBUG=1 php vendor/bin/phpunit src/Akeneo/..../MyTestIntegration.php
Or by adding the APP_DEBUG in a local test env file named .env.test.local
-
By activating this variable, a test suite will leak. At the end, you will have a memory limit issue. So, even if it's deactivated by default, I'm wondering if it worths the time saved. You can easily lose several hours on a memory leak due to the activation of this variable.
-
You are not in the same condition as your CI, which was the original intent of our test DX.
-
I'm afraid no people except you will use it, because it's complex to setup and not documented
-
There are other test cases, meaning this is only partially implemented