From: Toki Toki Date: 2008-07-25T06:01:14+09:00 Subject: Re: Simultaneously URL call, is it possible? matu wrote: > Toki Toki wrote: > >> I need to test a functionality of an application before to go in >> production environment, unfortunately it isn't a ruby application, I >> thought to use a script that will call a url 5 times simultaneously or >> at least systematically, let's say every 10 seconds, is it possible with >> ruby? Maybe using watir (but I don't think it can do simultaneus call)? >> Any hint? > > Yes. You could spawn threads and call the url from those. > %w[uri net/http].each{|l|require l} > 10.times do > Thread.new > {Net::HTTP.get_response(URI.parse('http://www.google.com/'))} > end Thanks for the answer. It's not clear the first line of your code, could you explain it? Thanks. -- Posted via http://www.ruby-forum.com/.