Skip to content

Missing step does not exit with non-zero CLI code #1541

@mvorisek

Description

@mvorisek

CLI ouput like:

Feature: Checkbox
  Scenario:                                    # tests-behat/checkbox.feature:3
    Given I am on "form-control/checkbox.php"  # Behat\MinkExtension\Context\MinkContext::visit()
    ...
    Then Toast display should contain text '...'

1 scenario (1 undefined)
8 steps (2 passed, 2 undefined, 4 skipped)
0m1.86s (12.32Mb)

 >> <snippet_undefined><snippet_keyword>main</snippet_keyword> suite has undefined steps.
Please choose the context to generate snippets:</snippet_undefined>

  [0] None
  [1] Behat\MinkExtension\Context\MinkContext
  [2] Atk4\Ui\Behat\Context

--- Behat\MinkExtension\Context\MinkContext has missing steps. Define them with these snippets:

    /**
     * @Then Toast display should contain text :arg4
     */
    public function toastDisplayShouldContainText($arg1, $arg2, $arg3, $arg4): void
    {
        throw new PendingException();
    }

silently exists with zero CLI exit code making it very hard to fail CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions