Can I write step definitions in Objective-C?

100 views
Skip to first unread message

Matt Di Pasquale

unread,
Mar 9, 2011, 11:43:03 PM3/9/11
to frank-...@googlegroups.com
Cause I like Objective-C, and this way, I could manipulate Core Data, use NSURLConnection, etc.

http://stackoverflow.com/questions/5255547/frank-is-it-possible-to-write-step-definitions-in-objective-c

Pete Hodgson

unread,
Mar 10, 2011, 10:04:30 PM3/10/11
to frank-...@googlegroups.com, Matt Di Pasquale
Hey Matt,

I've been letting this roll around my head a bit. It's a pretty intriguing idea.

I guess you could write a catchall step in cucumber which takes the step text and sends it over the wire to the Frank server. It might actually not be that hard to do. I'm a little skeptical that it's worth doing though, to be honest. Frank already has the ability to execute custom commands which you register on your app delegate. There's nothing to stop you using that to expose whatever test-specific functionality you care to implement in objective-C. You would need to write some wrapper step definitions on the ruby side, but no more than you'd generally do in acceptance tests anyway to bridge the gap between domain language and technical language.

My main reservation is that this writing steps in Objective-C would encourage folks to bypass their UI. One of the main benefits of a good acceptance suite is that it exercises the entire app stack from top to bottom. Bypassing the UI would degrade that effort.

Hope that makes some sense. Matt, if you're interested in trying this out then I say more power to you. I'd be happy to be proved wrong on this, and would definitely consider integrating it into the standard Frank disto.

Cheers,
Pete


On Wed, Mar 9, 2011 at 8:43 PM, Matt Di Pasquale <livelov...@gmail.com> wrote:
Cause I like Objective-C, and this way, I could manipulate Core Data, use NSURLConnection, etc.

http://stackoverflow.com/questions/5255547/frank-is-it-possible-to-write-step-definitions-in-objective-c



--
Pete Hodgson
cell: 707-206-8897
y!: phodgson_ct
skype: thepete
Reply all
Reply to author
Forward
0 new messages