Skip to main content

bdd_framework 5.0.3 copy "bdd_framework: ^5.0.3" to clipboard
bdd_framework: ^5.0.3 copied to clipboard

BDD framework for Dart/Flutter. Lets you create BDD tests in code, and gives you easy to read error messages when assertions fail. Exports to Gherkin/Cucumber feature files.

Sponsored by MyText.ai

5.0.3 #

  • Exported feature files are now always valid Gherkin (#18, #19, #20):

    • A | in a table or Examples cell is written as \|, and a line break as \n. A backslash is escaped only where Gherkin would misread it, so values like C:\tmp or \d+ are written unchanged.
    • A line break in a step, scenario name, feature title or user story is written as a space, instead of starting a new scenario or step.
    • Each line of a multi-line note() becomes its own # comment.
    • A feature title with a line break no longer makes the .feature file fail to be created. The console output uses the same formatting, so it changes the same way.
  • In widget tests (flutter_widget_test.dart), an error Flutter reports without throwing it, like a layout overflow when BddFlutter.ignoreOverflow is false, now fails the step where it happens. Previously the BDD printed TEST PASSED! and Flutter failed the test only afterwards. The steps after it don't run, and the error is shown with its original details. An error the test takes itself with tester.takeException() doesn't fail the step.

  • ctx.table(...).rowWhere(...) now shows the value it looked for in its error message, instead of the column name twice.

  • BddContext, BddTableRows, BddMultipleTableValues and BddTableValues with the same values are now equal and have the same hashCode.

  • When FeatureFileReporter can't write a feature file, it now says which feature failed and why.

  • Thanks to Andrew Friedman for the Gherkin conformance tests that found the export bugs.

5.0.2 #

  • FeatureFileReporter(clearAllOutputBeforeRun: true) now deletes only the .feature files directly inside FeatureFileReporter.dir. Previously it recursively deleted the whole directory, including any other files in it. An empty FeatureFileReporter.dir now means the current directory, instead of the filesystem root.

5.0.0 #

  • If you want to use Patrol, see the new bdd_framework_patrol package. Its code was contributed by Kahoulam.

  • Breaking: .run() and .code() are now extension methods that come from a runner import: package:bdd_framework/bdd_framework.dart or flutter_test.dart (Flutter tests), flutter_widget_test.dart (widget tests with a WidgetTester), or dart_test.dart (pure Dart tests). If you import bdd_framework.dart with a show clause, also show FlutterTestRun and FlutterTestCode.

  • Fix pure Dart BDD tests reporting success to package:test after a failed assertion or exception. Synchronous and asynchronous failures now fail the underlying test and return a failing test-process exit code.

  • Restore custom-formatting and feature-collection regression coverage, and test execution of scenarios starting directly with When or Then.

  • New package:bdd_framework/core.dart exposes the runner-agnostic API (no .run() extension) for runners in other packages.

4.0.7 #

  • Version bump of dependencies

3.0.2 #

  • Compatible with Flutter 3.13.9 version.

  • Internal frames are not shown in the error stack-traces. This simplifies the reported stack-traces by removing lines which are not from your application code.

2.0.1 #

  • Documentation, BDD tutorial and example app.

1.0.0 #

  • Initial version.
27
likes
0
points
2.3k
downloads

Publisher

verified publisherglasberg.dev

Weekly Downloads

BDD framework for Dart/Flutter. Lets you create BDD tests in code, and gives you easy to read error messages when assertions fail. Exports to Gherkin/Cucumber feature files.

Repository (GitHub)
View/report issues

Topics

#bdd #behavior-driven-development #testing #tdd #project-management

License

unknown (license)

Dependencies

characters, collection, flutter, flutter_test, meta, test

More

Packages that depend on bdd_framework