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.
- BddCodeExecution
- The result of running one code block of a BDD. See BddExecution.
- 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.
- BddExecution
- One run of a BDD, recorded while it runs so that reporters can tell what happened in each code block: whether it passed, how long it took, and which error it threw.
- 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
- CucumberResultsReporter
- Writes the results of your BDDs (which scenarios and steps passed, failed or were skipped, how long they took, and the errors) in Cucumber's standard results format, so that tools made for Cucumber can show and use them.
- 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
_BaseTermto 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 anExamplesblock. - BddRunnable
-
A marker mixin to indicate that a
_BaseTermcan 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
testortestWidgets) injected into BddRunner. -
CodeRun
= FutureOr<
void> Function(BddContext ctx) - TestDelegate = void Function(TestInvocation invocation)