Sha256: 530ae60734651621c523c6b9b7839d6d70d5b311d5c085bf83a89e7407fe7455

Contents?: true

Size: 1.4 KB

Versions: 1

Compression:

Stored size: 1.4 KB

Contents

Feature: Global Context Parameters defined in environment file

  . SPECIFICATION:
  .   * When a Context parameter is defined in "environment.py",
  .     its value is provided to all scenarios (steps).
  .   * Each scenario has the same global parameters (and values).
  .   * A scenario (step) may modify global parameters (values).
  .   * After a scenario is executed all changes to Context parameters are reverted.

    Scenario: Test Setup Description (Example)
      Given a file named "features/environment.py" with:
        """
        def before_all(context):
            context.global_name = "env:Alice"
            context.global_age  = 12
        """

    Scenario: Modify global Context parameter in Scenario Step
      Given the behave context contains:
        | Parameter   | Value        |
        | global_name | "env:Alice"  |
        | global_age  | 12           |
      When I set the context parameter "global_name" to "step:Bob"
      Then the behave context should contain:
        | Parameter   | Value        |
        | global_name | "step:Bob"   |
        | global_age  | 12           |

    Scenario: Ensure that Global Context parameter is reset for next Scenario
      Then the behave context should have a parameter "global_name"
      And  the behave context should contain:
        | Parameter   | Value        |
        | global_name | "env:Alice"  |
        | global_age  | 12           |

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
busser-behave-0.1.3 vendor/behave/features/context.global_params.feature