Skip to content

Declare and check the external tools that scenarios need #393

Open

Description

@schlessera

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 Report scenarios that are filtered out by unmet requirements #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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingscope:testingRelated to testing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions