Class: Cucumber::Messages::TestRunFinished

Inherits:
Message show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Message::Utils

included

Methods included from Message::Serialization

#to_h, #to_json

Methods included from Message::Deserialization

included

Constructor Details

#initialize(message: nil, success: false, timestamp: Timestamp.new) ⇒ TestRunFinished

Returns a new instance of TestRunFinished.



1721
1722
1723
1724
1725
1726
1727
1728
1729
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1721

def initialize(
  message: nil,
  success: false,
  timestamp: Timestamp.new
)
  @message = message
  @success = success
  @timestamp = timestamp
end

Instance Attribute Details

#messageObject (readonly)

Error message. Can be a stack trace from a failed ‘BeforeAll` or `AfterAll`.

If there are undefined parameter types, the message is simply
"The following parameter type(s() are not defined: xxx, yyy".
The independent `UndefinedParameterType` messages can be used to generate
snippets for those parameter types.


1709
1710
1711
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1709

def message
  @message
end

#successObject (readonly)

success = StrictModeEnabled ? (failed_count == 0 && ambiguous_count == 0 && undefined_count == 0 && pending_count == 0) : (failed_count == 0 && ambiguous_count == 0)



1714
1715
1716
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1714

def success
  @success
end

#timestampObject (readonly)

Timestamp when the TestRun is finished



1719
1720
1721
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1719

def timestamp
  @timestamp
end

Class Method Details

.from_h(hash) ⇒ Object

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... ...>


1047
1048
1049
1050
1051
1052
1053
1054
1055
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 1047

def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    message: hash[:message],
    success: hash[:success],
    timestamp: Timestamp.from_h(hash[:timestamp]),
  )
end