Supported Step Exporter – watch your language

Posted by Marcus Hammarberg on October 8, 2010
Stats

After working intensively with SpecFlow for a while now I have experienced something that I think is common. After a while you have all the steps you need… Or rather, if you write your step regular expressions carefully you’ll end up with a little language that automates the running of your application. So if you stay within the supported language you can simply write Gherkin. In Swedish for example.

It’s really cool to write Swedish that tells what the application should do. And it does it. I wrote about that experience before. The extension of this is that non-developers soon can start to write the specs and run them without any steps needed to be developed. But to do that you’ll need to have communicate which steps are supported.

Also after a while the supported regular expressions steps can be hard to remember. Even if you wrote all of it yourself. You soon start to want some kind of documentation for the supported regular expressions of your steps. But you don’t want to write that documentation. It’s a violation to the DRY-principle in my opinion.

The coolest thing would be if SpecFlow could give you some kind of Intellisense for the steps. But until then …

I have written a small console application that searches an assembly for the Given, When and Then attributes for SpecFlow and produces a very simple HTML-page. You simply point it to the assembly with your steps and give it a filename to create. Done!

You can now give that documentation to someone who cannot write the steps themselves, and they can just all those steps.

You’ll find the small SupportedStepExporter-application here, on Github, my new friend.



Published by Marcus Hammarberg on Last updated