Cucumber Tip: Key-Value Tables

You may not realize this: Tables in Cucumber steps don't have to have a header row. Sometimes it can work really well to use a headerless table of key-value pairs. Let's look at an example. Suppose we have a scenario that fills out an advanced search form to search for medical providers matching certain criteria. A mockup of the form looks something like this: If we were using the recently deprecated web steps generated by cucumber-rails, we might write steps to perform a search like these: Given I'm on the advanced search page And I select "Endocrinology" from "Specialty" And I choose "Yes" within "Accepts Insurance" And I fill in "ZIP Code" with "90010" And I select "5 miles" from "Search Radius" When I press "Search" But we know better than to do that, right? After all, we're trying to describe how the search logic should work, not how the form should look. Read More

The Future of Cucumber on .NET

Beginning just over two years ago, I worked with some great developers to create Cuke4Nuke as a way to bring Cucumber to .NET. Shortly after the first releases of Cuke4Nuke, TechTalk released SpecFlow, a native .NET tool inspired by Cucumber. As a pure .NET solution without Ruby dependencies, SpecFlow seemed to be easier for Microsoft shops to adopt. But Cuke4Nuke had (to me) enough advantages that I kept it going. By this summer, however, it was clear that SpecFlow had made up for most of Cuke4Nuke's advantages and had more momentum in the .NET community and was under much more active development. Read More