TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Test with Ruby not Cucumber

27 pointsby ryandotsmithover 14 years ago

4 comments

oomkillerover 14 years ago
I think you're missing the point of Cucumber (at least as I see it). While it's great if customers write cucumber scenarios and send them to you (we have one that does), that's not the main reason for it. Cucumber facilitates communication between product design and product development/engineering. Cucumber allows the people with much more domain knowledge than you look at your specs and tell you if something is awry. I think this is the biggest win with Cucumber.<p>One of our clients was dead set on having "functional specs" for every feature we implemented. With Cucumber, they can read our "functional specs" or write their own and send them to us. Then, we can use those functional specs for actual testing, rather than them just gathering dust somewhere on a wiki.<p>Finally, I do agree that some people overuse Cucumber. Cucumber should really only be used when adding new features, or when something needs the addition of communication with stakeholders. Otherwise, you should fall back to unit testing, or just normal integration testing with RSpec stories or Steak. For example, I think it's overkill to write a Cucumber test in the case of a bug. At most, you should have a Steak/RSpec story that reproduces the issue.
评论 #1671620 未加载
zachover 14 years ago
I think it's great to start (design) high-level tests in human language - in a chart, in a spreadsheet, in lines or paragraphs. Of course, in Cucumber you use structured English in a slightly inflexible way.<p>But the code should be something that you can walk through when you are running tests. This is what Cucumber is not great at. You want tests that tell a story, but the code is all in a phrasebook.<p>After some initial experience with Cucumber, I think I will switch to an old-school low-tech approach that I've used many times -- design in conversational English steps, convert those lines to comments, and write code in-between (in this case, using Steak).  The flexibility seems like a much bigger advantage than the automation Cucumber provides.
swombatover 14 years ago
You can also use Steak:<p><a href="http://jeffkreeftmeijer.com/2010/steak-because-cucumber-is-for-vegetarians/" rel="nofollow">http://jeffkreeftmeijer.com/2010/steak-because-cucumber-is-f...</a>
评论 #1667613 未加载
评论 #1668070 未加载
评论 #1667610 未加载
ryandotsmithover 14 years ago
FYI. I have updated the post with an image describing my customer's feature development process.