It's worth learning. You probably should start by googling for "ruby test/unit".
The best recommendation I have is to get a good book on the subject: "Programming Ruby 2nd Edition" has an excellent section on testing (and is worth having on general principles), and Brian Marick's new book "Everyday Scripting with Ruby" is also really good. Watir itself doesn't have it's own assertion rules, most people either rely on Ruby's 'test/unit' or roll their own. If you don't want to use 'test/unit', your basic building block is a conditional statement: if <SOME CONDITION> puts "Test passed!" else puts "Test failed!" end On 1/30/07, Nathan <[EMAIL PROTECTED]> wrote: > He he, so I've written several libraries, spiders, and bots using Watir as my > interface to the web through Internet Explorer now, and I never took the time > to really get down and dirty with the basic testing stuff for which Watir was > intended. I feel silly, but I need some help. I want to write some regular > test cases right now, and I'm not really sure where to begin. First of all, > there is no concise and clear documentation available that says, "Here is the > basic structure of a test case, and this is what you need." That might be > nice in the future! What I have so far is the following: > > require "rubygems" > require "watir/testcase" > > require_gem "watir", "= 1.5.1.1145" > > include Watir > > class TC_BuyingGuides_Validation < TestCase > > def setup() > @ie = Watir::IE.start("www.vehix.com") > browse_to_buying_guides > end > > def teardown() > @ie.close > end > > def browse_to_buying_guides() > end > > def test_validateBreadCrumb() > end > > def test_validateHeader() > end > > end # End: class TC_BuyingGuides_Validation < TestCase > ******************************** > When I try and run this I get four errors, first it doesn't understand > Watir::IE, and the other errors stem from this error. Is this even the > correct structure for a test case? I feel so stupid because I've been > writing lower level stuff using Ruby and Watir for several months now, and I > can't even do this simple test case! > > Please help me :) > > Thanks, > > Nathan > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17860#17860 > _______________________________________________ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general