BddBackground class
Represents a Gherkin Background block which provides common context and setup steps that execute before each Scenario in a Feature.
In BDD frameworks, the Background allows you to add some context to the
scenarios in a single feature. A Background is much like a scenario
containing a number of steps, but it runs before each and every scenario
setup.
Constructors
- BddBackground(BddFramework bdd, BddFramework _backgroundFramework)
-
Creates a BddBackground that registers itself to
bddand delegates its steps to a shared BddFramework instance.
Properties
- bdd → BddFramework
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNote → bool
-
Whether this term is a note, added with
.note(). Notes are exported as Gherkin comments, not as steps.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
finalinherited
- variation → _Variation
-
finalinherited
Methods
-
given(
String text) → BddGiven - This keyword starts a step that sets up the initial context of the scenario. It's used to describe the state of the world before you begin the behavior you're specifying in this scenario. For example, "Given I am logged into the website" sets the scene for the actions that follow.
-
keyword(
BddConfig config) → String -
override
-
keywordPrefix(
BddConfig config) → String -
override
-
keywordSuffix(
BddConfig config) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
note(
String text) → BddGiven - Often used informally in comments within a Gherkin document to provide additional information, clarifications, or explanations about the scenario or steps. Comments in Gherkin are usually marked with a hashtag (#) and are ignored when the tests are executed. A "Note" can be useful for giving context or explaining the rationale behind a certain test scenario, making it easier for others to understand the purpose and scope of the test.
-
prefix(
BddConfig config) → String -
override
-
spaces(
BddConfig config) → String -
override
-
suffix(
BddConfig config) → String -
override
-
toString(
[BddConfig config = BddConfig._default]) → String -
A note becomes one comment line per line of text, so every line stays a
comment. Any other term is kept on a single line.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited