Gáspár Nagy on software

coach, trainer and bdd addict, creator of SpecFlow

Property-based BDD Examples with SpecFlow and FsCheck

by Gáspár on November 2, 2016

BDD (Behavior-driven development) is a software development process focusing on active collaboration, which illustrates and automates the requirements using key examples of the problem domain. In BDD, the formalized examples use a natural language-based DSL driven by the Given/When/Then keywords.

At the same time, property-based testing (PBT) uses abstract formulas to declare expectations for the output values given some constraints on the input. The PBT tools try to disproof that the application fulfills these requirements by taking samples from the valid input value space.

The experience shows that for understanding and properly implementing the requirements, the team has to understand the requirements as a set of abstract rules, where collecting key examples can help a lot.

In this article, with the related open-source SpecFlow plugin, I would like to invite you for an experiment to use property-based testing in a BDD project for automating and formalizing business rules.

[read more…]