BddFeature class

Represents a Gherkin Feature.

A BddFeature is the highest-level organization in BDD. It contains a title, an optional description, and a set of BDD scenarios (represented by BddFramework).

You can also define a background for the feature, which provides common steps that run before every scenario.

Constructors

BddFeature(String title, {String? description})
Creates a new BddFeature with the given title and optional description.
BddFeature.userStory(String title, {required String asA, required String iWant, required String soThat})
Creates a new BddFeature with a structured User Story description.

Properties

background → BddBackground
Provides access to the BddBackground for this feature.
no setter
backgroundFramework → BddFramework?
Internal access for engines (e.g. BddEngine) to retrieve the background setup steps.
no setter
bdds → List<BddFramework>
Returns a copy of the list of scenarios (BddFramework instances) in this feature.
no setter
description → String?
Returns the plain text description, if any.
no setter
hashCode → int
The hash code for this object.
no setteroverride
isEmpty → bool
Returns true if the feature title is empty.
no setter
isNotEmpty → bool
Returns true if the feature has a non-empty title.
no setter
result ↔ List<BddFramework>
An internal list used for tracking results during execution.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
testResults → List<TestResult>
Returns a list of TestResult objects for all scenarios in this feature.
no setter
title → String
The title of the feature.
final

Methods

add(BddFramework bdd) → void
Adds a scenario (BddFramework) to this feature.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString([BddConfig config = BddConfig._default]) → String
Returns the Gherkin string representation of this feature.
override

Operators

operator ==(Object other) → bool
The equality operator.
override