operations / drush-behat-params
Drush 命令包装器,用于 behat 并预配置 BEHAT_PARAMS。
2.1.0
2024-01-25 15:22 UTC
Requires
- php: >=5.6
- consolidation/site-alias: ^3 || ^4
- consolidation/site-process: ^2.1 || ^4 || ^5
Requires (Dev)
- composer/installers: ^1.2
- drupal/core-composer-scaffold: ^8.8.1
- drupal/core-recommended: ^8.8
- drush/drush: ^8
- g1a/composer-test-scenarios: ^3.0.2
- pantheon-systems/drupal-integrations: ^8
- phpunit/phpunit: ^6.5
- symfony/filesystem: ^3.4.28
- webflo/drupal-finder: ^1.1.0
- webmozart/path-util: ^2.3
- zaporylie/composer-drupal-optimizations: ^1.0.2
- 2.x-dev
- 2.1.0
- 2.1.0-beta4
- 2.1.0-beta3
- 2.1.0-beta2
- 2.1.0-beta1
- 2.0.0-beta15
- 2.0.0-beta14
- 2.0.0-beta13
- 2.0.0-beta12
- 2.0.0-beta11
- 2.0.0-beta10
- 2.0.0-beta9
- 2.0.0-beta8
- 2.0.0-beta7
- 2.0.0-beta6
- 2.0.0-beta5
- 2.0.0-beta4
- 2.0.0-beta3
- 2.0.0-beta2
- 2.0.0-beta1
- 1.x-dev
- 1.10.0-alpha11
- 1.10.0-alpha10
- 1.0.0
- dev-feature/pantheon-settings
- dev-feature/tasks
- dev-feature/scripts
- dev-feature/composer-project-bins
- dev-feature/remove-drupal-projects
- dev-bug/drupal-project-auto-create
This package is auto-updated.
Last update: 2024-09-11 16:19:39 UTC
README
一个基本的 drush 插件,它会自动设置 URL、root 和 drush 别名来调用 behat 并传递 BEHAT_PARAMS
。
使用方法
-
使用 composer 安装
composer require operations/drush-behat-params`
-
使用 drush 运行
drush behat
或
drush @alias behat
确保 DRUSH_OPTIONS_URI
的值已设置,以便 behat 测试正确的 URL。
注意:对于在 Lando 上轻松设置 DRUSH_OPTIONS_URI
,请参阅 https://github.com/operations-platform/drupal-settings。
远程别名
您可以使用此命令通过 Drush 站点别名从本地运行远程站点的测试。
例如,如果您有一个名为 @test
的别名,您可以这样运行您的 behat 测试
$ drush @dev behat
------------- ---------------------------------------- -----------
Drush Alias URL Root
------------- ---------------------------------------- -----------
@self test-projectcode.pantheonsite.io /code/web
------------- ---------------------------------------- -----------
....
是什么?
Behat 使用硬编码的配置或 BEHAT_PARAMS 中的 JSON 块来配置要测试的站点。
而不是与环境变量纠缠,此插件使用 Drush 别名信息为您设置 BEHAT_PARAMS。
开发
此工具是 Drupal Operations 项目 的一部分。
源代码维护在 https://git.drupalcode.org/project/operations/-/tree/1.x/drush/Commands/contrib/drush-behat-params
可以在 https://www.drupal.org/project/issues/operations?categories=All 上提交问题。