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

outdated

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.

BDD Framework #

This package is brought to you by Zaher Hammoud, and myself, Marcelo Glasberg.

BDD framework for Dart/Flutter:

  • Lets you create BDD tests in code.
  • Gives you easy to read error messages when assertions fail.
  • Exports to Gherkin/Cucumber .feature files (optional).
  • Does not need generated code to work.

1. Creating your BDD tests #

You create your BDD tests in code, not in .feature files. For example:

var feature = BddFeature('Buying amount');

Bdd(feature)
   .scenario('Buying amount for share based orders, zero fees.')
   //
   .given('The user has 120 dollars.')
   .and('IBM share has bid-price 3 dollars, ask-price 10 dollars.')
   .and('Fees are zero.')
   //
   .when('The user opens the order-form.')
   //
   .then('The buying amount is 12 shares.')
   .and('It costs 120 dollars.')
   //      
   .run((ctx) async {
       
       // Given:
       setCashBalance(120);         
       setSnapQuote(IBM, bidPrice: 3, askPrice: 10);
       setFees(0);         
    
       // When:
       var result = calculateOrderForm(IBM);
         
       // Then:
       expect(result.shares, 12);         
       expect(result.dollars, 120);
   });

THE REST OF THE DOCUMENTATION IS COMING SOON!

Copyright #

This package is copyrighted and brought to you by Parkside Technologies, a company which is simplifying global access to US stocks.

This package is published here with permission.

Please, see the license page for more information.


The Flutter packages I've authored:

My Medium Articles:

My article in the official Flutter documentation:


Marcelo Glasberg:

github.com/marcglasberg
linkedin.com/in/marcglasberg/
twitter.com/glasbergmarcelo
stackoverflow.com/users/3411681/marcg
medium.com/@marcglasberg

20
likes
0
pub points
72%
popularity

Publisher

verified publisherglasberg.dev

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

License

unknown (LICENSE)

Dependencies

characters, collection, flutter, flutter_test, meta

More

Packages that depend on bdd_framework