Skip a behave step in the step implementation

Giacomo d'Antonio

Is there a way to tell behave in a step implementation to skip the current step?

Something like:

@given("bla bla bla")
def step():
    skip_current_step()

The use case is that I want to check if some additional software is installed. If not, I want the complete scenario to be skipped.

Barry

I don't know if you can skip from inside of a step, but you can skip a whole scenario at feature level:

def before_feature(context, feature):
    is_software_installed = some_foo_magic()

    if not is_software_installed:
        for scenario in feature.scenarios:
            if depends_on_software(scenario):
                scenario.mark_skipped()

Feature, Scenario, and ScenarioOutline all have a mark_skipped() method.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

CasperJS skip step on timeout

From Dev

Skip step in personal builds in TeamCity

From Dev

Skip Checkout Step but make associations

From Dev

Skip step based on job parameter

From Dev

Skip step based on job parameter

From Dev

How is data from one Behave step passed to a later step?

From Dev

How to get the current behave step with Python?

From Dev

How to get the current behave step with Python?

From Dev

Zapier: How to skip a step in multi-step zaps

From Dev

Debugger implementation - Step over issue

From Dev

Skip confirmation step with MicrosoftBot's FormBuilder

From Dev

Is is possible to skip the confirmation step while adding a repository?

From Dev

Is is possible to skip the confirmation step while adding a repository?

From Dev

Batch file, skip a step if an error occurs

From Dev

How to login user during Given step using django-behave

From Dev

TDD Implementing Step Definitions derived from Behave (Python)

From Dev

Behave: Accessing context.config variables outside of step definitions

From Dev

How to skip a maven build step without modifying the pom itself?

From Dev

How to skip method in step-into(F11)

From Dev

Why does the GDB 'step' command skip struct declarations?

From Dev

How to skip a step and increase the number of iterations in a for loop in R

From Dev

How to skip a step execution from beforeStep method in StepExecutionListener?

From Dev

How to skip 'Asking Permission step' in shopify API integration with PHP

From Dev

skip the sink step in kafka when posted data corrupted

From Dev

How to skip one fieldset in a multistep form on next step click

From Dev

Capturing step by step actions

From Dev

Drawing on JPanel step by step

From Dev

Capturing step by step actions

From Dev

Animate position step by step

Related Related

  1. 1

    CasperJS skip step on timeout

  2. 2

    Skip step in personal builds in TeamCity

  3. 3

    Skip Checkout Step but make associations

  4. 4

    Skip step based on job parameter

  5. 5

    Skip step based on job parameter

  6. 6

    How is data from one Behave step passed to a later step?

  7. 7

    How to get the current behave step with Python?

  8. 8

    How to get the current behave step with Python?

  9. 9

    Zapier: How to skip a step in multi-step zaps

  10. 10

    Debugger implementation - Step over issue

  11. 11

    Skip confirmation step with MicrosoftBot's FormBuilder

  12. 12

    Is is possible to skip the confirmation step while adding a repository?

  13. 13

    Is is possible to skip the confirmation step while adding a repository?

  14. 14

    Batch file, skip a step if an error occurs

  15. 15

    How to login user during Given step using django-behave

  16. 16

    TDD Implementing Step Definitions derived from Behave (Python)

  17. 17

    Behave: Accessing context.config variables outside of step definitions

  18. 18

    How to skip a maven build step without modifying the pom itself?

  19. 19

    How to skip method in step-into(F11)

  20. 20

    Why does the GDB 'step' command skip struct declarations?

  21. 21

    How to skip a step and increase the number of iterations in a for loop in R

  22. 22

    How to skip a step execution from beforeStep method in StepExecutionListener?

  23. 23

    How to skip 'Asking Permission step' in shopify API integration with PHP

  24. 24

    skip the sink step in kafka when posted data corrupted

  25. 25

    How to skip one fieldset in a multistep form on next step click

  26. 26

    Capturing step by step actions

  27. 27

    Drawing on JPanel step by step

  28. 28

    Capturing step by step actions

  29. 29

    Animate position step by step

HotTag

Archive