You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the plugin works in a way that behat/phpunit initialisation happens as part of install step irrespective whether ci script contains those tests or not. The logic is based on test files presence:
if ($this->plugin->hasBehatFeatures() || $this->plugin->hasUnitTests()) {
If files are there, test suit will be initialised (either or both). As behat/phpunit initialisation is time consuming, current logic might not be super efficient for the reasons:
Developer might need just one type of test or none in CI scenario.
Developer might want to split test in more than one stages (or run time consuming Behat test in parallel with others), and again does not need to initialise both at install step at each stage
There is --no-init param in install step that may partially help if behat and phpunit tests are not planned at all, but if either is required, initialisation will need to be triggered outside plugin (e.g. by explicit calling php admin/tool/behat/cli/init.php .... as part of CI scenario that you can spot some developers use already)
Suggested option is to move initialisation routines to respective steps, so that init is triggered only if this type of test is used in the scenario. What would be required:
Make behat/phpunit init calls a part of respective steps, don't output init process to test log (unless -vvv option is passed).
Add --no-init option to behat and phpunit step (in case one need to skip init, e.g. multiple calls of same step in scenario although init will be quick on consequent runs even without this option).
Install step --no-init should propagate no-init to both behat/phpunit so that it works the same in existing scenarios that use this param (alternatively we can deprecate it and fail install step with error message if used, so people would have to make changes in scripts and likely remove obsolete custom init runs?)
The text was updated successfully, but these errors were encountered:
Currently the plugin works in a way that behat/phpunit initialisation happens as part of install step irrespective whether ci script contains those tests or not. The logic is based on test files presence:
moodle-plugin-ci/src/Installer/InstallerFactory.php
Line 95 in 39af702
There is
--no-init
param in install step that may partially help if behat and phpunit tests are not planned at all, but if either is required, initialisation will need to be triggered outside plugin (e.g. by explicit callingphp admin/tool/behat/cli/init.php ....
as part of CI scenario that you can spot some developers use already)Suggested option is to move initialisation routines to respective steps, so that init is triggered only if this type of test is used in the scenario. What would be required:
-vvv
option is passed).--no-init
option to behat and phpunit step (in case one need to skip init, e.g. multiple calls of same step in scenario although init will be quick on consequent runs even without this option).--no-init
should propagate no-init to both behat/phpunit so that it works the same in existing scenarios that use this param (alternatively we can deprecate it and fail install step with error message if used, so people would have to make changes in scripts and likely remove obsolete custom init runs?)The text was updated successfully, but these errors were encountered: