gauge-ruby 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_pb.rb +182 -0
- data/lib/connector.rb +2 -2
- data/lib/executor.rb +19 -17
- data/lib/gauge_runtime.rb +21 -15
- data/lib/lsp_pb.rb +16 -0
- data/lib/lsp_server.rb +78 -0
- data/lib/lsp_services_pb.rb +51 -0
- data/lib/message_processor.rb +24 -22
- data/lib/messages_pb.rb +296 -0
- data/lib/method_cache.rb +1 -1
- data/lib/processors/cache_file_processor.rb +15 -10
- data/lib/processors/datastore_init_processor.rb +4 -4
- data/lib/processors/execution_handler.rb +6 -5
- data/lib/processors/execution_hook_processors.rb +1 -1
- data/lib/processors/implementation_file_list_processor.rb +6 -2
- data/lib/processors/implementation_glob_pattern_processor.rb +36 -0
- data/lib/processors/refactor_step_request_processor.rb +13 -7
- data/lib/processors/step_name_request_processor.rb +14 -12
- data/lib/processors/step_names_request_processor.rb +8 -4
- data/lib/processors/step_positions_request_processor.rb +7 -3
- data/lib/processors/step_validation_request_processor.rb +23 -18
- data/lib/processors/stub_implementation_processor.rb +9 -4
- data/lib/spec_pb.rb +226 -0
- metadata +37 -5
- data/lib/api.pb.rb +0 -273
- data/lib/messages.pb.rb +0 -413
- data/lib/spec.pb.rb +0 -319
@@ -22,15 +22,15 @@ module Gauge
|
|
22
22
|
module Processors
|
23
23
|
def process_datastore_init(message)
|
24
24
|
case message.messageType
|
25
|
-
when
|
25
|
+
when :SuiteDataStoreInit
|
26
26
|
DataStoreFactory.suite_datastore.clear
|
27
|
-
when
|
27
|
+
when :SpecDataStoreInit
|
28
28
|
DataStoreFactory.spec_datastore.clear
|
29
|
-
when
|
29
|
+
when :ScenarioDataStoreInit
|
30
30
|
DataStoreFactory.scenario_datastore.clear
|
31
31
|
end
|
32
32
|
execution_status_response = Messages::ExecutionStatusResponse.new(:executionResult => Messages::ProtoExecutionResult.new(:failed => false, :executionTime => 0))
|
33
|
-
Messages::Message.new(:messageType =>
|
33
|
+
Messages::Message.new(:messageType => :ExecutionStatusResponse, :messageId => message.messageId, :executionStatusResponse => execution_status_response)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -33,7 +33,7 @@ module Gauge
|
|
33
33
|
|
34
34
|
def handle_pass(message, execution_time)
|
35
35
|
execution_status_response = Messages::ExecutionStatusResponse.new(:executionResult => Messages::ProtoExecutionResult.new(:failed => false, :executionTime => execution_time))
|
36
|
-
Messages::Message.new(:messageType =>
|
36
|
+
Messages::Message.new(:messageType => :ExecutionStatusResponse, :messageId => message.messageId, :executionStatusResponse => execution_status_response)
|
37
37
|
end
|
38
38
|
|
39
39
|
def handle_failure(message, exception, execution_time, recoverable)
|
@@ -48,9 +48,10 @@ module Gauge
|
|
48
48
|
:recoverableError => recoverable,
|
49
49
|
:errorMessage => exception.message,
|
50
50
|
:stackTrace => code_snippet + stacktrace,
|
51
|
-
:executionTime => execution_time
|
52
|
-
|
53
|
-
|
51
|
+
:executionTime => execution_time))
|
52
|
+
screenshot = screenshot_bytes
|
53
|
+
execution_status_response.executionResult.screenShot = screenshot if !screenshot.nil?
|
54
|
+
Messages::Message.new(:messageType => :ExecutionStatusResponse,
|
54
55
|
:messageId => message.messageId, :executionStatusResponse => execution_status_response)
|
55
56
|
end
|
56
57
|
|
@@ -77,7 +78,7 @@ module Gauge
|
|
77
78
|
def create_param_values parameters
|
78
79
|
params = []
|
79
80
|
parameters.each do |param|
|
80
|
-
if ((param.parameterType ==
|
81
|
+
if ((param.parameterType == :Table) ||(param.parameterType == :Special_Table))
|
81
82
|
gtable = Gauge::Table.new(param.table)
|
82
83
|
params.push gtable
|
83
84
|
else
|
@@ -57,7 +57,7 @@ module Gauge
|
|
57
57
|
|
58
58
|
def process_step_execution_end_request(message)
|
59
59
|
response = handle_hooks_execution(MethodCache.get_after_step_hooks, message, message.stepExecutionEndingRequest.currentExecutionInfo)
|
60
|
-
response.executionStatusResponse.executionResult.message = Gauge::GaugeMessages.instance.get
|
60
|
+
response.executionStatusResponse.executionResult.message = Google::Protobuf::RepeatedField.new(:string, Gauge::GaugeMessages.instance.get)
|
61
61
|
return response
|
62
62
|
end
|
63
63
|
end
|
@@ -20,10 +20,14 @@ require_relative '../util'
|
|
20
20
|
module Gauge
|
21
21
|
module Processors
|
22
22
|
def process_implementation_file_list_request(message)
|
23
|
+
r = implementation_files()
|
24
|
+
Messages::Message.new(:messageType => :ImplementationFileListResponse, :messageId => message.messageId, :implementationFileListResponse => r)
|
25
|
+
end
|
26
|
+
|
27
|
+
def implementation_files()
|
23
28
|
implPath = Util.get_step_implementation_dir
|
24
29
|
fileList = Dir["#{implPath}/**/*.rb"]
|
25
|
-
|
26
|
-
Messages::Message.new(:messageType => Messages::Message::MessageType::ImplementationFileListResponse, :messageId => message.messageId, :implementationFileListResponse => r)
|
30
|
+
Messages::ImplementationFileListResponse.new(:implementationFilePaths => fileList)
|
27
31
|
end
|
28
32
|
end
|
29
33
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Copyright 2018 ThoughtWorks, Inc.
|
2
|
+
|
3
|
+
# This file is part of Gauge-Ruby.
|
4
|
+
|
5
|
+
# Gauge-Ruby is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
|
10
|
+
# Gauge-Ruby is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU General Public License for more details.
|
14
|
+
|
15
|
+
# You should have received a copy of the GNU General Public License
|
16
|
+
# along with Gauge-Ruby. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
require_relative '../util'
|
19
|
+
|
20
|
+
module Gauge
|
21
|
+
module Processors
|
22
|
+
def process_implementation_glob_pattern_request(message)
|
23
|
+
r = implementation_glob_pattern_response
|
24
|
+
Messages::Message.new(
|
25
|
+
messageType: Messages::Message::MessageType::ImplementationFileGlobPatternResponse,
|
26
|
+
messageId: message.messageId,
|
27
|
+
implementationFileGlobPatternResponse: r
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
def implementation_glob_pattern_response
|
32
|
+
implPath = Util.get_step_implementation_dir
|
33
|
+
Messages::ImplementationFileGlobPatternResponse.new(globPatterns: ["#{implPath}/**/*.rb"])
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -21,19 +21,25 @@ module Gauge
|
|
21
21
|
module Processors
|
22
22
|
def refactor_step(message)
|
23
23
|
request = message.refactorRequest
|
24
|
-
|
24
|
+
response = refactor_response(request)
|
25
|
+
Messages::Message.new(messageType: :RefactorResponse, messageId: message.messageId, refactorResponse: response)
|
26
|
+
end
|
27
|
+
|
28
|
+
def refactor_response(request)
|
29
|
+
response = Messages::RefactorResponse.new(success: true)
|
25
30
|
begin
|
26
31
|
step_info = get_step request.oldStepValue.stepValue
|
27
32
|
refactored_code = CodeParser.refactor step_info, request.paramPositions, request.newStepValue
|
28
33
|
file = step_info[:locations][0][:file]
|
29
34
|
File.write file, refactored_code if request.saveChanges
|
30
|
-
|
31
|
-
|
35
|
+
response.filesChanged.push(file)
|
36
|
+
changes = Messages::FileChanges.new(fileName: file, fileContent: refactored_code)
|
37
|
+
response.fileChanges.push(changes)
|
32
38
|
rescue Exception => e
|
33
|
-
|
34
|
-
|
39
|
+
response.success = false
|
40
|
+
response.error = e.message
|
35
41
|
end
|
36
|
-
|
42
|
+
response
|
37
43
|
end
|
38
44
|
|
39
45
|
def get_step(step_text)
|
@@ -42,4 +48,4 @@ module Gauge
|
|
42
48
|
MethodCache.get_step_info(step_text)
|
43
49
|
end
|
44
50
|
end
|
45
|
-
end
|
51
|
+
end
|
@@ -18,18 +18,20 @@
|
|
18
18
|
module Gauge
|
19
19
|
module Processors
|
20
20
|
def process_step_name_request(message)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
Messages::
|
29
|
-
else
|
30
|
-
r = Messages::StepNameResponse.new(isStepPresent: false, stepName: [''], hasAlias: false, fileName: '', span: nil)
|
31
|
-
Messages::Message.new(:messageType => Messages::Message::MessageType::StepNameResponse, :messageId => message.messageId, :stepNameResponse => r)
|
21
|
+
r = step_name_response(message.stepNameRequest)
|
22
|
+
Messages::Message.new(messageType: :StepNameResponse, messageId: message.messageId, stepNameResponse: r)
|
23
|
+
end
|
24
|
+
|
25
|
+
def step_name_response(request)
|
26
|
+
step_value = request.stepValue
|
27
|
+
unless MethodCache.valid_step?(step_value)
|
28
|
+
return Messages::StepNameResponse.new(isStepPresent: false, stepName: [''], hasAlias: false, fileName: '', span: nil)
|
32
29
|
end
|
30
|
+
step_text = MethodCache.get_step_text(step_value)
|
31
|
+
has_alias = MethodCache.has_alias?(step_text)
|
32
|
+
loc = MethodCache.get_step_info(step_value)[:locations][0]
|
33
|
+
span = Gauge::Messages::Span.new(start: loc[:span].begin.line, end: loc[:span].end.line, startChar: loc[:span].begin.column, endChar: loc[:span].end.column)
|
34
|
+
Messages::StepNameResponse.new(isStepPresent: true, stepName: [step_text], hasAlias: has_alias, fileName: loc[:file], span: span)
|
33
35
|
end
|
34
36
|
end
|
35
|
-
end
|
37
|
+
end
|
@@ -18,9 +18,13 @@
|
|
18
18
|
module Gauge
|
19
19
|
module Processors
|
20
20
|
def process_step_names_request(message)
|
21
|
-
|
22
|
-
Messages::Message.new(:
|
23
|
-
|
21
|
+
r = step_names_response
|
22
|
+
Messages::Message.new(messageType: :StepNamesResponse,
|
23
|
+
messageId: message.messageId, stepNamesResponse: r)
|
24
|
+
end
|
25
|
+
|
26
|
+
def step_names_response
|
27
|
+
Messages::StepNamesResponse.new(steps: MethodCache.all_steps)
|
24
28
|
end
|
25
29
|
end
|
26
|
-
end
|
30
|
+
end
|
@@ -18,11 +18,15 @@
|
|
18
18
|
module Gauge
|
19
19
|
module Processors
|
20
20
|
def process_step_positions_request(message)
|
21
|
-
|
21
|
+
r = step_positions(message.stepPositionsRequest)
|
22
|
+
Messages::Message.new(:messageType => :StepPositionsResponse, :messageId => message.messageId, :stepPositionsResponse => r)
|
23
|
+
end
|
24
|
+
|
25
|
+
def step_positions(request)
|
26
|
+
file = request.filePath
|
22
27
|
positions = MethodCache.step_positions(file)
|
23
28
|
p = create_step_position_messages(positions)
|
24
|
-
|
25
|
-
Messages::Message.new(:messageType => Messages::Message::MessageType::StepPositionsResponse, :messageId => message.messageId, :stepPositionsResponse => r)
|
29
|
+
Messages::StepPositionsResponse.new(:stepPositions => p)
|
26
30
|
end
|
27
31
|
|
28
32
|
def create_step_position_messages(positions)
|
@@ -19,31 +19,36 @@ module Gauge
|
|
19
19
|
module Processors
|
20
20
|
def process_step_validation_request(message)
|
21
21
|
request = message.stepValidateRequest
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
Messages::Message.new(messageType: :StepValidateResponse,
|
23
|
+
messageId: message.messageId,
|
24
|
+
stepValidateResponse: step_validate_response(request))
|
25
|
+
end
|
26
|
+
|
27
|
+
def step_validate_response(request)
|
28
|
+
response = Messages::StepValidateResponse.new(isValid: true)
|
25
29
|
if !MethodCache.valid_step? request.stepText
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
+
suggestion = request.stepValue.stepValue.empty? ? '' : create_suggestion(request.stepValue)
|
31
|
+
response = Messages::StepValidateResponse.new(
|
32
|
+
isValid: false,
|
33
|
+
errorMessage: 'Step implementation not found',
|
34
|
+
errorType: Messages::StepValidateResponse::ErrorType::STEP_IMPLEMENTATION_NOT_FOUND,
|
35
|
+
suggestion: suggestion
|
36
|
+
)
|
30
37
|
elsif MethodCache.multiple_implementation?(request.stepText)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
38
|
+
response = Messages::StepValidateResponse.new(
|
39
|
+
isValid: false,
|
40
|
+
errorMessage: "Multiple step implementations found for => '#{request.stepText}'",
|
41
|
+
errorType: Messages::StepValidateResponse::ErrorType::DUPLICATE_STEP_IMPLEMENTATION
|
42
|
+
)
|
35
43
|
end
|
36
|
-
|
37
|
-
Messages::Message.new(:messageType => Messages::Message::MessageType::StepValidateResponse,
|
38
|
-
:messageId => message.messageId,
|
39
|
-
:stepValidateResponse => step_validate_response)
|
44
|
+
response
|
40
45
|
end
|
41
46
|
|
42
47
|
def create_suggestion(step_value)
|
43
48
|
count = -1
|
44
|
-
step_text = step_value.stepValue.gsub(/{}/) {"<arg#{count += 1}>"}
|
45
|
-
params = step_value.parameters.map.with_index {|
|
49
|
+
step_text = step_value.stepValue.gsub(/{}/) { "<arg#{count += 1}>" }
|
50
|
+
params = step_value.parameters.map.with_index { |_v, i| "arg#{i}" }.join ', '
|
46
51
|
"step '#{step_text}' do |#{params}|\n\traise 'Unimplemented Step'\nend"
|
47
52
|
end
|
48
53
|
end
|
49
|
-
end
|
54
|
+
end
|
@@ -20,8 +20,13 @@ require_relative '../../lib/util'
|
|
20
20
|
module Gauge
|
21
21
|
module Processors
|
22
22
|
def process_stub_implementation_code_request(message)
|
23
|
-
|
24
|
-
|
23
|
+
file_diff = implement_stub_response(message.stubImplementationCodeRequest)
|
24
|
+
Messages::Message.new(messageType: :FileDiff, messageId: message.messageId, fileDiff: file_diff)
|
25
|
+
end
|
26
|
+
|
27
|
+
def implement_stub_response(request)
|
28
|
+
codes = request.codes
|
29
|
+
file_path = request.implementationFilePath
|
25
30
|
content = ''
|
26
31
|
if File.file? file_path
|
27
32
|
content = File.read(file_path)
|
@@ -29,10 +34,10 @@ module Gauge
|
|
29
34
|
file_path = Util.get_file_name
|
30
35
|
end
|
31
36
|
text_diffs = [Messages::TextDiff.new(span: create_span(content, codes), content: codes.join("\n"))]
|
32
|
-
|
33
|
-
Messages::Message.new(messageType: Messages::Message::MessageType::FileDiff, messageId: message.messageId, fileDiff: file_diff)
|
37
|
+
Messages::FileDiff.new(filePath: file_path, textDiffs: text_diffs)
|
34
38
|
end
|
35
39
|
|
40
|
+
private
|
36
41
|
def create_span(content, codes)
|
37
42
|
unless content.empty?
|
38
43
|
eof_char = content.strip.length == content.length ? "\n" : ''
|
data/lib/spec_pb.rb
ADDED
@@ -0,0 +1,226 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: spec.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "gauge.messages.ProtoSpec" do
|
8
|
+
optional :specHeading, :string, 1
|
9
|
+
repeated :items, :message, 2, "gauge.messages.ProtoItem"
|
10
|
+
optional :isTableDriven, :bool, 3
|
11
|
+
repeated :preHookFailures, :message, 4, "gauge.messages.ProtoHookFailure"
|
12
|
+
repeated :postHookFailures, :message, 5, "gauge.messages.ProtoHookFailure"
|
13
|
+
optional :fileName, :string, 6
|
14
|
+
repeated :tags, :string, 7
|
15
|
+
repeated :preHookMessages, :string, 8
|
16
|
+
repeated :postHookMessages, :string, 9
|
17
|
+
repeated :preHookMessage, :string, 10
|
18
|
+
repeated :postHookMessage, :string, 11
|
19
|
+
end
|
20
|
+
add_message "gauge.messages.ProtoItem" do
|
21
|
+
optional :itemType, :enum, 1, "gauge.messages.ProtoItem.ItemType"
|
22
|
+
optional :step, :message, 2, "gauge.messages.ProtoStep"
|
23
|
+
optional :concept, :message, 3, "gauge.messages.ProtoConcept"
|
24
|
+
optional :scenario, :message, 4, "gauge.messages.ProtoScenario"
|
25
|
+
optional :tableDrivenScenario, :message, 5, "gauge.messages.ProtoTableDrivenScenario"
|
26
|
+
optional :comment, :message, 6, "gauge.messages.ProtoComment"
|
27
|
+
optional :table, :message, 7, "gauge.messages.ProtoTable"
|
28
|
+
optional :tags, :message, 8, "gauge.messages.ProtoTags"
|
29
|
+
end
|
30
|
+
add_enum "gauge.messages.ProtoItem.ItemType" do
|
31
|
+
value :Step, 0
|
32
|
+
value :Comment, 1
|
33
|
+
value :Concept, 2
|
34
|
+
value :Scenario, 3
|
35
|
+
value :TableDrivenScenario, 4
|
36
|
+
value :Table, 5
|
37
|
+
value :Tags, 6
|
38
|
+
end
|
39
|
+
add_message "gauge.messages.ProtoScenario" do
|
40
|
+
optional :scenarioHeading, :string, 1
|
41
|
+
optional :failed, :bool, 2
|
42
|
+
repeated :contexts, :message, 3, "gauge.messages.ProtoItem"
|
43
|
+
repeated :scenarioItems, :message, 4, "gauge.messages.ProtoItem"
|
44
|
+
optional :preHookFailure, :message, 5, "gauge.messages.ProtoHookFailure"
|
45
|
+
optional :postHookFailure, :message, 6, "gauge.messages.ProtoHookFailure"
|
46
|
+
repeated :tags, :string, 7
|
47
|
+
optional :executionTime, :int64, 8
|
48
|
+
optional :skipped, :bool, 9
|
49
|
+
repeated :skipErrors, :string, 10
|
50
|
+
optional :ID, :string, 11
|
51
|
+
repeated :tearDownSteps, :message, 12, "gauge.messages.ProtoItem"
|
52
|
+
optional :span, :message, 13, "gauge.messages.Span"
|
53
|
+
optional :executionStatus, :enum, 14, "gauge.messages.ExecutionStatus"
|
54
|
+
repeated :preHookMessages, :string, 15
|
55
|
+
repeated :postHookMessages, :string, 16
|
56
|
+
repeated :preHookMessage, :string, 17
|
57
|
+
repeated :postHookMessage, :string, 18
|
58
|
+
end
|
59
|
+
add_message "gauge.messages.Span" do
|
60
|
+
optional :start, :int64, 1
|
61
|
+
optional :end, :int64, 2
|
62
|
+
optional :startChar, :int64, 3
|
63
|
+
optional :endChar, :int64, 4
|
64
|
+
end
|
65
|
+
add_message "gauge.messages.ProtoTableDrivenScenario" do
|
66
|
+
optional :scenario, :message, 1, "gauge.messages.ProtoScenario"
|
67
|
+
optional :tableRowIndex, :int32, 2
|
68
|
+
end
|
69
|
+
add_message "gauge.messages.ProtoStep" do
|
70
|
+
optional :actualText, :string, 1
|
71
|
+
optional :parsedText, :string, 2
|
72
|
+
repeated :fragments, :message, 3, "gauge.messages.Fragment"
|
73
|
+
optional :stepExecutionResult, :message, 4, "gauge.messages.ProtoStepExecutionResult"
|
74
|
+
repeated :preHookMessages, :string, 5
|
75
|
+
repeated :postHookMessages, :string, 6
|
76
|
+
end
|
77
|
+
add_message "gauge.messages.ProtoConcept" do
|
78
|
+
optional :conceptStep, :message, 1, "gauge.messages.ProtoStep"
|
79
|
+
repeated :steps, :message, 2, "gauge.messages.ProtoItem"
|
80
|
+
optional :conceptExecutionResult, :message, 3, "gauge.messages.ProtoStepExecutionResult"
|
81
|
+
end
|
82
|
+
add_message "gauge.messages.ProtoTags" do
|
83
|
+
repeated :tags, :string, 1
|
84
|
+
end
|
85
|
+
add_message "gauge.messages.Fragment" do
|
86
|
+
optional :fragmentType, :enum, 1, "gauge.messages.Fragment.FragmentType"
|
87
|
+
optional :text, :string, 2
|
88
|
+
optional :parameter, :message, 3, "gauge.messages.Parameter"
|
89
|
+
end
|
90
|
+
add_enum "gauge.messages.Fragment.FragmentType" do
|
91
|
+
value :Text, 0
|
92
|
+
value :Parameter, 1
|
93
|
+
end
|
94
|
+
add_message "gauge.messages.Parameter" do
|
95
|
+
optional :parameterType, :enum, 1, "gauge.messages.Parameter.ParameterType"
|
96
|
+
optional :value, :string, 2
|
97
|
+
optional :name, :string, 3
|
98
|
+
optional :table, :message, 4, "gauge.messages.ProtoTable"
|
99
|
+
end
|
100
|
+
add_enum "gauge.messages.Parameter.ParameterType" do
|
101
|
+
value :Static, 0
|
102
|
+
value :Dynamic, 1
|
103
|
+
value :Special_String, 2
|
104
|
+
value :Special_Table, 3
|
105
|
+
value :Table, 4
|
106
|
+
end
|
107
|
+
add_message "gauge.messages.ProtoComment" do
|
108
|
+
optional :text, :string, 1
|
109
|
+
end
|
110
|
+
add_message "gauge.messages.ProtoTable" do
|
111
|
+
optional :headers, :message, 1, "gauge.messages.ProtoTableRow"
|
112
|
+
repeated :rows, :message, 2, "gauge.messages.ProtoTableRow"
|
113
|
+
end
|
114
|
+
add_message "gauge.messages.ProtoTableRow" do
|
115
|
+
repeated :cells, :string, 1
|
116
|
+
end
|
117
|
+
add_message "gauge.messages.ProtoStepExecutionResult" do
|
118
|
+
optional :executionResult, :message, 1, "gauge.messages.ProtoExecutionResult"
|
119
|
+
optional :preHookFailure, :message, 2, "gauge.messages.ProtoHookFailure"
|
120
|
+
optional :postHookFailure, :message, 3, "gauge.messages.ProtoHookFailure"
|
121
|
+
optional :skipped, :bool, 4
|
122
|
+
optional :skippedReason, :string, 5
|
123
|
+
end
|
124
|
+
add_message "gauge.messages.ProtoExecutionResult" do
|
125
|
+
optional :failed, :bool, 1
|
126
|
+
optional :recoverableError, :bool, 2
|
127
|
+
optional :errorMessage, :string, 3
|
128
|
+
optional :stackTrace, :string, 4
|
129
|
+
optional :screenShot, :bytes, 5
|
130
|
+
optional :executionTime, :int64, 6
|
131
|
+
repeated :message, :string, 7
|
132
|
+
optional :errorType, :enum, 8, "gauge.messages.ProtoExecutionResult.ErrorType"
|
133
|
+
end
|
134
|
+
add_enum "gauge.messages.ProtoExecutionResult.ErrorType" do
|
135
|
+
value :ASSERTION, 0
|
136
|
+
value :VERIFICATION, 1
|
137
|
+
end
|
138
|
+
add_message "gauge.messages.ProtoHookFailure" do
|
139
|
+
optional :stackTrace, :string, 1
|
140
|
+
optional :errorMessage, :string, 2
|
141
|
+
optional :screenShot, :bytes, 3
|
142
|
+
optional :tableRowIndex, :int32, 4
|
143
|
+
end
|
144
|
+
add_message "gauge.messages.ProtoSuiteResult" do
|
145
|
+
repeated :specResults, :message, 1, "gauge.messages.ProtoSpecResult"
|
146
|
+
optional :preHookFailure, :message, 2, "gauge.messages.ProtoHookFailure"
|
147
|
+
optional :postHookFailure, :message, 3, "gauge.messages.ProtoHookFailure"
|
148
|
+
optional :failed, :bool, 4
|
149
|
+
optional :specsFailedCount, :int32, 5
|
150
|
+
optional :executionTime, :int64, 6
|
151
|
+
optional :successRate, :float, 7
|
152
|
+
optional :environment, :string, 8
|
153
|
+
optional :tags, :string, 9
|
154
|
+
optional :projectName, :string, 10
|
155
|
+
optional :timestamp, :string, 11
|
156
|
+
optional :specsSkippedCount, :int32, 12
|
157
|
+
repeated :preHookMessages, :string, 13
|
158
|
+
repeated :postHookMessages, :string, 14
|
159
|
+
repeated :preHookMessage, :string, 15
|
160
|
+
repeated :postHookMessage, :string, 16
|
161
|
+
end
|
162
|
+
add_message "gauge.messages.ProtoSpecResult" do
|
163
|
+
optional :protoSpec, :message, 1, "gauge.messages.ProtoSpec"
|
164
|
+
optional :scenarioCount, :int32, 2
|
165
|
+
optional :scenarioFailedCount, :int32, 3
|
166
|
+
optional :failed, :bool, 4
|
167
|
+
repeated :failedDataTableRows, :int32, 5
|
168
|
+
optional :executionTime, :int64, 6
|
169
|
+
optional :skipped, :bool, 7
|
170
|
+
optional :scenarioSkippedCount, :int32, 8
|
171
|
+
repeated :skippedDataTableRows, :int32, 9
|
172
|
+
repeated :errors, :message, 10, "gauge.messages.Error"
|
173
|
+
end
|
174
|
+
add_message "gauge.messages.Error" do
|
175
|
+
optional :type, :enum, 1, "gauge.messages.Error.ErrorType"
|
176
|
+
optional :filename, :string, 2
|
177
|
+
optional :lineNumber, :int32, 3
|
178
|
+
optional :message, :string, 4
|
179
|
+
end
|
180
|
+
add_enum "gauge.messages.Error.ErrorType" do
|
181
|
+
value :PARSE_ERROR, 0
|
182
|
+
value :VALIDATION_ERROR, 1
|
183
|
+
end
|
184
|
+
add_message "gauge.messages.ProtoStepValue" do
|
185
|
+
optional :stepValue, :string, 1
|
186
|
+
optional :parameterizedStepValue, :string, 2
|
187
|
+
repeated :parameters, :string, 3
|
188
|
+
end
|
189
|
+
add_enum "gauge.messages.ExecutionStatus" do
|
190
|
+
value :NOTEXECUTED, 0
|
191
|
+
value :PASSED, 1
|
192
|
+
value :FAILED, 2
|
193
|
+
value :SKIPPED, 3
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
module Gauge
|
198
|
+
module Messages
|
199
|
+
ProtoSpec = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoSpec").msgclass
|
200
|
+
ProtoItem = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoItem").msgclass
|
201
|
+
ProtoItem::ItemType = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoItem.ItemType").enummodule
|
202
|
+
ProtoScenario = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoScenario").msgclass
|
203
|
+
Span = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.Span").msgclass
|
204
|
+
ProtoTableDrivenScenario = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoTableDrivenScenario").msgclass
|
205
|
+
ProtoStep = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoStep").msgclass
|
206
|
+
ProtoConcept = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoConcept").msgclass
|
207
|
+
ProtoTags = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoTags").msgclass
|
208
|
+
Fragment = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.Fragment").msgclass
|
209
|
+
Fragment::FragmentType = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.Fragment.FragmentType").enummodule
|
210
|
+
Parameter = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.Parameter").msgclass
|
211
|
+
Parameter::ParameterType = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.Parameter.ParameterType").enummodule
|
212
|
+
ProtoComment = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoComment").msgclass
|
213
|
+
ProtoTable = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoTable").msgclass
|
214
|
+
ProtoTableRow = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoTableRow").msgclass
|
215
|
+
ProtoStepExecutionResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoStepExecutionResult").msgclass
|
216
|
+
ProtoExecutionResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoExecutionResult").msgclass
|
217
|
+
ProtoExecutionResult::ErrorType = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoExecutionResult.ErrorType").enummodule
|
218
|
+
ProtoHookFailure = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoHookFailure").msgclass
|
219
|
+
ProtoSuiteResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoSuiteResult").msgclass
|
220
|
+
ProtoSpecResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoSpecResult").msgclass
|
221
|
+
Error = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.Error").msgclass
|
222
|
+
Error::ErrorType = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.Error.ErrorType").enummodule
|
223
|
+
ProtoStepValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ProtoStepValue").msgclass
|
224
|
+
ExecutionStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("gauge.messages.ExecutionStatus").enummodule
|
225
|
+
end
|
226
|
+
end
|