开发者

Using Cucumber or RSpec+Selenium to create end user documentation? [closed]

开发者 https://www.devze.com 2022-12-29 01:56 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 4 years ago.

Improve this question

Has anyone tried creating end user (potentially online, potentially to be printed) help/documentation out of your cucumber scenarios? Or taken screenshots for use in documentation using RSpec and Selenium RC's ability to do so?

For Cucumber, I'm imagining something like:

Scenario: If you want to add a link
Given I am on the edit blog post page
When I press the "add link" button
And I type in a link URL "http://stackoverflow.com"
And I click "OK"
Then the blog post should have 1 link

Translating to the documentation:

If you want to add a link, go to the edit blog post page. Press the "add link" button and type a URL, like "http://stackoverflow.com", into the link URL field. Click "OK".

Would it be worth my time to try and, for one, write something to parse my Cucumber features into documentation, and two, to write/structure my Cucumber features in such a way as to create good documentation? Would the resulting documentation end up sounding really boring without much variation in the structure?

Is there anything else out there like this idea? doxygen looks like it's more for code documentati开发者_运维知识库on than end-user documentation.

What about automatically taking screenshots? This seems like a more fruitful path-- just reuse the code that takes a screenshot when an RSpec test fails and have it take one in prescribed situations. Is there a better way to do this?


You should take a look at the cucumber-screenshot gem. It looks like it does exactly what you want--taking HTML or (if you're on a Mac) PNG screenshots of each step in your scenarios. (I was playing with my own version of this idea for a while last year. I dropped it pretty early on, so you're probably better off with cucumber-screenshot, but feel free to take anything you can use from Visible Cukes too).


I use Lowdown (http://lowdownapp.com) to communicate features back and forth with clients. The whole point of cucumber is that it's business specific, so you shouldn't have to translate it to another format for documentation. I kinda see where you're going, though.

You can use http://seleniumshots.com/ for getting screenshots from your app from the tests. I don't know if it's out of beta yet, though.


Sounds cool. Maybe you don't want some of the cucumber scenarios available to the whole world. If a developer put something sensitive, like people's names / development passwords; or a website exploit was discovered and a cucumber scenario was written to verify it was patched.

0

精彩评论

暂无评论...
验证码 换一张
取 消