MDL-49456 behat: Fixed following issues in parallel run
1. Parallel run without feature should exit with success 2. Updated exit codes to be more clear for each process 3. Fixed wwwroot and dataroot while executing with tags 4. Added support for running scenario/feature 5. Added support for or'ing tags 6. Added support for running single behat site 7. Fixed wrong example in help 8. Use parallel run only when parallel > 1 9. Exit showing behat site is not installed 10. Exit with error, if not a valid option 11. Added usage in help to explain how to use command 12. run.php should be able to run from any path 13. Pass all arguments to single run
This commit is contained in:
@@ -68,15 +68,18 @@ list($options, $unrecognized) = cli_get_params(
|
||||
$help = "
|
||||
Behat utilities to manage the test environment
|
||||
|
||||
Usage:
|
||||
php util.php [--install|--drop|--enable|--disable|--diag|--updatesteps|--help] [--parallel=value [--maxruns=value]]
|
||||
|
||||
Options:
|
||||
--install Installs the test environment for acceptance tests
|
||||
--drop Drops the database tables and the dataroot contents
|
||||
--enable Enables test environment and updates tests list
|
||||
--disable Disables test environment
|
||||
--diag Get behat test environment status code
|
||||
--updatesteps Update feature step file.
|
||||
-j, --parallel Number of parallel behat run operation
|
||||
-m, --maxruns Max parallel processes to be executed at one time.
|
||||
--updatesteps Update feature step file.
|
||||
|
||||
-h, --help Print out this help
|
||||
|
||||
@@ -205,8 +208,12 @@ if ($options['install']) {
|
||||
} else if ($options['disable']) {
|
||||
echo "Acceptance tests environment disabled for " . $options['parallel'] . " parallel sites" . PHP_EOL;
|
||||
|
||||
} else if ($options['diag']) {
|
||||
// Valid option, so nothing to do.
|
||||
} else {
|
||||
echo $help;
|
||||
chdir($cwd);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
chdir($cwd);
|
||||
|
||||
Reference in New Issue
Block a user