BDD Tool SpecFlow V2 with Parallel Execution

| by Jan Stenberg Follow 38 Followers on Jan 31, 2016. Estimated reading time: 1 minute |

The latest version of Behaviour-Driven Development (BDD) tool SpecFlow supports parallel test execution and adds support for xUnit 2.0 and NUnit 3.0. The recently released version 2 is also upgraded to the new Gherkin3 parser, now used across nearly all Cucumber tools.

In a conversation with InfoQ Gáspár Nagy, creator and main contributor of SpecFlow, describes the parallel test execution as the most important new feature from a user perspective. For most use cases Nagy have seen a drop in execution time to about 40%, even on a single machine. With an application depending on static state, e.g. caches, the recommendation is to execute tests in parallel isolated by AppDomains. This ensures that the memory of every test execution thread is isolated and allows for tests to be executed in parallel without any extra considerations. Tests not depending on static state, i.e. not storing any test-specific information in static fields, can be run in parallel within an AppDomain. This results in a smaller initialization footprint and lower memory requirements.

Regarding the Gherkin 3 upgrade Nagy sees this as a great example of a cross platform open source project, enabling the ability to build cross-platform BDD skills, tools and community.

Nagy also notes that from an open-source project point of view the most important improvement is that they after a long time have managed to make a release again and also been able to clean up the project and put it on track for more frequent releases.

Other improvements include:

  • An upgrade of all components to .Net 4.5. Notable is that with this upgrade SpecFlow v2 will not work with older .NET runtimes.
  • The execution order of hooks, e.g. BeforeScenario, can now be controlled through an Order parameter.
  • Simplified configuration when working with MSTest.
  • Improved regular expression suggestions for missing steps.
  • Integration with Visual Studio has been moved to a separate project.

SpecFlow is an open source tool for BDD on the .NET platform and part of the Cucumber family supporting other platforms. With these tools a user story is described with scenarios using a language, Gherkin, based on keywords, the most important being Given, When and Then.

Getting Started examples, instructions for upgrading and documentation can be found on the SpecFlow site.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

I hope to donate by Dzmitry Lahoda

I got great value of work of these people. I know that they build commercial products on top of it. I would like to donate for what I have as open source - in my cases it was enough. But there is not Donate button:(

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss