cucumber-messages 22.0.0 → 27.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +2 -2
- data/README.md +1 -0
- data/VERSION +1 -1
- data/lib/cucumber/messages/attachment.rb +131 -0
- data/lib/cucumber/messages/attachment_content_encoding.rb +11 -0
- data/lib/cucumber/messages/background.rb +64 -0
- data/lib/cucumber/messages/ci.rb +62 -0
- data/lib/cucumber/messages/comment.rb +50 -0
- data/lib/cucumber/messages/data_table.rb +41 -0
- data/lib/cucumber/messages/doc_string.rb +51 -0
- data/lib/cucumber/messages/duration.rb +50 -0
- data/lib/cucumber/messages/envelope.rb +134 -0
- data/lib/cucumber/messages/examples.rb +74 -0
- data/lib/cucumber/messages/exception.rb +57 -0
- data/lib/cucumber/messages/feature.rb +87 -0
- data/lib/cucumber/messages/feature_child.rb +49 -0
- data/lib/cucumber/messages/gherkin_document.rb +62 -0
- data/lib/cucumber/messages/git.rb +54 -0
- data/lib/cucumber/messages/group.rb +46 -0
- data/lib/cucumber/messages/helpers/id_generator/incrementing.rb +20 -0
- data/lib/cucumber/messages/helpers/id_generator/uuid.rb +17 -0
- data/lib/cucumber/messages/helpers/id_generator.rb +4 -0
- data/lib/cucumber/messages/helpers/ndjson_to_message_enumerator.rb +30 -0
- data/lib/cucumber/messages/helpers/time_conversion.rb +31 -0
- data/lib/cucumber/messages/hook.rb +56 -0
- data/lib/cucumber/messages/hook_type.rb +15 -0
- data/lib/cucumber/messages/java_method.rb +46 -0
- data/lib/cucumber/messages/java_stack_trace_element.rb +46 -0
- data/lib/cucumber/messages/location.rb +44 -0
- data/lib/cucumber/messages/message.rb +93 -5
- data/lib/cucumber/messages/meta.rb +81 -0
- data/lib/cucumber/messages/parameter_type.rb +64 -0
- data/lib/cucumber/messages/parse_error.rb +41 -0
- data/lib/cucumber/messages/pickle.rb +107 -0
- data/lib/cucumber/messages/pickle_doc_string.rb +41 -0
- data/lib/cucumber/messages/pickle_step.rb +71 -0
- data/lib/cucumber/messages/pickle_step_argument.rb +43 -0
- data/lib/cucumber/messages/pickle_step_type.rb +13 -0
- data/lib/cucumber/messages/pickle_table.rb +36 -0
- data/lib/cucumber/messages/pickle_table_cell.rb +36 -0
- data/lib/cucumber/messages/pickle_table_row.rb +36 -0
- data/lib/cucumber/messages/pickle_tag.rb +47 -0
- data/lib/cucumber/messages/product.rb +49 -0
- data/lib/cucumber/messages/rule.rb +72 -0
- data/lib/cucumber/messages/rule_child.rb +44 -0
- data/lib/cucumber/messages/scenario.rb +74 -0
- data/lib/cucumber/messages/source.rb +63 -0
- data/lib/cucumber/messages/source_media_type.rb +11 -0
- data/lib/cucumber/messages/source_reference.rb +55 -0
- data/lib/cucumber/messages/step.rb +80 -0
- data/lib/cucumber/messages/step_definition.rb +46 -0
- data/lib/cucumber/messages/step_definition_pattern.rb +41 -0
- data/lib/cucumber/messages/step_definition_pattern_type.rb +11 -0
- data/lib/cucumber/messages/step_keyword_type.rb +14 -0
- data/lib/cucumber/messages/step_match_argument.rb +54 -0
- data/lib/cucumber/messages/step_match_arguments_list.rb +36 -0
- data/lib/cucumber/messages/table_cell.rb +49 -0
- data/lib/cucumber/messages/table_row.rb +54 -0
- data/lib/cucumber/messages/tag.rb +58 -0
- data/lib/cucumber/messages/test_case.rb +62 -0
- data/lib/cucumber/messages/test_case_finished.rb +46 -0
- data/lib/cucumber/messages/test_case_started.rb +69 -0
- data/lib/cucumber/messages/test_run_finished.rb +68 -0
- data/lib/cucumber/messages/test_run_hook_finished.rb +49 -0
- data/lib/cucumber/messages/test_run_hook_started.rb +60 -0
- data/lib/cucumber/messages/test_run_started.rb +41 -0
- data/lib/cucumber/messages/test_step.rb +74 -0
- data/lib/cucumber/messages/test_step_finished.rb +51 -0
- data/lib/cucumber/messages/test_step_result.rb +57 -0
- data/lib/cucumber/messages/test_step_result_status.rb +16 -0
- data/lib/cucumber/messages/test_step_started.rb +46 -0
- data/lib/cucumber/messages/timestamp.rb +52 -0
- data/lib/cucumber/messages/undefined_parameter_type.rb +41 -0
- data/lib/cucumber/messages.rb +9 -5
- metadata +140 -61
- data/lib/cucumber/messages/id_generator.rb +0 -24
- data/lib/cucumber/messages/message/deserialization.rb +0 -39
- data/lib/cucumber/messages/message/serialization.rb +0 -73
- data/lib/cucumber/messages/message/utils.rb +0 -46
- data/lib/cucumber/messages/ndjson_to_message_enumerator.rb +0 -21
- data/lib/cucumber/messages/time_conversion.rb +0 -33
- data/lib/cucumber/messages.deserializers.rb +0 -1207
- data/lib/cucumber/messages.dtos.rb +0 -2000
- data/spec/capture_warnings.rb +0 -74
- data/spec/cucumber/messages/acceptance_spec.rb +0 -33
- data/spec/cucumber/messages/id_generator_spec.rb +0 -29
- data/spec/cucumber/messages/message/deserialization_spec.rb +0 -30
- data/spec/cucumber/messages/message/dummy_messages.rb +0 -38
- data/spec/cucumber/messages/message/serialization_spec.rb +0 -89
- data/spec/cucumber/messages/message/utils_spec.rb +0 -30
- data/spec/cucumber/messages/ndjson_serialization_spec.rb +0 -56
- data/spec/cucumber/messages/time_conversion_spec.rb +0 -41
- data/spec/cucumber/messages/version_spec.rb +0 -11
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the StepMatchArgument message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
#
|
10
|
+
# *
|
11
|
+
# Represents a single argument extracted from a step match and passed to a step definition.
|
12
|
+
# This is used for the following purposes:
|
13
|
+
# - Construct an argument to pass to a step definition (possibly through a parameter type transform)
|
14
|
+
# - Highlight the matched parameter in rich formatters such as the HTML formatter
|
15
|
+
#
|
16
|
+
# This message closely matches the `Argument` class in the `cucumber-expressions` library.
|
17
|
+
##
|
18
|
+
class StepMatchArgument < Message
|
19
|
+
##
|
20
|
+
# *
|
21
|
+
# Represents the outermost capture group of an argument. This message closely matches the
|
22
|
+
# `Group` class in the `cucumber-expressions` library.
|
23
|
+
##
|
24
|
+
attr_reader :group
|
25
|
+
|
26
|
+
attr_reader :parameter_type_name
|
27
|
+
|
28
|
+
def initialize(
|
29
|
+
group: Group.new,
|
30
|
+
parameter_type_name: nil
|
31
|
+
)
|
32
|
+
@group = group
|
33
|
+
@parameter_type_name = parameter_type_name
|
34
|
+
super()
|
35
|
+
end
|
36
|
+
|
37
|
+
##
|
38
|
+
# Returns a new StepMatchArgument from the given hash.
|
39
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
40
|
+
# corresponding snake_cased attributes.
|
41
|
+
#
|
42
|
+
# Cucumber::Messages::StepMatchArgument.from_h(some_hash) # => #<Cucumber::Messages::StepMatchArgument:0x... ...>
|
43
|
+
##
|
44
|
+
def self.from_h(hash)
|
45
|
+
return nil if hash.nil?
|
46
|
+
|
47
|
+
new(
|
48
|
+
group: Group.from_h(hash[:group]),
|
49
|
+
parameter_type_name: hash[:parameterTypeName]
|
50
|
+
)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the StepMatchArgumentsList message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
##
|
10
|
+
class StepMatchArgumentsList < Message
|
11
|
+
attr_reader :step_match_arguments
|
12
|
+
|
13
|
+
def initialize(
|
14
|
+
step_match_arguments: []
|
15
|
+
)
|
16
|
+
@step_match_arguments = step_match_arguments
|
17
|
+
super()
|
18
|
+
end
|
19
|
+
|
20
|
+
##
|
21
|
+
# Returns a new StepMatchArgumentsList from the given hash.
|
22
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
23
|
+
# corresponding snake_cased attributes.
|
24
|
+
#
|
25
|
+
# Cucumber::Messages::StepMatchArgumentsList.from_h(some_hash) # => #<Cucumber::Messages::StepMatchArgumentsList:0x... ...>
|
26
|
+
##
|
27
|
+
def self.from_h(hash)
|
28
|
+
return nil if hash.nil?
|
29
|
+
|
30
|
+
new(
|
31
|
+
step_match_arguments: hash[:stepMatchArguments]&.map { |item| StepMatchArgument.from_h(item) }
|
32
|
+
)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TableCell message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
#
|
10
|
+
# A cell in a `TableRow`
|
11
|
+
##
|
12
|
+
class TableCell < Message
|
13
|
+
##
|
14
|
+
# The location of the cell
|
15
|
+
##
|
16
|
+
attr_reader :location
|
17
|
+
|
18
|
+
##
|
19
|
+
# The value of the cell
|
20
|
+
##
|
21
|
+
attr_reader :value
|
22
|
+
|
23
|
+
def initialize(
|
24
|
+
location: Location.new,
|
25
|
+
value: ''
|
26
|
+
)
|
27
|
+
@location = location
|
28
|
+
@value = value
|
29
|
+
super()
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
33
|
+
# Returns a new TableCell from the given hash.
|
34
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
35
|
+
# corresponding snake_cased attributes.
|
36
|
+
#
|
37
|
+
# Cucumber::Messages::TableCell.from_h(some_hash) # => #<Cucumber::Messages::TableCell:0x... ...>
|
38
|
+
##
|
39
|
+
def self.from_h(hash)
|
40
|
+
return nil if hash.nil?
|
41
|
+
|
42
|
+
new(
|
43
|
+
location: Location.from_h(hash[:location]),
|
44
|
+
value: hash[:value]
|
45
|
+
)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TableRow message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
#
|
10
|
+
# A row in a table
|
11
|
+
##
|
12
|
+
class TableRow < Message
|
13
|
+
##
|
14
|
+
# The location of the first cell in the row
|
15
|
+
##
|
16
|
+
attr_reader :location
|
17
|
+
|
18
|
+
##
|
19
|
+
# Cells in the row
|
20
|
+
##
|
21
|
+
attr_reader :cells
|
22
|
+
|
23
|
+
attr_reader :id
|
24
|
+
|
25
|
+
def initialize(
|
26
|
+
location: Location.new,
|
27
|
+
cells: [],
|
28
|
+
id: ''
|
29
|
+
)
|
30
|
+
@location = location
|
31
|
+
@cells = cells
|
32
|
+
@id = id
|
33
|
+
super()
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Returns a new TableRow from the given hash.
|
38
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
39
|
+
# corresponding snake_cased attributes.
|
40
|
+
#
|
41
|
+
# Cucumber::Messages::TableRow.from_h(some_hash) # => #<Cucumber::Messages::TableRow:0x... ...>
|
42
|
+
##
|
43
|
+
def self.from_h(hash)
|
44
|
+
return nil if hash.nil?
|
45
|
+
|
46
|
+
new(
|
47
|
+
location: Location.from_h(hash[:location]),
|
48
|
+
cells: hash[:cells]&.map { |item| TableCell.from_h(item) },
|
49
|
+
id: hash[:id]
|
50
|
+
)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the Tag message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
#
|
10
|
+
# *
|
11
|
+
# A tag
|
12
|
+
##
|
13
|
+
class Tag < Message
|
14
|
+
##
|
15
|
+
# Location of the tag
|
16
|
+
##
|
17
|
+
attr_reader :location
|
18
|
+
|
19
|
+
##
|
20
|
+
# The name of the tag (including the leading `@`)
|
21
|
+
##
|
22
|
+
attr_reader :name
|
23
|
+
|
24
|
+
##
|
25
|
+
# Unique ID to be able to reference the Tag from PickleTag
|
26
|
+
##
|
27
|
+
attr_reader :id
|
28
|
+
|
29
|
+
def initialize(
|
30
|
+
location: Location.new,
|
31
|
+
name: '',
|
32
|
+
id: ''
|
33
|
+
)
|
34
|
+
@location = location
|
35
|
+
@name = name
|
36
|
+
@id = id
|
37
|
+
super()
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Returns a new Tag from the given hash.
|
42
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
43
|
+
# corresponding snake_cased attributes.
|
44
|
+
#
|
45
|
+
# Cucumber::Messages::Tag.from_h(some_hash) # => #<Cucumber::Messages::Tag:0x... ...>
|
46
|
+
##
|
47
|
+
def self.from_h(hash)
|
48
|
+
return nil if hash.nil?
|
49
|
+
|
50
|
+
new(
|
51
|
+
location: Location.from_h(hash[:location]),
|
52
|
+
name: hash[:name],
|
53
|
+
id: hash[:id]
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TestCase message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
#
|
10
|
+
# //// TestCases
|
11
|
+
#
|
12
|
+
# *
|
13
|
+
# A `TestCase` contains a sequence of `TestStep`s.
|
14
|
+
##
|
15
|
+
class TestCase < Message
|
16
|
+
attr_reader :id
|
17
|
+
|
18
|
+
##
|
19
|
+
# The ID of the `Pickle` this `TestCase` is derived from.
|
20
|
+
##
|
21
|
+
attr_reader :pickle_id
|
22
|
+
|
23
|
+
attr_reader :test_steps
|
24
|
+
|
25
|
+
##
|
26
|
+
# Identifier for the test run that this test case belongs to
|
27
|
+
##
|
28
|
+
attr_reader :test_run_started_id
|
29
|
+
|
30
|
+
def initialize(
|
31
|
+
id: '',
|
32
|
+
pickle_id: '',
|
33
|
+
test_steps: [],
|
34
|
+
test_run_started_id: nil
|
35
|
+
)
|
36
|
+
@id = id
|
37
|
+
@pickle_id = pickle_id
|
38
|
+
@test_steps = test_steps
|
39
|
+
@test_run_started_id = test_run_started_id
|
40
|
+
super()
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Returns a new TestCase from the given hash.
|
45
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
46
|
+
# corresponding snake_cased attributes.
|
47
|
+
#
|
48
|
+
# Cucumber::Messages::TestCase.from_h(some_hash) # => #<Cucumber::Messages::TestCase:0x... ...>
|
49
|
+
##
|
50
|
+
def self.from_h(hash)
|
51
|
+
return nil if hash.nil?
|
52
|
+
|
53
|
+
new(
|
54
|
+
id: hash[:id],
|
55
|
+
pickle_id: hash[:pickleId],
|
56
|
+
test_steps: hash[:testSteps]&.map { |item| TestStep.from_h(item) },
|
57
|
+
test_run_started_id: hash[:testRunStartedId]
|
58
|
+
)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TestCaseFinished message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
##
|
10
|
+
class TestCaseFinished < Message
|
11
|
+
attr_reader :test_case_started_id
|
12
|
+
|
13
|
+
attr_reader :timestamp
|
14
|
+
|
15
|
+
attr_reader :will_be_retried
|
16
|
+
|
17
|
+
def initialize(
|
18
|
+
test_case_started_id: '',
|
19
|
+
timestamp: Timestamp.new,
|
20
|
+
will_be_retried: false
|
21
|
+
)
|
22
|
+
@test_case_started_id = test_case_started_id
|
23
|
+
@timestamp = timestamp
|
24
|
+
@will_be_retried = will_be_retried
|
25
|
+
super()
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Returns a new TestCaseFinished from the given hash.
|
30
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
31
|
+
# corresponding snake_cased attributes.
|
32
|
+
#
|
33
|
+
# Cucumber::Messages::TestCaseFinished.from_h(some_hash) # => #<Cucumber::Messages::TestCaseFinished:0x... ...>
|
34
|
+
##
|
35
|
+
def self.from_h(hash)
|
36
|
+
return nil if hash.nil?
|
37
|
+
|
38
|
+
new(
|
39
|
+
test_case_started_id: hash[:testCaseStartedId],
|
40
|
+
timestamp: Timestamp.from_h(hash[:timestamp]),
|
41
|
+
will_be_retried: hash[:willBeRetried]
|
42
|
+
)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TestCaseStarted message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
##
|
10
|
+
class TestCaseStarted < Message
|
11
|
+
##
|
12
|
+
# *
|
13
|
+
# The first attempt should have value 0, and for each retry the value
|
14
|
+
# should increase by 1.
|
15
|
+
##
|
16
|
+
attr_reader :attempt
|
17
|
+
|
18
|
+
##
|
19
|
+
# *
|
20
|
+
# Because a `TestCase` can be run multiple times (in case of a retry),
|
21
|
+
# we use this field to group messages relating to the same attempt.
|
22
|
+
##
|
23
|
+
attr_reader :id
|
24
|
+
|
25
|
+
attr_reader :test_case_id
|
26
|
+
|
27
|
+
##
|
28
|
+
# An identifier for the worker process running this test case, if test cases are being run in parallel. 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.
|
29
|
+
##
|
30
|
+
attr_reader :worker_id
|
31
|
+
|
32
|
+
attr_reader :timestamp
|
33
|
+
|
34
|
+
def initialize(
|
35
|
+
attempt: 0,
|
36
|
+
id: '',
|
37
|
+
test_case_id: '',
|
38
|
+
worker_id: nil,
|
39
|
+
timestamp: Timestamp.new
|
40
|
+
)
|
41
|
+
@attempt = attempt
|
42
|
+
@id = id
|
43
|
+
@test_case_id = test_case_id
|
44
|
+
@worker_id = worker_id
|
45
|
+
@timestamp = timestamp
|
46
|
+
super()
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# Returns a new TestCaseStarted from the given hash.
|
51
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
52
|
+
# corresponding snake_cased attributes.
|
53
|
+
#
|
54
|
+
# Cucumber::Messages::TestCaseStarted.from_h(some_hash) # => #<Cucumber::Messages::TestCaseStarted:0x... ...>
|
55
|
+
##
|
56
|
+
def self.from_h(hash)
|
57
|
+
return nil if hash.nil?
|
58
|
+
|
59
|
+
new(
|
60
|
+
attempt: hash[:attempt],
|
61
|
+
id: hash[:id],
|
62
|
+
test_case_id: hash[:testCaseId],
|
63
|
+
worker_id: hash[:workerId],
|
64
|
+
timestamp: Timestamp.from_h(hash[:timestamp])
|
65
|
+
)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TestRunFinished message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
##
|
10
|
+
class TestRunFinished < Message
|
11
|
+
##
|
12
|
+
# An informative message about the test run. Typically additional information about failure, but not necessarily.
|
13
|
+
##
|
14
|
+
attr_reader :message
|
15
|
+
|
16
|
+
##
|
17
|
+
# A test run is successful if all steps are either passed or skipped, all before/after hooks passed and no other exceptions where thrown.
|
18
|
+
##
|
19
|
+
attr_reader :success
|
20
|
+
|
21
|
+
##
|
22
|
+
# Timestamp when the TestRun is finished
|
23
|
+
##
|
24
|
+
attr_reader :timestamp
|
25
|
+
|
26
|
+
##
|
27
|
+
# Any exception thrown during the test run, if any. Does not include exceptions thrown while executing steps.
|
28
|
+
##
|
29
|
+
attr_reader :exception
|
30
|
+
|
31
|
+
attr_reader :test_run_started_id
|
32
|
+
|
33
|
+
def initialize(
|
34
|
+
message: nil,
|
35
|
+
success: false,
|
36
|
+
timestamp: Timestamp.new,
|
37
|
+
exception: nil,
|
38
|
+
test_run_started_id: nil
|
39
|
+
)
|
40
|
+
@message = message
|
41
|
+
@success = success
|
42
|
+
@timestamp = timestamp
|
43
|
+
@exception = exception
|
44
|
+
@test_run_started_id = test_run_started_id
|
45
|
+
super()
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# Returns a new TestRunFinished from the given hash.
|
50
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
51
|
+
# corresponding snake_cased attributes.
|
52
|
+
#
|
53
|
+
# Cucumber::Messages::TestRunFinished.from_h(some_hash) # => #<Cucumber::Messages::TestRunFinished:0x... ...>
|
54
|
+
##
|
55
|
+
def self.from_h(hash)
|
56
|
+
return nil if hash.nil?
|
57
|
+
|
58
|
+
new(
|
59
|
+
message: hash[:message],
|
60
|
+
success: hash[:success],
|
61
|
+
timestamp: Timestamp.from_h(hash[:timestamp]),
|
62
|
+
exception: Exception.from_h(hash[:exception]),
|
63
|
+
test_run_started_id: hash[:testRunStartedId]
|
64
|
+
)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TestRunHookFinished message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
##
|
10
|
+
class TestRunHookFinished < Message
|
11
|
+
##
|
12
|
+
# Identifier for the hook execution that has finished
|
13
|
+
##
|
14
|
+
attr_reader :test_run_hook_started_id
|
15
|
+
|
16
|
+
attr_reader :result
|
17
|
+
|
18
|
+
attr_reader :timestamp
|
19
|
+
|
20
|
+
def initialize(
|
21
|
+
test_run_hook_started_id: '',
|
22
|
+
result: TestStepResult.new,
|
23
|
+
timestamp: Timestamp.new
|
24
|
+
)
|
25
|
+
@test_run_hook_started_id = test_run_hook_started_id
|
26
|
+
@result = result
|
27
|
+
@timestamp = timestamp
|
28
|
+
super()
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Returns a new TestRunHookFinished from the given hash.
|
33
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
34
|
+
# corresponding snake_cased attributes.
|
35
|
+
#
|
36
|
+
# Cucumber::Messages::TestRunHookFinished.from_h(some_hash) # => #<Cucumber::Messages::TestRunHookFinished:0x... ...>
|
37
|
+
##
|
38
|
+
def self.from_h(hash)
|
39
|
+
return nil if hash.nil?
|
40
|
+
|
41
|
+
new(
|
42
|
+
test_run_hook_started_id: hash[:testRunHookStartedId],
|
43
|
+
result: TestStepResult.from_h(hash[:result]),
|
44
|
+
timestamp: Timestamp.from_h(hash[:timestamp])
|
45
|
+
)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TestRunHookStarted message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
##
|
10
|
+
class TestRunHookStarted < Message
|
11
|
+
##
|
12
|
+
# Unique identifier for this hook execution
|
13
|
+
##
|
14
|
+
attr_reader :id
|
15
|
+
|
16
|
+
##
|
17
|
+
# Identifier for the test run that this hook execution belongs to
|
18
|
+
##
|
19
|
+
attr_reader :test_run_started_id
|
20
|
+
|
21
|
+
##
|
22
|
+
# Identifier for the hook that will be executed
|
23
|
+
##
|
24
|
+
attr_reader :hook_id
|
25
|
+
|
26
|
+
attr_reader :timestamp
|
27
|
+
|
28
|
+
def initialize(
|
29
|
+
id: '',
|
30
|
+
test_run_started_id: '',
|
31
|
+
hook_id: '',
|
32
|
+
timestamp: Timestamp.new
|
33
|
+
)
|
34
|
+
@id = id
|
35
|
+
@test_run_started_id = test_run_started_id
|
36
|
+
@hook_id = hook_id
|
37
|
+
@timestamp = timestamp
|
38
|
+
super()
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Returns a new TestRunHookStarted from the given hash.
|
43
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
44
|
+
# corresponding snake_cased attributes.
|
45
|
+
#
|
46
|
+
# Cucumber::Messages::TestRunHookStarted.from_h(some_hash) # => #<Cucumber::Messages::TestRunHookStarted:0x... ...>
|
47
|
+
##
|
48
|
+
def self.from_h(hash)
|
49
|
+
return nil if hash.nil?
|
50
|
+
|
51
|
+
new(
|
52
|
+
id: hash[:id],
|
53
|
+
test_run_started_id: hash[:testRunStartedId],
|
54
|
+
hook_id: hash[:hookId],
|
55
|
+
timestamp: Timestamp.from_h(hash[:timestamp])
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
|
4
|
+
module Cucumber
|
5
|
+
module Messages
|
6
|
+
##
|
7
|
+
# Represents the TestRunStarted message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
8
|
+
##
|
9
|
+
##
|
10
|
+
class TestRunStarted < Message
|
11
|
+
attr_reader :timestamp
|
12
|
+
|
13
|
+
attr_reader :id
|
14
|
+
|
15
|
+
def initialize(
|
16
|
+
timestamp: Timestamp.new,
|
17
|
+
id: nil
|
18
|
+
)
|
19
|
+
@timestamp = timestamp
|
20
|
+
@id = id
|
21
|
+
super()
|
22
|
+
end
|
23
|
+
|
24
|
+
##
|
25
|
+
# Returns a new TestRunStarted from the given hash.
|
26
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
27
|
+
# corresponding snake_cased attributes.
|
28
|
+
#
|
29
|
+
# Cucumber::Messages::TestRunStarted.from_h(some_hash) # => #<Cucumber::Messages::TestRunStarted:0x... ...>
|
30
|
+
##
|
31
|
+
def self.from_h(hash)
|
32
|
+
return nil if hash.nil?
|
33
|
+
|
34
|
+
new(
|
35
|
+
timestamp: Timestamp.from_h(hash[:timestamp]),
|
36
|
+
id: hash[:id]
|
37
|
+
)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|