Skip to content
pubscout

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.

$ flutter pub add bdd_framework
Source repository

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.

Works with

Packages commonly used together with bdd_framework: ones it builds on, ones built on it, and its own family.