moodlehq/behat-extension

此包已被废弃,不再维护。未建议替代包。

Moodle behat 扩展

v3.400.5 2021-05-19 23:29 UTC

README

Moodle 的 behat 扩展,用于从不同的 Moodle 组件获取功能和步骤定义;它基本上允许多个功能文件夹,并帮助外部应用程序组件之间分布的上下文。

以下自定义格式被支持。

  • moodle_progress:打印每个步骤的 Moodle 分支信息和点。
  • moodle_list:列出所有场景。
  • moodle_stepcount:列出每个功能文件中的所有功能及其总步骤数。用于并行运行。
  • moodle_screenshot:为每个步骤截图并生成核心转储。使用以下选项,您可以转储任意或全部内容。
    • --format-settings '{"formats": "image"}':只转储图像。
    • --format-settings '{"formats": "html"}':只转储 HTML。
    • --format-settings '{"formats": "html,image"}':转储两者。
    • --format-settings '{"formats": "html", "dir_permissions": "0777"}'

贡献

http://docs.moodle.org/dev/Acceptance_testing/Contributing_to_Moodle_behat_extension

从 moodle-behat-extension 1.31.x 升级到 3.31.0

  • 链式步骤在 behat 3 中不支持。
    • 您应替换 Behat\Behat\Context\Step\Given 为 Behat\Behat\Context\Step\Given;
    • 或使用 behat_context_helper::get('BEHAT_CONTEXT_CLASS'); 并调用 API 执行步骤。
  • 命名选择器已弃用,请使用 named_exact 或 named_partial 代替。
  • 失败的步骤将被缓存以供重试,无需空文件保存失败的场景。