class Cucumber::Messages::TestStepResult
Represents the TestStepResult message in Cucumberโs message protocol.
Attributes
Exception thrown while executing this step, if any.
An arbitrary bit of information that explains this result. If there was an exception, this should include a stringified representation of it including type, message and stack trace (the exact format will vary by platform).
Public Class Methods
Source
# File lib/cucumber/messages/test_step_result.rb, line 45 def self.from_h(hash) return nil if hash.nil? new( duration: Duration.from_h(hash[:duration]), message: hash[:message], status: hash[:status], exception: Exception.from_h(hash[:exception]) ) end
Returns a new TestStepResult from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::TestStepResult.from_h(some_hash) # => #<Cucumber::Messages::TestStepResult:0x... ...>
Source
# File lib/cucumber/messages/test_step_result.rb, line 25 def initialize( duration: Duration.new, message: nil, status: TestStepResultStatus::UNKNOWN, exception: nil ) @duration = duration @message = message @status = status @exception = exception super() end
Calls superclass method