Closed Luc45 closed 6 months ago
Some different environments where the local test environment has been tested:
I'm getting this PHP warning on the build from this branch (not on 0.4.1
):
➜ qit-cli git:(24-02/custom-tests-2) ✗ ./qit backend:current
PHP Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in phar:////workspace/qit-cli/qit/src/Environment/EnvironmentMonitor.php on line 17
Noting that I am on PHP 8.3.3 and after this notice it still provides the environment as expected so it isn't impacting anything.
Can you please run it using php qit-cli.php
so that we can pinpoint the line?
Can you please run it using
php qit-cli.php
so that we can pinpoint the line?
If I try and run it in the src
folder it gives me the following:
QIT_CLI\Commands\Environment\StartEnvironmentCommand
=> QIT_CLI\Environment\Environments\E2EEnvironment $e2e_environment
=> Error while making Symfony\Component\Filesystem\Filesystem $filesystem: parameter $filesystem is not optional and its type (Symfony\Component\Filesystem\Filesystem) cannot be resolved to a concrete class.
I see, can you please run composer install
and try again? (in the src
directory)
I see, can you please run
composer install
and try again? (in thesrc
directory)
Ack can't believe I missed that! That did it, the error is on line 21: src/Environment/EnvironmentMonitor.php on line 21
This PR adds the capability of running disposable test environments using QIT CLI.
The new
env
commands:You can spin up a configurable environment, too, choosing the WordPress, WooCommerce, PHP version, PHP extensions and whether to have Object Cache or not:
This environment is the same minimalist, alpine-based environment we use in QIT CI, which we will use to run custom E2E tests locally. In the future, it can also be used to run all QIT tests locally.
It makes for a tighter integration between test development in a developer's machine and test running in CI.
We control the environment in the Manager, which means that we, from the Manager, control the test environments that all developers uses on their local machines, which gives us immense power and integration. It's essentially a managed testing environment that we control and we offer for the developers, essentially abstracting away all the complexity of managing an environment for them, while giving us total control over the test environment being used both in the developer's machine and in CI, for a truly integrated testing framework.
Testing Instructions
qit switch local
qit env:up