aslak hellesoy
2009-Mar-25 15:08 UTC
[rspec-users] [Cucumber] ANN: Cucumber with pure Java
Big news for all Java programmers out there. Now you can use Cucumber with pure Java! That''s right, you don''t have to write a single line of Ruby! (1) All of your step definitions can be written as annotated methods in POJOs (Plain Old Java Objects). To get a taste of what this looks like, check out the simple example in the cucumber_java project on GitHub: * README for example: http://github.com/aslakhellesoy/cucumber_java/tree/271160300da5bc9275dd67624f711c5ea6913187/examples/simple * Some sample step defs: http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/src/main/java/simple/StuffSteps.java * The main page: http://github.com/aslakhellesoy/cucumber_java/tree/master By this I hope Cucumber will reach a bigger crowd. Much bigger crowd actually :-) - this will work for Scala, Clojure, Jython and all the other cool JVM languages too. (I''ll be doing something similar for .NET, which will bring Cucumber goodness to C#, F# and whatever languages run on .NET. But IronRuby must catch up on speed first). I had the pleasure of going back to visit PicoContainer - a pioneering lightweight dependency injection container I developed with Paul Hammant back in 2003. It''s still lightweight and a joy to use (relatively speaking - Java in itself isn''t joyful). Cucumber-java uses PicoContainer to instantiate the POJOs that define the annotated step definition methods, so if you''re so inclined, these classes can depend on each other via constructor DI, and PicoContainer just figures out how to instantiate the objects). So if you''re working on a Java project, have been looking at Cucumber but stayed away because of all the weird Ruby, this is your chance. Here is a cuke for Duke! (::) Aslak (::) (1) You still need a tiny bit of Ruby to register step definitions: http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/features/support/env.rb (This will hopefully go away in the future, with some better Ant and Maven support). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090325/6bc22a11/attachment.html>
On Mar 25, 2009, at 9:08 AM, aslak hellesoy wrote:> Big news for all Java programmers out there. > Now you can use Cucumber with pure Java! > > That''s right, you don''t have to write a single line of Ruby! (1) > All of your step definitions can be written as annotated methods in > POJOs (Plain Old Java Objects). > > To get a taste of what this looks like, check out the simple example > in the cucumber_java project on GitHub: > > * README for example: http://github.com/aslakhellesoy/cucumber_java/tree/271160300da5bc9275dd67624f711c5ea6913187/examples/simple > * Some sample step defs: http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/src/main/java/simple/StuffSteps.java > * The main page: http://github.com/aslakhellesoy/cucumber_java/tree/master > > By this I hope Cucumber will reach a bigger crowd. Much bigger crowd > actually :-) - this will work for Scala, Clojure, Jython and all the > other cool JVM languages too. > (I''ll be doing something similar for .NET, which will bring Cucumber > goodness to C#, F# and whatever languages run on .NET. But IronRuby > must catch up on speed first). > > I had the pleasure of going back to visit PicoContainer - a > pioneering lightweight dependency injection container I developed > with Paul Hammant back in 2003. It''s still lightweight and a joy to > use (relatively speaking - Java in itself isn''t joyful). Cucumber- > java uses PicoContainer to instantiate the POJOs that define the > annotated step definition methods, so if you''re so inclined, these > classes can depend on each other via constructor DI, and > PicoContainer just figures out how to instantiate the objects). > > So if you''re working on a Java project, have been looking at > Cucumber but stayed away because of all the weird Ruby, this is your > chance. Here is a cuke for Duke! > > (::) Aslak (::) > > (1) You still need a tiny bit of Ruby to register step definitions: http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/features/support/env.rb > (This will hopefully go away in the future, with some better Ant and > Maven support).Very cool stuff. It would be an interesting and informative exercise to take a JBehave tutorial and use Cucumber to drive out the same feature and then have a side-by-side comparison of the required step definitions. I found this JBehave tutorial which would make a good candidate for such a comparison: http://www.ryangreenhall.com/articles/bdd-by-example.html If someone doesn''t get around to this in the next couple of weeks I may take a stab at it and make a blog post of it. -Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090325/212802a7/attachment-0001.html>
Aslak Hellesøy
2009-Mar-25 18:49 UTC
[rspec-users] [Cucumber] ANN: Cucumber with pure Java
Den 25. mars. 2009 kl. 18.18 skrev Ben Mabey <ben at benmabey.com>:> > On Mar 25, 2009, at 9:08 AM, aslak hellesoy wrote: > >> Big news for all Java programmers out there. >> Now you can use Cucumber with pure Java! >> >> That''s right, you don''t have to write a single line of Ruby! (1) >> All of your step definitions can be written as annotated methods in >> POJOs (Plain Old Java Objects). >> >> To get a taste of what this looks like, check out the simple >> example in the cucumber_java project on GitHub: >> >> * README for example: http://github.com/aslakhellesoy/cucumber_java/tree/271160300da5bc9275dd67624f711c5ea6913187/examples/simple >> * Some sample step defs: http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/src/main/java/simple/StuffSteps.java >> * The main page: http://github.com/aslakhellesoy/cucumber_java/tree/master >> >> By this I hope Cucumber will reach a bigger crowd. Much bigger >> crowd actually :-) - this will work for Scala, Clojure, Jython and >> all the other cool JVM languages too. >> (I''ll be doing something similar for .NET, which will bring >> Cucumber goodness to C#, F# and whatever languages run on .NET. But >> IronRuby must catch up on speed first). >> >> I had the pleasure of going back to visit PicoContainer - a >> pioneering lightweight dependency injection container I developed >> with Paul Hammant back in 2003. It''s still lightweight and a joy to >> use (relatively speaking - Java in itself isn''t joyful). Cucumber- >> java uses PicoContainer to instantiate the POJOs that define the >> annotated step definition methods, so if you''re so inclined, these >> classes can depend on each other via constructor DI, and >> PicoContainer just figures out how to instantiate the objects). >> >> So if you''re working on a Java project, have been looking at >> Cucumber but stayed away because of all the weird Ruby, this is >> your chance. Here is a cuke for Duke! >> >> (::) Aslak (::) >> >> (1) You still need a tiny bit of Ruby to register step definitions: http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/features/support/env.rb >> (This will hopefully go away in the future, with some better Ant >> and Maven support). > > > Very cool stuff. It would be an interesting and informative > exercise to take a JBehave tutorial and use Cucumber to drive out > the same feature and then have a side-by-side comparison of the > required step definitions. I found this JBehave tutorial which > would make a good candidate for such a comparison: > http://www.ryangreenhall.com/articles/bdd-by-example.html >I skimmed it, and it looks like a great tutorial. A comparison would be very interesting. Aslak> If someone doesn''t get around to this in the next couple of weeks I > may take a stab at it and make a blog post of it. > > -Ben > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090325/1e14559b/attachment.html>
2009/3/25 Ben Mabey <ben at benmabey.com>:> > On Mar 25, 2009, at 9:08 AM, aslak hellesoy wrote: > > Big news for all Java programmers out there. > Now you can use Cucumber with pure Java! > > That''s right, you don''t have to write a single line of Ruby! (1) > All of your step definitions can be written as annotated methods in POJOs > (Plain Old Java Objects). > > To get a taste of what this looks like, check out the simple example in the > cucumber_java project on GitHub: > > * README for example: > http://github.com/aslakhellesoy/cucumber_java/tree/271160300da5bc9275dd67624f711c5ea6913187/examples/simple > * Some sample step defs: > http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/src/main/java/simple/StuffSteps.java > * The main page: http://github.com/aslakhellesoy/cucumber_java/tree/master > > By this I hope Cucumber will reach a bigger crowd. Much bigger crowd > actually :-) - this will work for Scala, Clojure, Jython and all the other > cool JVM languages too. > (I''ll be doing something similar for .NET, which will bring Cucumber > goodness to C#, F# and whatever languages run on .NET. But IronRuby must > catch up on speed first). > > I had the pleasure of going back to visit PicoContainer - a pioneering > lightweight dependency injection container I developed with Paul Hammant > back in 2003. It''s still lightweight and a joy to use (relatively speaking - > Java in itself isn''t joyful). Cucumber-java uses PicoContainer to > instantiate the POJOs that define the annotated step definition methods, so > if you''re so inclined, these classes can depend on each other via > constructor DI, and PicoContainer just figures out how to instantiate the > objects). > > So if you''re working on a Java project, have been looking at Cucumber but > stayed away because of all the weird Ruby, this is your chance. Here is a > cuke for Duke! > > (::) Aslak (::) > > (1) You still need a tiny bit of Ruby to register step definitions: > http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/features/support/env.rb > (This will hopefully go away in the future, with some better Ant and Maven > support). > > > Very cool stuff. ?It would be an interesting and informative?exercise to > take a JBehave tutorial and use Cucumber to drive out the same?feature and > then have a side-by-side comparison of the required step definitions. > found this JBehave tutorial which would make a good candidate for such a > comparison: > http://www.ryangreenhall.com/articles/bdd-by-example.html > If someone doesn''t get around to this in the next couple of weeks I may take > a stab at it and make a blog post of it.I''m assuming you mean w/Java, but I''d like to encourage folks who are learning BDD to walk through his example even with Ruby. I did that tonight and it was quite pleasant. The tutorial is small and focused, and it can be completed in not much time. However, the tutorial does leave out some implementation that you would need in order to actually complete it, but I find those sorts of things fun to figure out. Translating Ryan''s tutorial to Ruby allows you to explore writing rspec simple matchers (or full fledged matchers) if you want to go that route, and overall I found it fun to go through it and practice my own skills. I know it''s not the comparison Ben and Aslak are talking about, but for those of you who are looking for a good little tutorial to walk through and practice with, this one is pretty good if you are somewhat familiar with Cucumber, RSpec, and Ruby, -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com
Hi, None of these example links are working,can you please check? Thanks for your help, Kedar Ben Mabey-2 wrote:> > > On Mar 25, 2009, at 9:08 AM, aslak hellesoy wrote: > >> Big news for all Java programmers out there. >> Now you can use Cucumber with pure Java! >> >> That''s right, you don''t have to write a single line of Ruby! (1) >> All of your step definitions can be written as annotated methods in >> POJOs (Plain Old Java Objects). >> >> To get a taste of what this looks like, check out the simple example >> in the cucumber_java project on GitHub: >> >> * README for example: >> http://github.com/aslakhellesoy/cucumber_java/tree/271160300da5bc9275dd67624f711c5ea6913187/examples/simple >> * Some sample step defs: >> http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/src/main/java/simple/StuffSteps.java >> * The main page: >> http://github.com/aslakhellesoy/cucumber_java/tree/master >> >> By this I hope Cucumber will reach a bigger crowd. Much bigger crowd >> actually :-) - this will work for Scala, Clojure, Jython and all the >> other cool JVM languages too. >> (I''ll be doing something similar for .NET, which will bring Cucumber >> goodness to C#, F# and whatever languages run on .NET. But IronRuby >> must catch up on speed first). >> >> I had the pleasure of going back to visit PicoContainer - a >> pioneering lightweight dependency injection container I developed >> with Paul Hammant back in 2003. It''s still lightweight and a joy to >> use (relatively speaking - Java in itself isn''t joyful). Cucumber- >> java uses PicoContainer to instantiate the POJOs that define the >> annotated step definition methods, so if you''re so inclined, these >> classes can depend on each other via constructor DI, and >> PicoContainer just figures out how to instantiate the objects). >> >> So if you''re working on a Java project, have been looking at >> Cucumber but stayed away because of all the weird Ruby, this is your >> chance. Here is a cuke for Duke! >> >> (::) Aslak (::) >> >> (1) You still need a tiny bit of Ruby to register step definitions: >> http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/features/support/env.rb >> (This will hopefully go away in the future, with some better Ant and >> Maven support). > > > Very cool stuff. It would be an interesting and informative exercise > to take a JBehave tutorial and use Cucumber to drive out the same > feature and then have a side-by-side comparison of the required step > definitions. I found this JBehave tutorial which would make a good > candidate for such a comparison: > http://www.ryangreenhall.com/articles/bdd-by-example.html > > If someone doesn''t get around to this in the next couple of weeks I > may take a stab at it and make a blog post of it. > > -Ben > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- View this message in context: http://old.nabble.com/-Cucumber--ANN%3A-Cucumber-with-pure-Java-tp22704377p32042148.html Sent from the rspec-users mailing list archive at Nabble.com.
Aslak Hellesøy
2011-Jul-16 12:45 UTC
[rspec-users] [Cucumber] ANN: Cucumber with pure Java
On Jul 16, 2011, at 12:57, KWIO <kedarwaghmode at gmail.com> wrote:> > Hi, > > None of these example links are working,can you please check? >http://github.com/cucumber/cuke4duke> Thanks for your help, > Kedar > > > Ben Mabey-2 wrote: >> >> >> On Mar 25, 2009, at 9:08 AM, aslak hellesoy wrote: >> >>> Big news for all Java programmers out there. >>> Now you can use Cucumber with pure Java! >>> >>> That''s right, you don''t have to write a single line of Ruby! (1) >>> All of your step definitions can be written as annotated methods in >>> POJOs (Plain Old Java Objects). >>> >>> To get a taste of what this looks like, check out the simple example >>> in the cucumber_java project on GitHub: >>> >>> * README for example: >>> http://github.com/aslakhellesoy/cucumber_java/tree/271160300da5bc9275dd67624f711c5ea6913187/examples/simple >>> * Some sample step defs: >>> http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/src/main/java/simple/StuffSteps.java >>> * The main page: >>> http://github.com/aslakhellesoy/cucumber_java/tree/master >>> >>> By this I hope Cucumber will reach a bigger crowd. Much bigger crowd >>> actually :-) - this will work for Scala, Clojure, Jython and all the >>> other cool JVM languages too. >>> (I''ll be doing something similar for .NET, which will bring Cucumber >>> goodness to C#, F# and whatever languages run on .NET. But IronRuby >>> must catch up on speed first). >>> >>> I had the pleasure of going back to visit PicoContainer - a >>> pioneering lightweight dependency injection container I developed >>> with Paul Hammant back in 2003. It''s still lightweight and a joy to >>> use (relatively speaking - Java in itself isn''t joyful). Cucumber- >>> java uses PicoContainer to instantiate the POJOs that define the >>> annotated step definition methods, so if you''re so inclined, these >>> classes can depend on each other via constructor DI, and >>> PicoContainer just figures out how to instantiate the objects). >>> >>> So if you''re working on a Java project, have been looking at >>> Cucumber but stayed away because of all the weird Ruby, this is your >>> chance. Here is a cuke for Duke! >>> >>> (::) Aslak (::) >>> >>> (1) You still need a tiny bit of Ruby to register step definitions: >>> http://github.com/aslakhellesoy/cucumber_java/blob/271160300da5bc9275dd67624f711c5ea6913187/examples/simple/features/support/env.rb >>> (This will hopefully go away in the future, with some better Ant and >>> Maven support). >> >> >> Very cool stuff. It would be an interesting and informative exercise >> to take a JBehave tutorial and use Cucumber to drive out the same >> feature and then have a side-by-side comparison of the required step >> definitions. I found this JBehave tutorial which would make a good >> candidate for such a comparison: >> http://www.ryangreenhall.com/articles/bdd-by-example.html >> >> If someone doesn''t get around to this in the next couple of weeks I >> may take a stab at it and make a blog post of it. >> >> -Ben >> >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > -- > View this message in context: http://old.nabble.com/-Cucumber--ANN%3A-Cucumber-with-pure-Java-tp22704377p32042148.html > Sent from the rspec-users mailing list archive at Nabble.com. > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users