Class: Cucumber::Messages::TestCaseStarted
- 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
-
#attempt ⇒ Object
readonly
-
The first attempt should have value 0, and for each retry the value should increase by 1.
-
-
#id ⇒ Object
readonly
-
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 ⇒ Object
readonly
Returns the value of attribute test_case_id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new TestCaseStarted from the given hash.
Instance Method Summary collapse
-
#initialize(attempt: 0, id: '', test_case_id: '', timestamp: Timestamp.new) ⇒ TestCaseStarted
constructor
A new instance of TestCaseStarted.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(attempt: 0, id: '', test_case_id: '', timestamp: Timestamp.new) ⇒ TestCaseStarted
Returns a new instance of TestCaseStarted.
1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1680 def initialize( attempt: 0, id: '', test_case_id: '', timestamp: Timestamp.new ) @attempt = attempt @id = id @test_case_id = test_case_id @timestamp = end |
Instance Attribute Details
#attempt ⇒ Object (readonly)
*
The first attempt should have value 0, and for each retry the value
should increase by 1.
1667 1668 1669 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1667 def attempt @attempt end |
#id ⇒ Object (readonly)
*
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.
1674 1675 1676 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1674 def id @id end |
#test_case_id ⇒ Object (readonly)
Returns the value of attribute test_case_id.
1676 1677 1678 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1676 def test_case_id @test_case_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
1678 1679 1680 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1678 def @timestamp end |
Class Method Details
.from_h(hash) ⇒ Object
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... ...>
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 1025 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 |