class Raptest::Test
Attributes
errors[RW]
finished_at[RW]
processed[RW]
started_at[RW]
targets[RW]
Public Class Methods
new(*targets)
click to toggle source
# File lib/raptest/test.rb, line 8 def initialize(*targets) @targets = targets.map { |a| ::Raptest::Asset.new(a) } end
Public Instance Methods
duration()
click to toggle source
# File lib/raptest/test.rb, line 14 def duration @start_time && @end_time ? ( @end_time - @start_time ) : 0 end
run()
click to toggle source
# File lib/raptest/test.rb, line 18 def run @started_at = Time.now @errors = 0 @processed = 0 targets.each do |asset| @processed += 1 begin asset.test! rescue Exception => e @errors += 1 raise e end end @finished_at = Time.now end