Declare and check the external tools that scenarios need

未關閉
#393 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
45/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
php
領域
testing

研究方向

Start from the Behat feature files config-edit.feature and post.feature and the requirement handling described in #392. Read the test runner that filters on @require-* tags and the linter for feature files. Done means required executables are declared as tags, checked before run, and missing tools report as undeclared with the tag to add.

由索引模型根據 Issue 內容生成。

描述

bug scope:testing

Some scenarios depend on external tools without declaring it. For example, config-edit.feature in config-command and post.feature in entity-command use ex as the editor. Where ex is missing, these scenarios fail halfway through, after the setup has already run. In post.feature that happens at the 17th step of the scenario, after a WordPress install and 6 wp calls.

Some declared requirements are not checked at all: @require-composer, @require-download and @require-opcache-save-comments appear in feature files but never filter anything.

Steps:

  1. Support declaring required executables as tags, checked before the run like the other requirements and reported as described in #392.
  2. Check the existing @require-* tags that are currently ignored, and warn about unknown ones so that typos do not go unnoticed.
  3. When a command fails because an executable is missing, report it as an undeclared requirement, naming the tag to add, instead of as a regular test failure. This also catches tools used inside wp commands, such as mysqldump, svn or zip.
  4. Flag steps that call known external tools without the matching tag when the feature files are linted.
  5. Add the missing tags to the existing feature files in the command packages.
主要語言
PHP
星號
42
分支
28
平均合併
18 小時 52 分鐘
30 天內合併 PR
27

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

wp-cli/wp-cli-tests 的其他 Issue

查看 wp-cli/wp-cli-tests 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。