February 11, 2020

8 Steps to a Better Console Application

The console application is the workhorse of the software world. It isn't flashy like its graphical cousins the mobile and web apps. Graphical user interfaces compose images, sophisticated widgets, and animations, but the humble command-line interface (CLI) has none of that. Its tools are simple lines of text printed to a terminal. Despite its simplicity, you can still make usability mistakes when building a console app. Avoid them by following a handful of guidelines - a few of which are highlighted in the The Unix Philosophy. Read more

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 24, 2018

Running SpecFlow Scenarios in Parallel

As of SpecFlow version 2.0, you can run scenarios in parallel. This means faster execution times and faster feedback in your continuous integration process. Memory Isolation To enable parallel execution, you must use a test runner that supports it. Available runners include NUnit 3.0, xUnit 2.0, and the SpecFlow+ Runner (specrun). Specrun is a commercial product, but it has advanced features like memory isolation via an app domain or process. NUnit and xUnit don't support memory isolation, so they requre your tests to be thread safe. 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 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