core library

The runner-agnostic API of the BDD framework: the BDD DSL, contexts, BddRunner and the reporters, but no .run() extension.

Import this library when writing a custom runner in a separate package (for example, bdd_framework_patrol). To write tests, import one of the runner libraries instead: dart_test.dart, flutter_test.dart or flutter_widget_test.dart.

Classes

BddBackground
Represents a Gherkin Background block which provides common context and setup steps that execute before each Scenario in a Feature.
BddCodeTerm
BddConfig
BddContext
BddDescribe
This interface helps to format values in Examples and Tables. If a value implements the BddDescribe interface, or if it has a describe method, it will be used to format the value.
BddExample
Represents a Gherkin Examples block which turns a Scenario into a Scenario Outline and provides one or more rows of example values.
BddFeature
Represents a Gherkin Feature.
BddFramework
BddGiven
BddGivenTable
BddKeywords
BddMultipleTableValues
BddReporter
Example:
BddRunner
Orchestrates the execution of BDD tests by connecting BDD scenarios to the underlying test framework via an injected TestDelegate.
BddScenario
Represents a Gherkin Scenario.
BddTableRows
BddTableTerm
BddTableValues
The example values are encapsulated as a BddTableValues object to be used by the code runs. In other words, the test code may read the example values from this.
BddTerm
BddThen
BddThenTable
BddWhen
BddWhenTable
ConsoleReporter
FeatureDescription
Represents the description of a BDD feature. It can be either a plain text description or a structured User Story.
FeatureFileReporter
row
TestInvocation
TestResult
TestRunConfig
val

Mixins

BddCodeable<T>
A mixin that enables a _BaseTerm to have executable code blocks attached to it via runner-specific extensions.
BddExampleAttachable
Adds the public .example(...) DSL entrypoint to fluent BDD nodes that are allowed to attach an Examples block.
BddRunnable
A marker mixin to indicate that a _BaseTerm can act as a trigger to run the test.

Functions

Bdd([BddFeature? feature]) → BddFramework

Typedefs

BddContextTransformationHandler = void Function(BddContextTransformer transformContext)
BddContextTransformer = BddContext Function(BddContext context)
A function type that represents the signature of the underlying test delegate (like test or testWidgets) injected into BddRunner.
CodeRun = FutureOr<void> Function(BddContext ctx)
TestDelegate = void Function(TestInvocation invocation)