File: context.local_params.feature

package info (click to toggle)
behave 1.2.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,160 kB
  • sloc: python: 19,857; makefile: 137; sh: 18
file content (17 lines) | stat: -rw-r--r-- 839 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Feature: Local Context Parameters defined in Scenarios (Steps)

    . SPECIFICATION:
    .   * When a step adds/modifies an attribute in the Context object,
    .     then its value is only available to other steps in this scenario.
    .   * After a scenario is executed all Context object changes are undone.

    Scenario: Add Local Context parameter in Scenario/Step
      Given the behave context does not have a parameter "local_name"
      When I set the context parameter "local_name" to "Alice"
      Then the behave context should have a parameter "local_name"
      And  the behave context should contain:
        | Parameter  | Value   |
        | local_name | "Alice" |

    Scenario: Ensure that Local Context parameter is not available to next Scenario
      Then the behave context should not have a parameter "local_name"