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