class Cucumber::Messages::TestRunFinished
Represents the TestRunFinished
message in Cucumber’s message protocol.
Attributes
exception[R]
Any exception thrown during the test run, if any. Does not include exceptions thrown while executing steps.
message[R]
An informative message about the test run. Typically additional information about failure, but not necessarily.
success[R]
A test run is successful if all steps are either passed or skipped, all before/after hooks passed and no other exceptions where thrown.
timestamp[R]
Timestamp
when the TestRun is finished
Public Class Methods
from_h(hash)
click to toggle source
Returns a new TestRunFinished
from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::TestRunFinished.from_h(some_hash) # => #<Cucumber::Messages::TestRunFinished:0x... ...>
# File lib/cucumber/messages/test_run_finished.rb, line 51 def self.from_h(hash) return nil if hash.nil? new( message: hash[:message], success: hash[:success], timestamp: Timestamp.from_h(hash[:timestamp]), exception: Exception.from_h(hash[:exception]) ) end
new( message: nil, success: false, timestamp: Timestamp.new, exception: nil )
click to toggle source
Calls superclass method
# File lib/cucumber/messages/test_run_finished.rb, line 31 def initialize( message: nil, success: false, timestamp: Timestamp.new, exception: nil ) @message = message @success = success @timestamp = timestamp @exception = exception super() end