class Cucumber::Messages::TestRunHookStarted
Represents the TestRunHookStarted message in Cucumber’s message protocol.
Attributes
Identifier for the hook that will be executed
Unique identifier for this hook execution
Identifier for the test run that this hook execution belongs to
An identifier for the worker process running this hook, if parallel workers are in use. The identifier will be unique per worker, but no particular format is defined - it could be an index, uuid, machine name etc - and as such should be assumed that it’s not human readable.
Public Class Methods
Source
# File lib/cucumber/messages/test_run_hook_started.rb, line 55 def self.from_h(hash) return nil if hash.nil? new( id: hash[:id], test_run_started_id: hash[:testRunStartedId], hook_id: hash[:hookId], worker_id: hash[:workerId], timestamp: Timestamp.from_h(hash[:timestamp]) ) end
Returns a new TestRunHookStarted from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::TestRunHookStarted.from_h(some_hash) # => #<Cucumber::Messages::TestRunHookStarted:0x... ...>
Source
# File lib/cucumber/messages/test_run_hook_started.rb, line 33 def initialize( id: '', test_run_started_id: '', hook_id: '', worker_id: nil, timestamp: Timestamp.new ) @id = id @test_run_started_id = test_run_started_id @hook_id = hook_id @worker_id = worker_id @timestamp = timestamp super() end
Calls superclass method