Hi, I'm aware of Selenium, but it operates on higher level than Rack::Test and is slower although testing mimics real world situations better as it drives a real browser. Can I find some examples of testkit somewhere?
- Vesa On 2 marras, 17:04, David Pollak <feeder.of.the.be...@gmail.com> wrote: > On Mon, Nov 2, 2009 at 7:39 AM, Jim Barrows <jim.barr...@gmail.com> wrote: > > Scala has 2 test frameworks (Specs <http://code.google.com/p/specs/>, scala > > test <http://www.artima.com/scalatest/>) that I'm aware of, and can make > > use of the selenium test framework <http://seleniumhq.org/>. > > And Lift's testkit allows you to chain HTTP requests and test the results. > > > > > You could also, I suppose use JUnit or TestNG java frameworks if you > > wanted, again with selenium. > > > On Mon, Nov 2, 2009 at 6:41 AM, Vesa <brut...@gmail.com> wrote: > > >> Hi, > > >> Ruby web apps can be tested easily with Rack::Test like on the example > >> below. Is there anything similar tfor org.specs and lift? I see the > >> lack of tutorials/documentation on testing the greatest obstacle of > >> taking lift into use. > > >> require 'hello_world' > >> require 'test/unit' > >> require 'rack/test' > > >> set :environment, :test > > >> class HelloWorldTest < Test::Unit::TestCase > >> include Rack::Test::Methods > > >> def app > >> Sinatra::Application > >> end > > >> def test_it_says_hello_world > >> get '/' > >> assert last_response.ok? > >> assert_equal 'Hello World', last_response.body > >> end > > >> def test_it_says_hello_to_a_person > >> get '/', :name => 'Simon' > >> assert last_response.body.include?('Simon') > >> end > >> end > > >> -Vesa > > > -- > > James A Barrows > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://www.apress.com/book/view/1430219890 > Follow me:http://twitter.com/dpp > Surf the harmonics --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---