Live data from Hacker News

Salad? Gimme Steak. (Moving off Cucumber for acceptance tests)

cmdrkeene.tumblr.com

11–17 of 17 posts

Re: Salad? Gimme Steak. (Moving off Cucumber for acceptance tests)

#11

How much longer until Steak gets a nifty DSL so it looks like Cucumber again, maybe they'll call it Zucchini this time. Ruby seems to be playing with fire a little bit here, similar to the insanity that happened with Java and XML. Java programs can't handle some edge case, program becomes configurable with XML, huge win. Then XML goes way too far, people start disliking XML, Java falls from grace. Ruby programs are s…

Steak doesn't want to be cucumber at all. It's plain ruby. The "DSL" aspects of the library are purely for legibility and structure. The keywords feature, background, scenario perform the exact same function as the RSpec keywords describe, before, and it respectively.

All steak does is provide a structure for acceptance tests and loop in a web automation driver (capybara).

Far less magical than parsing a the magic language of "Gherkin"

Re: Salad? Gimme Steak. (Moving off Cucumber for acceptance tests)

#12
post #8

My strategy for dealing with all these ruby testing fads is to just keep on plugging away with good old Test::Unit and avoid the churn all together. It takes about two minutes to teach somebody how to read asserts and then you're done.

" ... all these ruby testing fads "

What makes something a fad or not?

Re: Salad? Gimme Steak. (Moving off Cucumber for acceptance tests)

#13

How much longer until Steak gets a nifty DSL so it looks like Cucumber again, maybe they'll call it Zucchini this time. Ruby seems to be playing with fire a little bit here, similar to the insanity that happened with Java and XML. Java programs can't handle some edge case, program becomes configurable with XML, huge win. Then XML goes way too far, people start disliking XML, Java falls from grace. Ruby programs are s…

"Ruby programs are somewhat cumbersome"

How so?

Re: Salad? Gimme Steak. (Moving off Cucumber for acceptance tests)

#14
post #8

My strategy for dealing with all these ruby testing fads is to just keep on plugging away with good old Test::Unit and avoid the churn all together. It takes about two minutes to teach somebody how to read asserts and then you're done.

" ... all these ruby testing fads " What makes something a fad or not?

When everybody claiming it's the next big thing decides six months later that it's too cumbersome and complicated and must immediately be replaced with the next shiny new thing. The ruby community seems to suffer from an acute case of magpie syndrome.

Re: Salad? Gimme Steak. (Moving off Cucumber for acceptance tests)

#15
post #9

I've used cucumber for several years and love it. The author raises these issues: a) Organization of steps in a huge project is hard. b) Complex quoting is hard c) Token links in e-mail are hard d) Manual poking of background jobs is hard As a Cucumber user I've run into some of these. a) Step Organization: In large projects, this is indeed difficult. I would love an os x app that could search step definitions. On th…

To your issues:

1) Yeah, organization is crazy. I think the method comparison is a bit unfair though. In theory, each step should be easily identifiable (like a method) but this is rarely the case given that most steps have complex regex matching (sometimes for grammatical niceness - e.g. (a vs. an), sometimes for other crazy town reasons). This makes not only automated indexing difficult (RubyMine tries...) but trying to keep hundreds of steps in your head is pretty hard. Especially one's you probably didn't write.

The cool thing about steak is that helpers and "reusable steps" are actually just methods! Hello ctags :D

b) Our case was:

  And the user "212-555-1234" should receive a text with:
    | Some "double quoted" and 'single quoted' text |
Definitely possible in cucumber, but I prefer a string equality assertion:

  text.should == "..." (you have to do this anyway in the step_definition)
c) Ben Maeby's email_spec is awesome and provides some steps for clicking on links in email. I still use the library in steak (just the raw rspec matchers though).

The trouble is you have a url:

  http://coolsite.org/something/abcde22424aw3324234
The matcher provided says:

I click on the link "Link Title or URL". Since the token is random every time (unless you stub it, which is kinda out of the spirit of acceptance testing, but that's another debate) it's hard to say "Click on the link with the big ass token in it".

You can definitely write a step like:

  And I visit the account confirmation link
Again, a matter of preference for abstracting the step with one-time use, highly coupled text to code vs. a comment and the code together. The actual mechanics are the same in both systems, it's just that cucumber hides them in a one-time use step away from the actual feature whereas the steak is inline.

d) Similar to the above, the catch all step can work in cucumber. Though, in a few scenarios, it's desirable to run only specific jobs or more often in our case, to check if jobs are scheduled in a specific way. It avoids the weird scenario of writing a step definition like "And I run only the blah jobs" or "And a blah job should be scheduled with ...". Ideally the job system would be decoupled entirely from the acceptance test, but we can't all do cool stuff like this all the time: http://corner.squareup.com/2010/08/cucumber-and-resque.html

Re: Salad? Gimme Steak. (Moving off Cucumber for acceptance tests)

#16

Earlier quoted context omitted.

" ... all these ruby testing fads " What makes something a fad or not?

When everybody claiming it's the next big thing decides six months later that it's too cumbersome and complicated and must immediately be replaced with the next shiny new thing. The ruby community seems to suffer from an acute case of magpie syndrome.

[deleted]

Re: Salad? Gimme Steak. (Moving off Cucumber for acceptance tests)

#17

Earlier quoted context omitted.

" ... all these ruby testing fads " What makes something a fad or not?

When everybody claiming it's the next big thing decides six months later that it's too cumbersome and complicated and must immediately be replaced with the next shiny new thing. The ruby community seems to suffer from an acute case of magpie syndrome.

Sometimes it's magpie syndrome, sometimes it's born out of a real need or deficiency in real systems. Kaizen (http://en.wikipedia.org/wiki/Kaizen) is a theme I see on a lot of good ruby teams. People should always be looking to improve things but for real reasons, not for novelty. It's a fine line to draw sometimes, but in my opinion, steak eliminates a lot of the pain of cucumber by using tools my team already knows. Seems like a win to me.
Post reply on HN