class Cucumber::Messages::TestCaseStarted

Attributes

attempt[R]

*

The first attempt should have value 0, and for each retry the value
should increase by 1.
id[R]

*

Because a `TestCase` can be run multiple times (in case of a retry),
we use this field to group messages relating to the same attempt.
test_case_id[R]
timestamp[R]

Public Class Methods

from_h(hash) click to toggle source

Returns a new TestCaseStarted from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::TestCaseStarted.from_h(some_hash) # => #<Cucumber::Messages::TestCaseStarted:0x... ...>
# File lib/cucumber/messages.deserializers.rb, line 1024
def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    attempt: hash[:attempt],
    id: hash[:id],
    test_case_id: hash[:testCaseId],
    timestamp: Timestamp.from_h(hash[:timestamp]),
  )
end
new( attempt: 0, id: '', test_case_id: '', timestamp: Timestamp.new ) click to toggle source
# File lib/cucumber/messages.dtos.rb, line 1678
def initialize(
  attempt: 0,
  id: '',
  test_case_id: '',
  timestamp: Timestamp.new
)
  @attempt = attempt
  @id = id
  @test_case_id = test_case_id
  @timestamp = timestamp
end