Jake Ginnivan's blog

BDDfy v4.0 Beta 1 Released

We are excited to announce v4 beta 1 of BDDfy! To give it a spin just change your NuGet settings to include pre-release and update. v4 has a bunch of new stuff included which takes BDDfy from not only the simplest BDD framework for .NET but also one of the most powerful!

Please give it a go and report any issues/feedback you have so can fix them before the final v4 release.

New Features

New features include:

  • Cucumber Examples support
    • This was one of the biggest missing features of BDDfy. We support text based tables (to support easy migration from SpecFlow) and also examples in code which allows complex types rather than just basic types!
    • If you have not seen cucumber examples before check out https://github.com/cucumber/cucumber/wiki/Scenario-Outlines for more information
    • See the examples blog post for more information about examples and how they work in BDDfy
  • Tags
    • .WithTags("Tag1", "Tag2") will be seen in your reports. For example in text reporter you will get Tags: Tag1, Tag2 under the test output. The HTML report will have tags boxes next to the step title
    • Tag functionality is really basic at the moment, and will be improved in v4.1
  • Fluent: Step titles are prefixed with the step type
    • For example: this.Given(_ => Something()) will result in a step title of Given something
  • Fluent: Removed restriction on order of step types. So you can create more complex tests (for acceptance/UI based tests). i.e .Given().Then().When().Then().And().When().Then() etc.
  • Added But step type, in beta 1 this is only available for the fluent syntax. It will be in reflective by the final release
  • New Metro HTML report
  • Classic HTML Report is now self contained with jQuery inlined in the report. CSS is also minified to make the report source easier to read.
    • You can switch to a CDN version of jQuery via configuration if you do not want it included in the report
  • Inline assertions:
    • this.Given(() => { something = 5; }, "Something is 5") so you do not have to create methods for steps if you do not want to.
  • Title-only steps: you can have a title only step to explain the context more; e.g. Given(“Given something”)
  • StoryMetadata is made more generic to allow different story narratives; e.g. instead of As a …, I want …, So that … you can now have anything including So that …, As a …., I want …
  • Story title prefix is now customisable
  • Arguments passed to methods are now reported in steps much better, including:
    • Step titles are lazily evaluated, so if previous steps mutate state which is passed into a step then the value at step execution time will be reported
    • Support fields, properties and they will be reported as arguments in step title (i.e this.Given(_ => Given(_three)) will be Given 3
    • And a bunch of other improvements
  • BREAKING: A lot less namespaces to make the API easier to use.
    • Many of the namespaces that were necessary before, particularly for using fluent API and executable attributes, are removed and are now accessible via the root TestStack.BDDfy namespace.
  • BREAKING: A few types have been renamed to more accurately reflect their role and usage
  • BREAKING: Removed story category from .BDDFy and .LazyBDDfy methods
  • BREAKING: .net 3.5 support has been dropped, BDDfy now requires > .NET 4.0
  • Coming Soon: ReSharper BDDfy plugin, which will stop ReSharper marking steps as unused. Check out it’s progress at https://github.com/TestStack/TestStack.BDDfy.ReSharper - Thanks heaps to Igal Tabachnik (@hmemcpy) for the work on this

Check out the release notes at https://github.com/TestStack/TestStack.BDDfy/blob/release-4.0.0/release-notes.md

Known issues

Feedback wanted

This is an exciting release for BDDfy and we want to hear about any issues you hit

From the TestStack team (Jake Ginnivan, Mehdi Khalili, Michael Whelan and Rob Moore)

Comments