August 31, 2018

Scaling SpecFlow With Proper Architecture

In July of 2018, I gave a talk at KCDC titled SpecFlow: Moving Beyond the Basics. Afterward, I changed the title to Scaling SpecFlow to more accurately reflect the topic. You can find the updated slide deck at https://joebuschmann.github.io/scaling-specflow/. Over the next few weeks, I created a series of posts, one for each section of the talk, for those of you who perfer blog posts to slide decks. This page aggregates these pages in one place and takes you through each one in order. Read more

August 13, 2018

Reusable Bindings in SpecFlow

As your application grows, your SpecFlow test suite needs to grow with it. Reusable bindings are essentional to prevent your code from becoming a bloated mess. Fortunately, the SpecFlow runtime has reusability in mind with a built-in inversion of control (IoC) framework and step argument transformations. With these features you can create reusable bindings that make test creation more productive. Problems with Inheritance Before digging into IoC, I'll take a moment to cover why you shouldn't use inheritance in your bindings. Read more

August 10, 2018

Working Effectively with SpecFlow Tables

The Gherkin DSL defines data tables as a way of passing a list of values to a step definition. Gherkin tables use the pipe character | to delimit column names and values. They're easy to read and understand by both business and technical people. While they work great in Gherkin, tables don't translate well to strongly typed .NET languages. They are converted to an instance of the Table type in SpecFlow bindings. Read more

August 10, 2018

Gherkin Tips

[Gherkin] is a Business Readable, Domain Specific Language that lets you describe software's behaviour without detailing how that behaviour is implemented. - Gherkin Wiki These Gherkin best practices were originally included in an early draft of a talk I gave on SpecFlow. Ultimately, I took them out because they didn't fit well with the topic, so I put them into a blog post. Table values should be atomic Bindings that take a table argument will almost always convert the table to a C# object for easy manipulation. Read more

August 8, 2018

SpecFlow Basics

SpecFlow is hands down my favorite testing tool. I've been blogging about it since 2013 covering mostly advanced topics. In this post, I'll go back to the beginning and briefly cover the basics to give you an idea of what it can do. What is SpecFlow? SpecFlow is a tool that allows you to: Define, manage, and automate human-readable acceptance tests in .NET. Enable BDD with easy to understand tests. Read more

© Joe Buschmann 2020