Tutorial :Is there a nice way to share your cucumber features with your clients?


I LOVE cucumber, my clients love it too.

As far as I know currently there isn't a nice way to share your features with your clients. Us nerds have TextMate or NetBean bundles that give us nice syntax highlighting -- my clients not so much.

What I would love is to be have something hosted at features.myclientsapp.com that would be a organized nice marked up view of the features of the application. Maybe as a bonus an overview page with % coverage, which steps are passing. Ideally this will be exposed as a Rack Engine.

If I am getting greedy -- git integration to see version control, and a way to solicit feedback from the clients.

Does anyone know of anything that does can do this? What other strategies do people have on sharing there features files with their clients/users?


I have been working on this and this is what I have come up with. Its a less known feature that cucumber can be output in pretty nice html. I have this task namespaced as part of a bigger task list that is run with rake doc:features and includes all the rdoc for the app and the README for the app, etc.

desc "runs cucumber features and outputs them to doc/cucumber as html"  task :html do     Dir.glob("features/*.feature").each do |story|      system("cucumber",              "#{story}",              "--format=html",              "-o",              "doc/cucumber/#{story.gsub(/features\/(\w*).feature/, '\1.html')}")    end  end  

then its up to you how you want to serve them up. I've been writing some tasks that hook this task in with others to build the documentation and then serve it up with the serve gem. http://github.com/jlong/serve but there are a lot of other options too. other options include running the features on a ci server and putting these feature files in a directory to be browsed, etc.

I agree with you, it would be nice if there was a dashboard page that gave pass fail, etc. and links to each feature file output, etc. If anyone would like share the workload implementing this as part of cucumber core, I would be happy to contribute. I personally think the html formatting should be more robust and part of the central cucumber feature set.


I really like this idea. What do you think about using this-fork of metric_fu that claims to combine cucumber with the rcov and other nice pretty graphs.

As far as formatting the feature themselves, I really like how Chargify uses cucumber features as documentation. They appear to wrap them in a 'pre' tag to be pre-formatted.


I just found Viewcucumber. I haven't used it yet since it currently does not support cucumber 0.10.0, but I will be monitoring it -- looks great.


I new service that looks promising is Relish

Though it is a closed beta, and I couldn't get access. But one to keep an eye on.


features2html is a script that creates a self-contained HTML file from all Cucumber feature files in a folder.

P.S. Self promotion alert :) D.S.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »