BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News BDD Tool SpecFlow V2 with Parallel Execution

BDD Tool SpecFlow V2 with Parallel Execution

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
Style

BT