Or something like the Grinder. The browser gets in the way
with those sorts of testing.
-Jonathan
Either use the standard profiler with straight HTTP calls, or look into the RWB project ( ruby web benchmark ) ...
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Wood
Sent: December 13, 2005 7:10 PM
To: [email protected]
Subject: Re: [Wtr-general] Concurrent Testing using Watir.
I'd recommend RWB.
Much better for concurrent testing ...
j.
On 12/13/05, beth ferguson <[EMAIL PROTECTED]> wrote:I've been trying to write a performance test which concurrently makes
http posts. It seems to me that the example of concurrency included w/
Watir (i've included my bastardized version below), completes these
posts sequentially rather than concurrently. Am I overlooking or
misinterpreting something?
Thanks as Always-
Beth
#------------------------------------------------------
# Vsat Response
# Beth Ferguson
# 12/12/05
# Vsat Response
# Duplicate Multiple VSAT Response from MNS distribution
#-------------------------------------------------------
class VsatResponse
def getFile
$postList=Array.new
File.open("vsatResponseHttp.txt") do |file|
while line = file.gets
$postList.push(line)
end
end
return $postList
end #get file
def makePost(postList)
for x in postList do
ie = Watir:: IE.start(x)
puts x
ie.close
end
end
end
#------------------------------------------------------
# Join Vsat Response Threads to Launch them concurrently (or close to)
# Beth Ferguson
# 12/12/05
# Join and Launch Multiple VSAT Response from MNS distribution
# run the same test concurrently in separate browsers
#-------------------------------------------------------
threads = []
vSat = VsatResponse.new
$responseList=vSat.getFile
1.times do
threads << Thread.new {vSat.makePost($responseList)}
#$responseList.shift
#puts $responseList
end
threads.each {|x| x.join}
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
