Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Skip a scenario at runtime #474

Closed
mattwynne opened this Issue · 3 comments

4 participants

@mattwynne
Owner

When a scenario is subject to random intermittent failures, and the steps can tell when that's happened, it would be useful if the step can communicate to cucumber that the scenario just needs to be skipped.

The use case is where the scenario depends on infrastructure (e.g. network latency) that might come and go. A simple FAIL doesn't enable you to distinguish between defects in the code, and environmental / infrastructure issues.

The implementation of this should be as simple as adding a new type of Exception (like Undefined or Pending) that allows you to cause Cucumber to skip the scenario.

@willbryant

I was wondering if we could have something like this too.

Our use case is slightly different - we want to indicate that a certain scenario is irrelevant for the configuration of the software being tested (which is figured out by app configuration methods which examine configuration files and environment variables etc. so not easily done using tags). Undefined would probably cover this.

Alternately we could have a separate hook that lets us tell cucumber not to run the scenario, but that wouldn't cover the use cases you mention above.

@kaldari

We have a similar use case. Certain tests are irrelevant depending on the configuration of the software. And because there are hundreds of wildly different configurations in the wild it's not easy to handle with tags. Ideally we would like for cucumber to be able to skip a test based on a specific condition. For example, if a certain button doesn't exist on a certain page, just skip the next 3 tests.

@mattwynne
Owner

If one of you who is interested in this feature could rustle up a PR with a failing scenario that describes the behaviour you want, I'll do my best to get this into the 2.0 release.

@chrismdp chrismdp modified the milestone: 2.0
@tooky tooky closed this issue from a commit
@tooky tooky Allow a step to skip the scenario
cc @tom025 this can be used for dry-run also

closes #474
eb9bc45
@tooky tooky closed this in eb9bc45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.