class Cucumber::Messages::TestRunFinished
Represents the TestRunFinished message in Cucumberโs message protocol.
Attributes
Any exception thrown during the test run, if any. Does not include exceptions thrown while executing steps.
An informative message about the test run. Typically additional information about failure, but not necessarily.
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 when the TestRun is finished
Public Class Methods
Source
# File lib/cucumber/messages/test_run_finished.rb, line 55 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]), test_run_started_id: hash[:testRunStartedId] ) end
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... ...>
Source
# File lib/cucumber/messages/test_run_finished.rb, line 33 def initialize( message: nil, success: false, timestamp: Timestamp.new, exception: nil, test_run_started_id: nil ) @message = message @success = success @timestamp = timestamp @exception = exception @test_run_started_id = test_run_started_id super() end
Calls superclass method