bdd_framework
5.2.2, released 3 days ago by glasberg.dev
Create BDD tests in Dart code with readable error messages and Gherkin feature file export.
What it does
Allows developers to write Behavior-Driven Development tests directly in Dart code without requiring build_runner or separate glue files. It automatically exports Gherkin feature files when tests run and provides clear console error messages.
AI-written summary of version 5.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to write BDD tests directly in code without managing separate feature and glue files.
- You need to automatically export Gherkin/Cucumber feature files from your test suite.
Skip it when
- You require traditional BDD setups where business analysts author strict feature files first and developers write glue code.
Strengths
- Does not require code generation or build_runner.
- Eliminates the need for glue files by implementing BDD directly in typed Dart code.
- Automatically exports valid Gherkin/Cucumber feature files upon test runs.
Weaknesses
- Requires developers to handle the translation of business requirements directly into code.
- Not suited for teams that strictly enforce business analysts writing `.feature` files first.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 7
Add to dev_dependencies and write BDD test blocks directly using the framework API.
Bdd(feature).test(
'Selling stocks',
(tester) async {
// BDD steps implementation
},
);Alternatives
Packages that do the same job and could replace bdd_framework.
- bdd_widget_test
Generate Flutter widget tests from Gherkin feature files
88Compare - bloc_lint
Official lint rules for development when using the bloc state management library.
85Compare - patrol_log
Log package for Patrol, a Flutter-native UI testing framework
87Compare - analysis_server_plugin
Framework and support code for building plugins for the Dart analysis server.
85Compare
Works with
Packages commonly used together with bdd_framework: ones it builds on, ones built on it, and its own family.
- testbdd_framework depends on itA full featured library for writing and running Dart tests across platforms.
- charactersbdd_framework depends on itUnicode and grapheme cluster aware string manipulation operations for Dart.
- cucumber_messagesbdd_framework depends on itDart types and helpers for Cucumber message protocol (NDJSON).
- cucumber_gherkinbdd_framework depends on itParses Gherkin .feature files into Cucumber Messages envelopes