Skip to content
pubscout

pickled_cucumber

1.7.0, released 3 months ago by mobile-tools.dev

A simple Cucumber BDD implementation for Dart, Dart Frog, and Flutter projects.

$ flutter pub add pickled_cucumber
Source repository

What it does

Allows developers to run Cucumber Gherkin feature files and step definitions in Dart, Dart Frog, and Flutter. It supports standard unit tests, widget tests, and integration tests, with optional code generation for Flutter.

AI-written summary of version 1.7.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to write BDD tests using Gherkin feature files in Flutter or Dart.
  • You need to run Cucumber scenarios as widget tests or integration tests.

Skip it when

  • You require a full and comprehensive implementation of the entire Cucumber standard specification.
  • You prefer writing purely programmatic tests without feature files.

Strengths

  • Supports Dart, Dart Frog, and Flutter (including widget and integration tests).
  • Supports Background steps for shared scenario setup.

Weaknesses

  • Does not aim to be a full Cucumber implementation; only supports common features.
  • Requires build_runner and code generation setup for Flutter usage.

Setup

Kind
Pure Dart
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
8

Requires adding the package, writing feature files and step definitions, and optionally configuring build_runner for Flutter code generation.

import 'package:pickled_cucumber/pickled_cucumber.dart';
import 'package:counter/features/step_definitions/counter_steps.dart';

void main() {
    final stepDefsDartFile = CounterStepDefs();

    PickledCucumber.runFeatures(
        "features/counter.feature",
        stepDefsDartFile,
    );
}

Alternatives

Packages that do the same job and could replace pickled_cucumber.

Works with

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