tags:

views:

92

answers:

1

The project I'm working on has gotten to the point where executable specs would be of great use. We are low on resources, but we do have someone in charge of system quality that would have time to write these specs. He is not really a programmer, which is why a framework that provides a lot of help in terms of high abstractions or possibly even a gui would be desirable.

I've been looking into cucumber and storyteller, but since I have limited experience in writing these things I'm having a hard time deciding which one is the best. I would therefore be much helped if any of you with experience in these things could give me a few pointers on how to go about doing it, and maybe even some tips of good software that will make our lives easier. Are there any concerns that I need to take into consideration when implementing this? Any known pitfalls? Or is it parhaps that executable specs are a bad idea altogether? Any input is much appreciated.

The system runs on the .Net platform, so whatever software you recommend must be compatible with this.

Thanks a bundle!

+1  A: 

Good tips for executable specs are hard to angle at non-programmers as you write is your target in your current project.

It's a dilemma as you want the tests to run but must be described as non-technical as possible.

I think that you need to reformulate the question to "How non-geeks can learn to write executable specs" or similar to that.

I want to share my findings from a recent project where I wanted to write a short smoketest (cucumber/webrat/mechanize). So the test runs cucumber with webrat, which gives a pretty non-technical interface to the spec part.

The cucumber specs then are pretty high-level (although tecnical under the hood)

However, the non-geeks have to understand some stuff about the pages in order to write the specs. For instance, often you need to look up names of search fields, buttons, etc.

TECHNICAL SETUP:

In my case, i wanted a simple-to-use, solution that non-tech people could continue to specify from a few examples. I settled for a setup based on Cucumber+Webrat+Mechanize.

This talks to an application via standard HTTP requests. (Note that this prevents me from doing javascript stuff, and is actually an advantage on the current project that has to pass government guidelines for accessibility without javascript)

Webrat has a very simple syntax for specs: "When I follow [link text]", "When I click [button]", 'Then I should see "About us:"', etc.

MY RECOMMENDATIONS TO NON-TECH people:

  1. Learn from a few examples that your geek has already incorporated in the code. Perhaps your developer has created "overview.feature" that contains 3-4 example scenarios that actually run and pass on your application

  2. Learn how to find id or name of a form field. For instance, you can use the Firefox browser with a plugin called "Firebug". Here you can activate a feature called "Inspect element" by right clicking any element in your web page.

  3. In general, try to keep your specs in a non-technical language. Resist from writing overly complex expressions just because you learn the cucumber/webrat language better. Keep in mind that your specs should be read by people who have no clue that they are reading specs that can actually execute.

If you are interested I can share my bootstrap code for this project.

Jesper Rønn-Jensen
Thank you so much for your thorough answer, it was indeed a good one.
Banang
Let me know any kind of feedback so that we can improve on these recommendations and better avoid pitfalls in the future
Jesper Rønn-Jensen