cucumber_messages
35.0.0, released 9 days ago by cucumber.io
Dart types and helpers for Cucumber message protocol (NDJSON).
WASM-ready
What it does
Provides generated Dart classes for all Cucumber message schemas. Includes utilities for reading and writing NDJSON streams, timestamps, and durations.
AI-written summary of version 35.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to exchange Cucumber messages between processes in Dart/Flutter
- You want strongly‑typed access to Cucumber JSON schema data
- You need NDJSON stream support for test results
Skip it when
- You only need simple JSON parsing without generated models
- You are not using Cucumber or BDD testing
Strengths
- Fully generated from official Cucumber JSON schemas
- Zero runtime dependencies
- Supports NDJSON streaming out of the box
Weaknesses
- No runtime features beyond generated models
- No built‑in test runner or BDD framework
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:cucumber_messages/cucumber_messages.dart';
void main() async {
final stream = NDJsonReader(stdin);
await for (final message in stream.read()) {
if (message is Envelope) {
print('Got ${message.messageCase}');
}
}
}Alternatives
Packages that do the same job and could replace cucumber_messages.
- json_annotation
If you prefer manual JSON serialization with annotations instead of generated schema types
84Compare
Works with
Packages commonly used together with cucumber_messages: ones it builds on, ones built on it, and its own family.
- bdd_widget_testBuilt on cucumber_messagesGenerate Flutter widget tests from Gherkin feature files
- cucumber_gherkinBuilt on cucumber_messagesParses Gherkin .feature files into Cucumber Messages envelopes
- bdd_frameworkBuilt on cucumber_messagesCreate BDD tests in Dart code with readable error messages and Gherkin feature file export.