Ruby BDD for Java
-
Upload
renzo-borgatti -
Category
Technology
-
view
1.586 -
download
2
description
Transcript of Ruby BDD for Java
Ruby BDD for Java Developement
Saturday, September 20, 2008
Renzo Borgatti
Me
Java backgroundNow 100% Rails and happy :)
Twitting @reborgBlogging at http://blog.reborg.net
Test?
Unit testsSpecs (RSpec)
Integration specs (RSpec)Stories (Story Runner)
Browser based (Selenium)
DSL?
Headless: visit, click, select (Webrat)Selenium based: open, assert_title, type (Selenium on Rails)
On top of your domain: add_to_catalog, post_on_wall
What do they have in common?
Fast
Slow Integrated Slow
Isolated
Browser Based
Automated Scenarios
Integration Test
Unit Test / Specs
Other than pure Ruby
Java application (Swing, Web Service, ...)Java web application (Struts, Spring-MVC, ...)Rails front-end and Java back-end application
Main Ingredients
JRuby http://jruby.codehaus.orgWarbler http://caldersphere.rubyforge.org/warbler
RSpec http://rspec.infoBuildr (or JTestR) http://incubator.apache.org/buildr
Ribs, http://olabini.com/projects/ribs/doc
Hands-On
Where the DSL begins?
DSL on Webrat
DSL on Selenium-on-Rails
Conclusions
Ruby based BDD is possible and effective +DSLs are straightforward +
Ruby based building process +Debugging is not easy -
Proficiency in 2 languages -
Useful Links
http://dannorth.net/whats-in-a-story Dan North exaplining the story format
http://goruco2008.confreaks.com/01_helmkamp.html Bryan Helmkamp’s introduction to Story Driven Development
http://blog.davidchelimsky.net Dave Chelimsky has many introductory articles on his blog
http://www.youtube.com/watch?v=m-nwvB7Up_g Douglas Seller, building a Selenium DSL
Questions?
Maintenability effort?Story management?When to go DSL?
Duplication and overlap?How defects propagate?
Should I use specs or stories?