cucumber-messages 18.0.0 → 21.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/cucumber/messages.deserializers.rb +26 -1
- data/lib/cucumber/messages.dtos.rb +148 -66
- data/spec/cucumber/messages/acceptance_spec.rb +8 -2
- metadata +31 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d775ee31d595dd6b7c67a8d6c98a84d18d6815c433b96aff25594c3cdcdd9f3
|
4
|
+
data.tar.gz: 79b5a45328fd019745e0d1fa5ce87c6df334956d5b9e8eb24a93e2ef7c0661a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1ec82690ee4b3ada7e575f5ff2dd0fb2923e95647fdb3c1960666daaac919252d4fb796a01814f1fee8250a1654d057e5ab220b9483b4d2cc398723cc648b80
|
7
|
+
data.tar.gz: 2843fa5bf6ecb13b8ec138076e563ee34bb619c2bf8fd02704357ecf37346ed38c4deb8b8fe78748d739a6dacb10dc1772356fe78a691020ac2733177cbea0d1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
21.0.1
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'cucumber/messages.dtos'
|
2
2
|
require 'json'
|
3
3
|
|
4
|
-
# The code was auto-generated by {this script}[https://github.com/cucumber/
|
4
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/jsonschema/scripts/codegen.rb]
|
5
5
|
#
|
6
6
|
|
7
7
|
module Cucumber
|
@@ -88,6 +88,26 @@ module Cucumber
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
class Exception
|
92
|
+
|
93
|
+
##
|
94
|
+
# Returns a new Exception from the given hash.
|
95
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
96
|
+
# corresponding snake_cased attributes.
|
97
|
+
#
|
98
|
+
# Cucumber::Messages::Exception.from_h(some_hash) # => #<Cucumber::Messages::Exception:0x... ...>
|
99
|
+
#
|
100
|
+
|
101
|
+
def self.from_h(hash)
|
102
|
+
return nil if hash.nil?
|
103
|
+
|
104
|
+
self.new(
|
105
|
+
type: hash[:type],
|
106
|
+
message: hash[:message],
|
107
|
+
)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
91
111
|
class GherkinDocument
|
92
112
|
|
93
113
|
##
|
@@ -354,6 +374,7 @@ module Cucumber
|
|
354
374
|
self.new(
|
355
375
|
location: Location.from_h(hash[:location]),
|
356
376
|
keyword: hash[:keyword],
|
377
|
+
keyword_type: hash[:keywordType],
|
357
378
|
text: hash[:text],
|
358
379
|
doc_string: DocString.from_h(hash[:docString]),
|
359
380
|
data_table: DataTable.from_h(hash[:dataTable]),
|
@@ -659,6 +680,7 @@ module Cucumber
|
|
659
680
|
argument: PickleStepArgument.from_h(hash[:argument]),
|
660
681
|
ast_node_ids: hash[:astNodeIds],
|
661
682
|
id: hash[:id],
|
683
|
+
type: hash[:type],
|
662
684
|
text: hash[:text],
|
663
685
|
)
|
664
686
|
end
|
@@ -1029,6 +1051,7 @@ module Cucumber
|
|
1029
1051
|
attempt: hash[:attempt],
|
1030
1052
|
id: hash[:id],
|
1031
1053
|
test_case_id: hash[:testCaseId],
|
1054
|
+
worker_id: hash[:workerId],
|
1032
1055
|
timestamp: Timestamp.from_h(hash[:timestamp]),
|
1033
1056
|
)
|
1034
1057
|
end
|
@@ -1051,6 +1074,7 @@ module Cucumber
|
|
1051
1074
|
message: hash[:message],
|
1052
1075
|
success: hash[:success],
|
1053
1076
|
timestamp: Timestamp.from_h(hash[:timestamp]),
|
1077
|
+
exception: Exception.from_h(hash[:exception]),
|
1054
1078
|
)
|
1055
1079
|
end
|
1056
1080
|
end
|
@@ -1113,6 +1137,7 @@ module Cucumber
|
|
1113
1137
|
duration: Duration.from_h(hash[:duration]),
|
1114
1138
|
message: hash[:message],
|
1115
1139
|
status: hash[:status],
|
1140
|
+
exception: Exception.from_h(hash[:exception]),
|
1116
1141
|
)
|
1117
1142
|
end
|
1118
1143
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'cucumber/messages/message'
|
2
2
|
|
3
|
-
# The code was auto-generated by {this script}[https://github.com/cucumber/
|
3
|
+
# The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/jsonschema/scripts/codegen.rb]
|
4
4
|
#
|
5
5
|
|
6
6
|
module Cucumber
|
@@ -8,7 +8,7 @@ module Cucumber
|
|
8
8
|
|
9
9
|
|
10
10
|
##
|
11
|
-
# Represents the Attachment message in Cucumber's {message protocol}[https://github.com/cucumber/
|
11
|
+
# Represents the Attachment message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
12
12
|
#
|
13
13
|
# //// Attachments (parse errors, execution errors, screenshots, links...)
|
14
14
|
#
|
@@ -41,9 +41,9 @@ module Cucumber
|
|
41
41
|
# Content encoding is *not* determined by the media type, but rather by the type
|
42
42
|
# of the object being attached:
|
43
43
|
#
|
44
|
-
# - string
|
45
|
-
# - byte array
|
46
|
-
# - stream
|
44
|
+
# - string: IDENTITY
|
45
|
+
# - byte array: BASE64
|
46
|
+
# - stream: BASE64
|
47
47
|
|
48
48
|
attr_reader :content_encoding
|
49
49
|
|
@@ -107,7 +107,7 @@ module Cucumber
|
|
107
107
|
|
108
108
|
|
109
109
|
##
|
110
|
-
# Represents the Duration message in Cucumber's {message protocol}[https://github.com/cucumber/
|
110
|
+
# Represents the Duration message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
111
111
|
#
|
112
112
|
# The structure is pretty close of the Timestamp one. For clarity, a second type
|
113
113
|
# of message is used.
|
@@ -136,7 +136,7 @@ module Cucumber
|
|
136
136
|
|
137
137
|
|
138
138
|
##
|
139
|
-
# Represents the Envelope message in Cucumber's {message protocol}[https://github.com/cucumber/
|
139
|
+
# Represents the Envelope message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
140
140
|
#
|
141
141
|
# When removing a field, replace it with reserved, rather than deleting the line.
|
142
142
|
# When adding a field, add it to the end and increment the number by one.
|
@@ -224,7 +224,35 @@ module Cucumber
|
|
224
224
|
|
225
225
|
|
226
226
|
##
|
227
|
-
# Represents the
|
227
|
+
# Represents the Exception message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
228
|
+
#
|
229
|
+
# A simplified representation of an exception
|
230
|
+
#
|
231
|
+
|
232
|
+
class Exception < ::Cucumber::Messages::Message
|
233
|
+
|
234
|
+
##
|
235
|
+
# The type of the exception that caused this result. E.g. "Error" or "org.opentest4j.AssertionFailedError"
|
236
|
+
|
237
|
+
attr_reader :type
|
238
|
+
|
239
|
+
##
|
240
|
+
# The message of exception that caused this result. E.g. expected: "a" but was: "b"
|
241
|
+
|
242
|
+
attr_reader :message
|
243
|
+
|
244
|
+
def initialize(
|
245
|
+
type: '',
|
246
|
+
message: nil
|
247
|
+
)
|
248
|
+
@type = type
|
249
|
+
@message = message
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
|
254
|
+
##
|
255
|
+
# Represents the GherkinDocument message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
228
256
|
#
|
229
257
|
# *
|
230
258
|
# The [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of a Gherkin document.
|
@@ -264,7 +292,7 @@ module Cucumber
|
|
264
292
|
|
265
293
|
|
266
294
|
##
|
267
|
-
# Represents the Background message in Cucumber's {message protocol}[https://github.com/cucumber/
|
295
|
+
# Represents the Background message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
268
296
|
#
|
269
297
|
|
270
298
|
#
|
@@ -305,7 +333,7 @@ module Cucumber
|
|
305
333
|
|
306
334
|
|
307
335
|
##
|
308
|
-
# Represents the Comment message in Cucumber's {message protocol}[https://github.com/cucumber/
|
336
|
+
# Represents the Comment message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
309
337
|
#
|
310
338
|
# *
|
311
339
|
# A comment in a Gherkin document
|
@@ -334,7 +362,7 @@ module Cucumber
|
|
334
362
|
|
335
363
|
|
336
364
|
##
|
337
|
-
# Represents the DataTable message in Cucumber's {message protocol}[https://github.com/cucumber/
|
365
|
+
# Represents the DataTable message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
338
366
|
#
|
339
367
|
|
340
368
|
#
|
@@ -356,7 +384,7 @@ module Cucumber
|
|
356
384
|
|
357
385
|
|
358
386
|
##
|
359
|
-
# Represents the DocString message in Cucumber's {message protocol}[https://github.com/cucumber/
|
387
|
+
# Represents the DocString message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
360
388
|
#
|
361
389
|
|
362
390
|
#
|
@@ -386,7 +414,7 @@ module Cucumber
|
|
386
414
|
|
387
415
|
|
388
416
|
##
|
389
|
-
# Represents the Examples message in Cucumber's {message protocol}[https://github.com/cucumber/
|
417
|
+
# Represents the Examples message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
390
418
|
#
|
391
419
|
|
392
420
|
#
|
@@ -435,7 +463,7 @@ module Cucumber
|
|
435
463
|
|
436
464
|
|
437
465
|
##
|
438
|
-
# Represents the Feature message in Cucumber's {message protocol}[https://github.com/cucumber/
|
466
|
+
# Represents the Feature message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
439
467
|
#
|
440
468
|
|
441
469
|
#
|
@@ -498,7 +526,7 @@ module Cucumber
|
|
498
526
|
|
499
527
|
|
500
528
|
##
|
501
|
-
# Represents the FeatureChild message in Cucumber's {message protocol}[https://github.com/cucumber/
|
529
|
+
# Represents the FeatureChild message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
502
530
|
#
|
503
531
|
# *
|
504
532
|
# A child node of a `Feature` node
|
@@ -525,7 +553,7 @@ module Cucumber
|
|
525
553
|
|
526
554
|
|
527
555
|
##
|
528
|
-
# Represents the Rule message in Cucumber's {message protocol}[https://github.com/cucumber/
|
556
|
+
# Represents the Rule message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
529
557
|
#
|
530
558
|
|
531
559
|
#
|
@@ -573,7 +601,7 @@ module Cucumber
|
|
573
601
|
|
574
602
|
|
575
603
|
##
|
576
|
-
# Represents the RuleChild message in Cucumber's {message protocol}[https://github.com/cucumber/
|
604
|
+
# Represents the RuleChild message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
577
605
|
#
|
578
606
|
# *
|
579
607
|
# A child node of a `Rule` node
|
@@ -596,7 +624,7 @@ module Cucumber
|
|
596
624
|
|
597
625
|
|
598
626
|
##
|
599
|
-
# Represents the Scenario message in Cucumber's {message protocol}[https://github.com/cucumber/
|
627
|
+
# Represents the Scenario message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
600
628
|
#
|
601
629
|
|
602
630
|
#
|
@@ -645,7 +673,7 @@ module Cucumber
|
|
645
673
|
|
646
674
|
|
647
675
|
##
|
648
|
-
# Represents the Step message in Cucumber's {message protocol}[https://github.com/cucumber/
|
676
|
+
# Represents the Step message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
649
677
|
#
|
650
678
|
# A step
|
651
679
|
#
|
@@ -657,8 +685,16 @@ module Cucumber
|
|
657
685
|
|
658
686
|
attr_reader :location
|
659
687
|
|
688
|
+
##
|
689
|
+
# The actual keyword as it appeared in the source.
|
690
|
+
|
660
691
|
attr_reader :keyword
|
661
692
|
|
693
|
+
##
|
694
|
+
# The test phase signalled by the keyword: Context definition (Given), Action performance (When), Outcome assertion (Then). Other keywords signal Continuation (And and But) from a prior keyword. Please note that all translations which a dialect maps to multiple keywords (`*` is in this category for all dialects), map to 'Unknown'.
|
695
|
+
|
696
|
+
attr_reader :keyword_type
|
697
|
+
|
662
698
|
attr_reader :text
|
663
699
|
|
664
700
|
attr_reader :doc_string
|
@@ -673,6 +709,7 @@ module Cucumber
|
|
673
709
|
def initialize(
|
674
710
|
location: Location.new,
|
675
711
|
keyword: '',
|
712
|
+
keyword_type: nil,
|
676
713
|
text: '',
|
677
714
|
doc_string: nil,
|
678
715
|
data_table: nil,
|
@@ -680,6 +717,7 @@ module Cucumber
|
|
680
717
|
)
|
681
718
|
@location = location
|
682
719
|
@keyword = keyword
|
720
|
+
@keyword_type = keyword_type
|
683
721
|
@text = text
|
684
722
|
@doc_string = doc_string
|
685
723
|
@data_table = data_table
|
@@ -689,7 +727,7 @@ module Cucumber
|
|
689
727
|
|
690
728
|
|
691
729
|
##
|
692
|
-
# Represents the TableCell message in Cucumber's {message protocol}[https://github.com/cucumber/
|
730
|
+
# Represents the TableCell message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
693
731
|
#
|
694
732
|
# A cell in a `TableRow`
|
695
733
|
#
|
@@ -717,7 +755,7 @@ module Cucumber
|
|
717
755
|
|
718
756
|
|
719
757
|
##
|
720
|
-
# Represents the TableRow message in Cucumber's {message protocol}[https://github.com/cucumber/
|
758
|
+
# Represents the TableRow message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
721
759
|
#
|
722
760
|
# A row in a table
|
723
761
|
#
|
@@ -749,7 +787,7 @@ module Cucumber
|
|
749
787
|
|
750
788
|
|
751
789
|
##
|
752
|
-
# Represents the Tag message in Cucumber's {message protocol}[https://github.com/cucumber/
|
790
|
+
# Represents the Tag message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
753
791
|
#
|
754
792
|
# *
|
755
793
|
# A tag
|
@@ -785,7 +823,7 @@ module Cucumber
|
|
785
823
|
|
786
824
|
|
787
825
|
##
|
788
|
-
# Represents the Hook message in Cucumber's {message protocol}[https://github.com/cucumber/
|
826
|
+
# Represents the Hook message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
789
827
|
#
|
790
828
|
|
791
829
|
#
|
@@ -815,7 +853,7 @@ module Cucumber
|
|
815
853
|
|
816
854
|
|
817
855
|
##
|
818
|
-
# Represents the Location message in Cucumber's {message protocol}[https://github.com/cucumber/
|
856
|
+
# Represents the Location message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
819
857
|
#
|
820
858
|
# *
|
821
859
|
# Points to a line and a column in a text file
|
@@ -838,7 +876,7 @@ module Cucumber
|
|
838
876
|
|
839
877
|
|
840
878
|
##
|
841
|
-
# Represents the Meta message in Cucumber's {message protocol}[https://github.com/cucumber/
|
879
|
+
# Represents the Meta message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
842
880
|
#
|
843
881
|
# *
|
844
882
|
# This message contains meta information about the environment. Consumers can use
|
@@ -894,7 +932,7 @@ module Cucumber
|
|
894
932
|
|
895
933
|
|
896
934
|
##
|
897
|
-
# Represents the Ci message in Cucumber's {message protocol}[https://github.com/cucumber/
|
935
|
+
# Represents the Ci message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
898
936
|
#
|
899
937
|
# CI environment
|
900
938
|
#
|
@@ -933,7 +971,7 @@ module Cucumber
|
|
933
971
|
|
934
972
|
|
935
973
|
##
|
936
|
-
# Represents the Git message in Cucumber's {message protocol}[https://github.com/cucumber/
|
974
|
+
# Represents the Git message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
937
975
|
#
|
938
976
|
# Information about Git, provided by the Build/CI server as environment
|
939
977
|
# variables.
|
@@ -964,7 +1002,7 @@ module Cucumber
|
|
964
1002
|
|
965
1003
|
|
966
1004
|
##
|
967
|
-
# Represents the Product message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1005
|
+
# Represents the Product message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
968
1006
|
#
|
969
1007
|
# Used to describe various properties of Meta
|
970
1008
|
#
|
@@ -992,7 +1030,7 @@ module Cucumber
|
|
992
1030
|
|
993
1031
|
|
994
1032
|
##
|
995
|
-
# Represents the ParameterType message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1033
|
+
# Represents the ParameterType message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
996
1034
|
#
|
997
1035
|
|
998
1036
|
#
|
@@ -1029,7 +1067,7 @@ module Cucumber
|
|
1029
1067
|
|
1030
1068
|
|
1031
1069
|
##
|
1032
|
-
# Represents the ParseError message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1070
|
+
# Represents the ParseError message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1033
1071
|
#
|
1034
1072
|
|
1035
1073
|
#
|
@@ -1051,7 +1089,7 @@ module Cucumber
|
|
1051
1089
|
|
1052
1090
|
|
1053
1091
|
##
|
1054
|
-
# Represents the Pickle message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1092
|
+
# Represents the Pickle message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1055
1093
|
#
|
1056
1094
|
# //// Pickles
|
1057
1095
|
#
|
@@ -1132,7 +1170,7 @@ module Cucumber
|
|
1132
1170
|
|
1133
1171
|
|
1134
1172
|
##
|
1135
|
-
# Represents the PickleDocString message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1173
|
+
# Represents the PickleDocString message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1136
1174
|
#
|
1137
1175
|
|
1138
1176
|
#
|
@@ -1154,7 +1192,7 @@ module Cucumber
|
|
1154
1192
|
|
1155
1193
|
|
1156
1194
|
##
|
1157
|
-
# Represents the PickleStep message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1195
|
+
# Represents the PickleStep message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1158
1196
|
#
|
1159
1197
|
# *
|
1160
1198
|
# An executable step
|
@@ -1175,24 +1213,33 @@ module Cucumber
|
|
1175
1213
|
|
1176
1214
|
attr_reader :id
|
1177
1215
|
|
1216
|
+
##
|
1217
|
+
# The context in which the step was specified: context (Given), action (When) or outcome (Then).
|
1218
|
+
#
|
1219
|
+
# Note that the keywords `But` and `And` inherit their meaning from prior steps and the `*` 'keyword' doesn't have specific meaning (hence Unknown)
|
1220
|
+
|
1221
|
+
attr_reader :type
|
1222
|
+
|
1178
1223
|
attr_reader :text
|
1179
1224
|
|
1180
1225
|
def initialize(
|
1181
1226
|
argument: nil,
|
1182
1227
|
ast_node_ids: [],
|
1183
1228
|
id: '',
|
1229
|
+
type: nil,
|
1184
1230
|
text: ''
|
1185
1231
|
)
|
1186
1232
|
@argument = argument
|
1187
1233
|
@ast_node_ids = ast_node_ids
|
1188
1234
|
@id = id
|
1235
|
+
@type = type
|
1189
1236
|
@text = text
|
1190
1237
|
end
|
1191
1238
|
end
|
1192
1239
|
|
1193
1240
|
|
1194
1241
|
##
|
1195
|
-
# Represents the PickleStepArgument message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1242
|
+
# Represents the PickleStepArgument message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1196
1243
|
#
|
1197
1244
|
# An optional argument
|
1198
1245
|
#
|
@@ -1214,7 +1261,7 @@ module Cucumber
|
|
1214
1261
|
|
1215
1262
|
|
1216
1263
|
##
|
1217
|
-
# Represents the PickleTable message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1264
|
+
# Represents the PickleTable message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1218
1265
|
#
|
1219
1266
|
|
1220
1267
|
#
|
@@ -1232,7 +1279,7 @@ module Cucumber
|
|
1232
1279
|
|
1233
1280
|
|
1234
1281
|
##
|
1235
|
-
# Represents the PickleTableCell message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1282
|
+
# Represents the PickleTableCell message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1236
1283
|
#
|
1237
1284
|
|
1238
1285
|
#
|
@@ -1250,7 +1297,7 @@ module Cucumber
|
|
1250
1297
|
|
1251
1298
|
|
1252
1299
|
##
|
1253
|
-
# Represents the PickleTableRow message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1300
|
+
# Represents the PickleTableRow message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1254
1301
|
#
|
1255
1302
|
|
1256
1303
|
#
|
@@ -1268,7 +1315,7 @@ module Cucumber
|
|
1268
1315
|
|
1269
1316
|
|
1270
1317
|
##
|
1271
|
-
# Represents the PickleTag message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1318
|
+
# Represents the PickleTag message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1272
1319
|
#
|
1273
1320
|
# *
|
1274
1321
|
# A tag
|
@@ -1294,7 +1341,7 @@ module Cucumber
|
|
1294
1341
|
|
1295
1342
|
|
1296
1343
|
##
|
1297
|
-
# Represents the Source message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1344
|
+
# Represents the Source message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1298
1345
|
#
|
1299
1346
|
# //// Source
|
1300
1347
|
#
|
@@ -1335,7 +1382,7 @@ module Cucumber
|
|
1335
1382
|
|
1336
1383
|
|
1337
1384
|
##
|
1338
|
-
# Represents the SourceReference message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1385
|
+
# Represents the SourceReference message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1339
1386
|
#
|
1340
1387
|
# *
|
1341
1388
|
# Points to a [Source](#io.cucumber.messages.Source) identified by `uri` and a
|
@@ -1367,7 +1414,7 @@ module Cucumber
|
|
1367
1414
|
|
1368
1415
|
|
1369
1416
|
##
|
1370
|
-
# Represents the JavaMethod message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1417
|
+
# Represents the JavaMethod message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1371
1418
|
#
|
1372
1419
|
|
1373
1420
|
#
|
@@ -1393,7 +1440,7 @@ module Cucumber
|
|
1393
1440
|
|
1394
1441
|
|
1395
1442
|
##
|
1396
|
-
# Represents the JavaStackTraceElement message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1443
|
+
# Represents the JavaStackTraceElement message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1397
1444
|
#
|
1398
1445
|
|
1399
1446
|
#
|
@@ -1419,7 +1466,7 @@ module Cucumber
|
|
1419
1466
|
|
1420
1467
|
|
1421
1468
|
##
|
1422
|
-
# Represents the StepDefinition message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1469
|
+
# Represents the StepDefinition message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1423
1470
|
#
|
1424
1471
|
|
1425
1472
|
#
|
@@ -1445,7 +1492,7 @@ module Cucumber
|
|
1445
1492
|
|
1446
1493
|
|
1447
1494
|
##
|
1448
|
-
# Represents the StepDefinitionPattern message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1495
|
+
# Represents the StepDefinitionPattern message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1449
1496
|
#
|
1450
1497
|
|
1451
1498
|
#
|
@@ -1467,7 +1514,7 @@ module Cucumber
|
|
1467
1514
|
|
1468
1515
|
|
1469
1516
|
##
|
1470
|
-
# Represents the TestCase message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1517
|
+
# Represents the TestCase message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1471
1518
|
#
|
1472
1519
|
# //// TestCases
|
1473
1520
|
#
|
@@ -1499,7 +1546,7 @@ module Cucumber
|
|
1499
1546
|
|
1500
1547
|
|
1501
1548
|
##
|
1502
|
-
# Represents the Group message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1549
|
+
# Represents the Group message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1503
1550
|
#
|
1504
1551
|
|
1505
1552
|
#
|
@@ -1525,7 +1572,7 @@ module Cucumber
|
|
1525
1572
|
|
1526
1573
|
|
1527
1574
|
##
|
1528
|
-
# Represents the StepMatchArgument message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1575
|
+
# Represents the StepMatchArgument message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1529
1576
|
#
|
1530
1577
|
# *
|
1531
1578
|
# Represents a single argument extracted from a step match and passed to a step definition.
|
@@ -1558,7 +1605,7 @@ module Cucumber
|
|
1558
1605
|
|
1559
1606
|
|
1560
1607
|
##
|
1561
|
-
# Represents the StepMatchArgumentsList message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1608
|
+
# Represents the StepMatchArgumentsList message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1562
1609
|
#
|
1563
1610
|
|
1564
1611
|
#
|
@@ -1576,7 +1623,7 @@ module Cucumber
|
|
1576
1623
|
|
1577
1624
|
|
1578
1625
|
##
|
1579
|
-
# Represents the TestStep message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1626
|
+
# Represents the TestStep message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1580
1627
|
#
|
1581
1628
|
# *
|
1582
1629
|
# A `TestStep` is derived from either a `PickleStep`
|
@@ -1626,7 +1673,7 @@ module Cucumber
|
|
1626
1673
|
|
1627
1674
|
|
1628
1675
|
##
|
1629
|
-
# Represents the TestCaseFinished message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1676
|
+
# Represents the TestCaseFinished message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1630
1677
|
#
|
1631
1678
|
|
1632
1679
|
#
|
@@ -1652,7 +1699,7 @@ module Cucumber
|
|
1652
1699
|
|
1653
1700
|
|
1654
1701
|
##
|
1655
|
-
# Represents the TestCaseStarted message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1702
|
+
# Represents the TestCaseStarted message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1656
1703
|
#
|
1657
1704
|
|
1658
1705
|
#
|
@@ -1675,24 +1722,31 @@ module Cucumber
|
|
1675
1722
|
|
1676
1723
|
attr_reader :test_case_id
|
1677
1724
|
|
1725
|
+
##
|
1726
|
+
# 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.
|
1727
|
+
|
1728
|
+
attr_reader :worker_id
|
1729
|
+
|
1678
1730
|
attr_reader :timestamp
|
1679
1731
|
|
1680
1732
|
def initialize(
|
1681
1733
|
attempt: 0,
|
1682
1734
|
id: '',
|
1683
1735
|
test_case_id: '',
|
1736
|
+
worker_id: nil,
|
1684
1737
|
timestamp: Timestamp.new
|
1685
1738
|
)
|
1686
1739
|
@attempt = attempt
|
1687
1740
|
@id = id
|
1688
1741
|
@test_case_id = test_case_id
|
1742
|
+
@worker_id = worker_id
|
1689
1743
|
@timestamp = timestamp
|
1690
1744
|
end
|
1691
1745
|
end
|
1692
1746
|
|
1693
1747
|
|
1694
1748
|
##
|
1695
|
-
# Represents the TestRunFinished message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1749
|
+
# Represents the TestRunFinished message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1696
1750
|
#
|
1697
1751
|
|
1698
1752
|
#
|
@@ -1700,16 +1754,12 @@ module Cucumber
|
|
1700
1754
|
class TestRunFinished < ::Cucumber::Messages::Message
|
1701
1755
|
|
1702
1756
|
##
|
1703
|
-
#
|
1704
|
-
# If there are undefined parameter types, the message is simply
|
1705
|
-
# "The following parameter type(s() are not defined: xxx, yyy".
|
1706
|
-
# The independent `UndefinedParameterType` messages can be used to generate
|
1707
|
-
# snippets for those parameter types.
|
1757
|
+
# An informative message about the test run. Typically additional information about failure, but not necessarily.
|
1708
1758
|
|
1709
1759
|
attr_reader :message
|
1710
1760
|
|
1711
1761
|
##
|
1712
|
-
#
|
1762
|
+
# A test run is successful if all steps are either passed or skipped, all before/after hooks passed and no other exceptions where thrown.
|
1713
1763
|
|
1714
1764
|
attr_reader :success
|
1715
1765
|
|
@@ -1718,20 +1768,27 @@ module Cucumber
|
|
1718
1768
|
|
1719
1769
|
attr_reader :timestamp
|
1720
1770
|
|
1771
|
+
##
|
1772
|
+
# Any exception thrown during the test run, if any. Does not include exceptions thrown while executing steps.
|
1773
|
+
|
1774
|
+
attr_reader :exception
|
1775
|
+
|
1721
1776
|
def initialize(
|
1722
1777
|
message: nil,
|
1723
1778
|
success: false,
|
1724
|
-
timestamp: Timestamp.new
|
1779
|
+
timestamp: Timestamp.new,
|
1780
|
+
exception: nil
|
1725
1781
|
)
|
1726
1782
|
@message = message
|
1727
1783
|
@success = success
|
1728
1784
|
@timestamp = timestamp
|
1785
|
+
@exception = exception
|
1729
1786
|
end
|
1730
1787
|
end
|
1731
1788
|
|
1732
1789
|
|
1733
1790
|
##
|
1734
|
-
# Represents the TestRunStarted message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1791
|
+
# Represents the TestRunStarted message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1735
1792
|
#
|
1736
1793
|
|
1737
1794
|
#
|
@@ -1749,7 +1806,7 @@ module Cucumber
|
|
1749
1806
|
|
1750
1807
|
|
1751
1808
|
##
|
1752
|
-
# Represents the TestStepFinished message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1809
|
+
# Represents the TestStepFinished message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1753
1810
|
#
|
1754
1811
|
|
1755
1812
|
#
|
@@ -1779,7 +1836,7 @@ module Cucumber
|
|
1779
1836
|
|
1780
1837
|
|
1781
1838
|
##
|
1782
|
-
# Represents the TestStepResult message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1839
|
+
# Represents the TestStepResult message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1783
1840
|
#
|
1784
1841
|
|
1785
1842
|
#
|
@@ -1788,24 +1845,34 @@ module Cucumber
|
|
1788
1845
|
|
1789
1846
|
attr_reader :duration
|
1790
1847
|
|
1848
|
+
##
|
1849
|
+
# An arbitrary bit of information that explains this result. This can be a stack trace of anything else.
|
1850
|
+
|
1791
1851
|
attr_reader :message
|
1792
1852
|
|
1793
1853
|
attr_reader :status
|
1794
1854
|
|
1855
|
+
##
|
1856
|
+
# Exception thrown while executing this step, if any.
|
1857
|
+
|
1858
|
+
attr_reader :exception
|
1859
|
+
|
1795
1860
|
def initialize(
|
1796
1861
|
duration: Duration.new,
|
1797
1862
|
message: nil,
|
1798
|
-
status: TestStepResultStatus::UNKNOWN
|
1863
|
+
status: TestStepResultStatus::UNKNOWN,
|
1864
|
+
exception: nil
|
1799
1865
|
)
|
1800
1866
|
@duration = duration
|
1801
1867
|
@message = message
|
1802
1868
|
@status = status
|
1869
|
+
@exception = exception
|
1803
1870
|
end
|
1804
1871
|
end
|
1805
1872
|
|
1806
1873
|
|
1807
1874
|
##
|
1808
|
-
# Represents the TestStepStarted message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1875
|
+
# Represents the TestStepStarted message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1809
1876
|
#
|
1810
1877
|
|
1811
1878
|
#
|
@@ -1831,7 +1898,7 @@ module Cucumber
|
|
1831
1898
|
|
1832
1899
|
|
1833
1900
|
##
|
1834
|
-
# Represents the Timestamp message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1901
|
+
# Represents the Timestamp message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1835
1902
|
#
|
1836
1903
|
|
1837
1904
|
#
|
@@ -1864,7 +1931,7 @@ module Cucumber
|
|
1864
1931
|
|
1865
1932
|
|
1866
1933
|
##
|
1867
|
-
# Represents the UndefinedParameterType message in Cucumber's {message protocol}[https://github.com/cucumber/
|
1934
|
+
# Represents the UndefinedParameterType message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
1868
1935
|
#
|
1869
1936
|
|
1870
1937
|
#
|
@@ -1892,6 +1959,13 @@ class Cucumber::Messages::AttachmentContentEncoding
|
|
1892
1959
|
BASE64 = 'BASE64'
|
1893
1960
|
end
|
1894
1961
|
|
1962
|
+
class Cucumber::Messages::PickleStepType
|
1963
|
+
UNKNOWN = 'Unknown'
|
1964
|
+
CONTEXT = 'Context'
|
1965
|
+
ACTION = 'Action'
|
1966
|
+
OUTCOME = 'Outcome'
|
1967
|
+
end
|
1968
|
+
|
1895
1969
|
class Cucumber::Messages::SourceMediaType
|
1896
1970
|
TEXT_X_CUCUMBER_GHERKIN_PLAIN = 'text/x.cucumber.gherkin+plain'
|
1897
1971
|
TEXT_X_CUCUMBER_GHERKIN_MARKDOWN = 'text/x.cucumber.gherkin+markdown'
|
@@ -1902,6 +1976,14 @@ class Cucumber::Messages::StepDefinitionPatternType
|
|
1902
1976
|
REGULAR_EXPRESSION = 'REGULAR_EXPRESSION'
|
1903
1977
|
end
|
1904
1978
|
|
1979
|
+
class Cucumber::Messages::StepKeywordType
|
1980
|
+
UNKNOWN = 'Unknown'
|
1981
|
+
CONTEXT = 'Context'
|
1982
|
+
ACTION = 'Action'
|
1983
|
+
OUTCOME = 'Outcome'
|
1984
|
+
CONJUNCTION = 'Conjunction'
|
1985
|
+
end
|
1986
|
+
|
1905
1987
|
class Cucumber::Messages::TestStepResultStatus
|
1906
1988
|
UNKNOWN = 'UNKNOWN'
|
1907
1989
|
PASSED = 'PASSED'
|
@@ -1,11 +1,17 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'cucumber/messages'
|
3
|
+
require 'cucumber-compatibility-kit'
|
3
4
|
|
4
5
|
module Cucumber
|
5
6
|
module Messages
|
6
7
|
describe 'messages acdeptance tests' do
|
7
|
-
|
8
|
-
|
8
|
+
ndjson_files = Dir["#{Cucumber::CompatibilityKit::examples_path}/**/*.ndjson"]
|
9
|
+
|
10
|
+
it 'must have ndjson_files as reference messages' do
|
11
|
+
expect(ndjson_files).not_to be_empty
|
12
|
+
end
|
13
|
+
|
14
|
+
ndjson_files.each do |ndjson_file|
|
9
15
|
it "deserialises and serialises messages in #{ndjson_file}" do
|
10
16
|
File.open(ndjson_file, 'r:utf-8') do |io|
|
11
17
|
io.each_line do |json|
|
metadata
CHANGED
@@ -1,15 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-messages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 21.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aslak Hellesøy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: cucumber-compatibility-kit
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '11.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 11.0.0
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '11.0'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 11.0.0
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: rake
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,11 +103,11 @@ homepage: https://github.com/cucumber/messages-ruby#readme
|
|
83
103
|
licenses:
|
84
104
|
- MIT
|
85
105
|
metadata:
|
86
|
-
bug_tracker_uri: https://github.com/cucumber/
|
87
|
-
changelog_uri: https://github.com/cucumber/
|
88
|
-
documentation_uri: https://www.rubydoc.info/github/cucumber/messages
|
106
|
+
bug_tracker_uri: https://github.com/cucumber/messages/issues
|
107
|
+
changelog_uri: https://github.com/cucumber/messages/blob/main/CHANGELOG.md
|
108
|
+
documentation_uri: https://www.rubydoc.info/github/cucumber/messages
|
89
109
|
mailing_list_uri: https://groups.google.com/forum/#!forum/cukes
|
90
|
-
source_code_uri: https://github.com/cucumber/
|
110
|
+
source_code_uri: https://github.com/cucumber/messages
|
91
111
|
post_install_message:
|
92
112
|
rdoc_options:
|
93
113
|
- "--charset=UTF-8"
|
@@ -104,18 +124,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
124
|
- !ruby/object:Gem::Version
|
105
125
|
version: '0'
|
106
126
|
requirements: []
|
107
|
-
rubygems_version: 3.
|
127
|
+
rubygems_version: 3.2.22
|
108
128
|
signing_key:
|
109
129
|
specification_version: 4
|
110
|
-
summary: cucumber-messages-
|
130
|
+
summary: cucumber-messages-21.0.1
|
111
131
|
test_files:
|
112
132
|
- spec/capture_warnings.rb
|
113
133
|
- spec/cucumber/messages/acceptance_spec.rb
|
114
|
-
- spec/cucumber/messages/
|
134
|
+
- spec/cucumber/messages/id_generator_spec.rb
|
115
135
|
- spec/cucumber/messages/message/deserialization_spec.rb
|
116
136
|
- spec/cucumber/messages/message/dummy_messages.rb
|
117
|
-
- spec/cucumber/messages/message/utils_spec.rb
|
118
137
|
- spec/cucumber/messages/message/serialization_spec.rb
|
138
|
+
- spec/cucumber/messages/message/utils_spec.rb
|
139
|
+
- spec/cucumber/messages/ndjson_serialization_spec.rb
|
119
140
|
- spec/cucumber/messages/time_conversion_spec.rb
|
120
|
-
- spec/cucumber/messages/id_generator_spec.rb
|
121
141
|
- spec/cucumber/messages/version_spec.rb
|