Skip to content

Latest commit

 

History

History
2264 lines (1218 loc) · 87.1 KB

gauge-proto-doc.md

File metadata and controls

2264 lines (1218 loc) · 87.1 KB

Protocol Documentation

Table of Contents

Top

api.proto

APIMessage

A generic message composing of all possible operations. / One of the Request/Response fields will have value, depending on the MessageType set.

Field Type Label Description
messageType APIMessage.APIMessageType Type of API call being made
messageId int64 A unique id to represent this message. A response to the message should copy over this value. / This is used to synchronize messages & responses
projectRootRequest GetProjectRootRequest GetProjectRootRequest
projectRootResponse GetProjectRootResponse GetProjectRootResponse
installationRootRequest GetInstallationRootRequest GetInstallationRootRequest
installationRootResponse GetInstallationRootResponse GetInstallationRootResponse
allStepsRequest GetAllStepsRequest GetAllStepsRequest
allStepsResponse GetAllStepsResponse GetAllStepsResponse
specsRequest SpecsRequest GetAllSpecsRequest
specsResponse SpecsResponse GetAllSpecsResponse
stepValueRequest GetStepValueRequest GetStepValueRequest
stepValueResponse GetStepValueResponse GetStepValueResponse
libPathRequest GetLanguagePluginLibPathRequest GetLanguagePluginLibPathRequest
libPathResponse GetLanguagePluginLibPathResponse GetLanguagePluginLibPathResponse
error ErrorResponse ErrorResponse
allConceptsRequest GetAllConceptsRequest GetAllConceptsRequest
allConceptsResponse GetAllConceptsResponse GetAllConceptsResponse
performRefactoringRequest PerformRefactoringRequest PerformRefactoringRequest
performRefactoringResponse PerformRefactoringResponse PerformRefactoringResponse
extractConceptRequest ExtractConceptRequest ExtractConceptRequest
extractConceptResponse ExtractConceptResponse ExtractConceptResponse
formatSpecsRequest FormatSpecsRequest [FormatSpecsRequest] (#gauge.messages.FormatSpecsRequest)
formatSpecsResponse FormatSpecsResponse [FormatSpecsResponse] (#gauge.messages.FormatSpecsResponse)
unsupportedApiMessageResponse UnsupportedApiMessageResponse [UnsupportedApiMessageResponse] (#gauge.messages.UnsupportedApiMessageResponse)

ConceptInfo

Details of a Concept

Field Type Label Description
stepValue ProtoStepValue The text that defines a concept
filepath string The absolute path to the file that contains the Concept
lineNumber int32 The line number in the file where the concept is defined.

ErrorResponse

A generic failure response

Field Type Label Description
error string Actual error message

ExtractConceptRequest

Request to perform Extract to Concept refactoring

Field Type Label Description
conceptName step The Concept name given by the user
steps step repeated steps to extract
changeAcrossProject bool Flag indicating if refactoring should be done across project
conceptFileName string The concept filename in which extracted concept will be added
selectedTextInfo textInfo Info related to selected text, only if changeAcrossProject is false

ExtractConceptResponse

Response to perform Extract to Concept refactoring

Field Type Label Description
isSuccess bool Flag indicating Success
error string Error message if the refactoring was unsuccessful.
filesChanged string repeated Collection of files that were changed as part of the Refactoring.

FormatSpecsRequest

Request to format spec files

Field Type Label Description
specs string repeated Specs to be formatted

FormatSpecsResponse

Response on formatting spec files

Field Type Label Description
errors string repeated Errors occurred on formatting
warnings string repeated Warnings occurred on formatting

GetAllConceptsRequest

Request to get all Concepts in the project

GetAllConceptsResponse

Response to GetAllConceptsResponse

Field Type Label Description
concepts ConceptInfo repeated Holds a collection of Concepts that are defined in the project.

GetAllStepsRequest

Request to get all Steps in the project

GetAllStepsResponse

Response to GetAllStepsRequest

Field Type Label Description
allSteps ProtoStepValue repeated Holds a collection of Steps that are defined in the project.

GetInstallationRootRequest

Request to get the Root Directory of the Gauge installation

GetInstallationRootResponse

Response of GetInstallationRootRequest

Field Type Label Description
installationRoot string Holds the absolute path of the Gauge installation directory

GetLanguagePluginLibPathRequest

Request to get the location of language plugin's Lib directory

Field Type Label Description
language string The language to locate the lib directory for.

GetLanguagePluginLibPathResponse

Response to GetLanguagePluginLibPathRequest

Field Type Label Description
path string Absolute path to the Lib directory of the language.

GetProjectRootRequest

Request to get the Root Directory of the project

GetProjectRootResponse

Response of GetProjectRootRequest.

Field Type Label Description
projectRoot string Holds the absolute path of the Project Root directory.

GetStepValueRequest

Request to get a Step Value.

Field Type Label Description
stepText string The text of the Step.
hasInlineTable bool Flag to indicate if the Step has an inline table.

GetStepValueResponse

Response to GetStepValueRequest

Field Type Label Description
stepValue ProtoStepValue The Step corresponding to the request provided.

PerformRefactoringRequest

Request to perform a Refactor

Field Type Label Description
oldStep string Step to refactor
newStep string Change to be made

PerformRefactoringResponse

Response to PerformRefactoringRequest

Field Type Label Description
success bool Flag indicating Success
errors string repeated Error message if the refactoring was unsuccessful.
filesChanged string repeated Collection of files that were changed as part of the Refactoring.

SpecsRequest

Request to get all Specs in the project

Field Type Label Description
specs string repeated

SpecsResponse

Response to GetAllSpecsRequest

Field Type Label Description
details SpecsResponse.SpecDetail repeated Holds a collection of Spec details.

SpecsResponse.SpecDetail

Field Type Label Description
spec ProtoSpec Holds a collection of Specs that are defined in the project.
parseErrors Error repeated Holds a collection of parse errors present in the above spec.

UnsupportedApiMessageResponse

Response when a API message request is not supported.

step

Field Type Label Description
name string name of the step
table string table present in step as parameter
paramTableName string name of table in concept heading, if it comes as a param to concept

textInfo

Field Type Label Description
fileName string The filename from where concept is being extracted
startingLineNo int32 storing the starting and ending line number of selected text
endLineNo int32

APIMessage.APIMessageType

Name Number Description
GetProjectRootRequest 0
GetProjectRootResponse 1
GetInstallationRootRequest 2
GetInstallationRootResponse 3
GetAllStepsRequest 4
GetAllStepResponse 5
SpecsRequest 6
SpecsResponse 7
GetStepValueRequest 8
GetStepValueResponse 9
GetLanguagePluginLibPathRequest 10
GetLanguagePluginLibPathResponse 11
ErrorResponse 12
GetAllConceptsRequest 13
GetAllConceptsResponse 14
PerformRefactoringRequest 15
PerformRefactoringResponse 16
ExtractConceptRequest 17
ExtractConceptResponse 18
FormatSpecsRequest 19
FormatSpecsResponse 20
UnsupportedApiMessageResponse 21

Top

lsp.proto

lspService

Method Name Request Type Response Type Description
GetStepNames StepNamesRequest StepNamesResponse
CacheFile CacheFileRequest Empty
GetStepPositions StepPositionsRequest StepPositionsResponse
GetImplementationFiles Empty ImplementationFileListResponse
ImplementStub StubImplementationCodeRequest FileDiff
ValidateStep StepValidateRequest StepValidateResponse
Refactor RefactorRequest RefactorResponse
GetStepName StepNameRequest StepNameResponse
GetGlobPatterns Empty ImplementationFileGlobPatternResponse
KillProcess KillProcessRequest Empty

Top

messages.proto

The comments are exported to Markdown, hence they may contain markdown syntax and cross-refs.

CacheFileRequest

Request for caching a file. / Gauge sends this request when running in LSP mode, / so runner can cache file contents present on the client(an editor).

Field Type Label Description
content string File content of the file to be cached
filePath string File path of the file to be cached
isClosed bool Specifies if the file is closed
status CacheFileRequest.FileStatus Specifies the status of the file

Empty

Empty is a blank response, to be used when there is no return expected.

ExecuteStepRequest

Request sent ot the runner to Execute a Step

Field Type Label Description
actualStepText string Contains the actual text of the Step being executed. / This contains the parameters as defined in the Spec.
parsedStepText string Contains the parsed text of the Step being executed. / The paramters are replaced with placeholders.
scenarioFailing bool Flag to indicate if the execution of the Scenario, containing the current Step, failed.
parameters Parameter repeated Collection of parameters applicable to the current Step.
stream int32

ExecutionArg

Contains command line arguments which passed by user during execution.

Field Type Label Description
flagName string Holds the flag name passed from command line.
flagValue string repeated Holds the flag value passed from command line.

ExecutionEndingRequest

Sent at end of Suite Execution. Tells the runner to execute after_suite hook.

Field Type Label Description
currentExecutionInfo ExecutionInfo Holds the current suite execution info.
suiteResult ProtoSuiteResult Holds the suite result in execution ending.
stream int32

ExecutionInfo

Contains details of the execution. / Depending on the context (Step, Scenario, Spec or Suite), the respective fields are set.

Field Type Label Description
currentSpec SpecInfo Holds the information of the current Spec. Valid in context of Spec execution.
currentScenario ScenarioInfo Holds the information of the current Scenario. Valid in context of Scenario execution.
currentStep StepInfo Holds the information of the current Step. Valid in context of Step execution.
stacktrace string Stacktrace of the execution. Valid only if there is an error in execution.
projectName string Holds the project name
ExecutionArgs ExecutionArg repeated Holds the command line arguments.
numberOfExecutionStreams int32 Holds the number of running execution streams.
runnerId int32 Holds the runner id for parallel execution.

ExecutionStartingRequest

Sent at start of Suite Execution. Tells the runner to execute before_suite hook.

Field Type Label Description
currentExecutionInfo ExecutionInfo Holds the current suite execution info.
suiteResult ProtoSuiteResult Holds the suite result in execution starting. / Some fields will not be populated before execution.
stream int32

ExecutionStatusResponse

Sends to any request which needs a execution status as response / usually step execution, hooks etc will return this

Field Type Label Description
executionResult ProtoExecutionResult Holds the suite result after suite execution done.

FileChanges

Give all file changes to be made to file system

Field Type Label Description
fileName string
fileContent string
diffs TextDiff repeated

FileDiff

Diffs to be applied to a file

Field Type Label Description
filePath string File Path where the new content needs to be put in
textDiffs TextDiff repeated The diffs which need to be applied to this file

ImplementationFileGlobPatternRequest

Request for getting Implementation file glob pattern

ImplementationFileGlobPatternResponse

Response for getting Implementation file glob pattern

Field Type Label Description
globPatterns string repeated List of implementation file glob patterns

ImplementationFileListRequest

Request for getting Implementation file list

ImplementationFileListResponse

Response for getting Implementation file list

Field Type Label Description
implementationFilePaths string repeated List of implementation files

KeepAlive

Tell gauge to reset the kill timer, thus extending the life

Field Type Label Description
pluginId string ID of the plugin initiating this request

KillProcessRequest

Default request. Tells the runner to shutdown.

Message

This is the message which gets transferred all the time / with proper message type set / One of the Request/Response fields will have value, depending on the MessageType set.

Field Type Label Description
messageType Message.MessageType
messageId int64 A unique id to represent this message. A response to the message should copy over this value. / This is used to synchronize messages & responses
executionStartingRequest ExecutionStartingRequest ExecutionStartingRequest
specExecutionStartingRequest SpecExecutionStartingRequest SpecExecutionStartingRequest
specExecutionEndingRequest SpecExecutionEndingRequest SpecExecutionEndingRequest
scenarioExecutionStartingRequest ScenarioExecutionStartingRequest ScenarioExecutionStartingRequest
scenarioExecutionEndingRequest ScenarioExecutionEndingRequest ScenarioExecutionEndingRequest
stepExecutionStartingRequest StepExecutionStartingRequest StepExecutionStartingRequest
stepExecutionEndingRequest StepExecutionEndingRequest StepExecutionEndingRequest
executeStepRequest ExecuteStepRequest ExecuteStepRequest
executionEndingRequest ExecutionEndingRequest ExecutionEndingRequest
stepValidateRequest StepValidateRequest StepValidateRequest
stepValidateResponse StepValidateResponse StepValidateResponse
executionStatusResponse ExecutionStatusResponse ExecutionStatusResponse
stepNamesRequest StepNamesRequest StepNamesRequest
stepNamesResponse StepNamesResponse StepNamesResponse
suiteExecutionResult SuiteExecutionResult SuiteExecutionResult
killProcessRequest KillProcessRequest KillProcessRequest
scenarioDataStoreInitRequest ScenarioDataStoreInitRequest ScenarioDataStoreInitRequest
specDataStoreInitRequest SpecDataStoreInitRequest SpecDataStoreInitRequest
suiteDataStoreInitRequest SuiteDataStoreInitRequest SuiteDataStoreInitRequest
stepNameRequest StepNameRequest StepNameRequest
stepNameResponse StepNameResponse StepNameResponse
refactorRequest RefactorRequest RefactorRequest
refactorResponse RefactorResponse RefactorResponse
unsupportedMessageResponse UnsupportedMessageResponse UnsupportedMessageResponse
cacheFileRequest CacheFileRequest CacheFileRequest
stepPositionsRequest StepPositionsRequest StepPositionsRequest
stepPositionsResponse StepPositionsResponse StepPositionsResponse
implementationFileListRequest ImplementationFileListRequest ImplementationFileListRequest
implementationFileListResponse ImplementationFileListResponse ImplementationFileListResponse
stubImplementationCodeRequest StubImplementationCodeRequest StubImplementationCodeRequest
fileDiff FileDiff FileDiff
implementationFileGlobPatternRequest ImplementationFileGlobPatternRequest ImplementationFileGlobPatternRequest
implementationFileGlobPatternResponse ImplementationFileGlobPatternResponse ImplementationFileGlobPatternResponse
suiteExecutionResultItem SuiteExecutionResultItem SuiteExecutionResult
keepAlive KeepAlive KeepAlive

ParameterPosition

Holds the new and old positions of a parameter. / Used when refactoring a Step.

Field Type Label Description
oldPosition int32
newPosition int32

RefactorRequest

Tells the runner to refactor the specified Step.

Field Type Label Description
oldStepValue ProtoStepValue Old value, used to lookup Step to refactor
newStepValue ProtoStepValue New value, the to-be value of Step being refactored.
paramPositions ParameterPosition repeated Holds parameter positions of all parameters. Contains old and new parameter positions.
saveChanges bool If set to true, the refactored files should be saved to the file system before returning the response.

RefactorResponse

Response of a RefactorRequest

Field Type Label Description
success bool Flag indicating the success of Refactor operation.
error string Error message, valid only if Refactor wasn't successful
filesChanged string repeated List of files that were affected because of the refactoring.
fileChanges FileChanges repeated List of file changes to be made to successfully achieve refactoring.

ScenarioDataStoreInitRequest

Request runner to initialize Scenario DataStore / Scenario Datastore is reset after every Scenario execution.

Field Type Label Description
stream int32

ScenarioExecutionEndingRequest

Sent at end of Scenario Execution. Tells the runner to execute after_scenario hook.

Field Type Label Description
currentExecutionInfo ExecutionInfo Holds the current scenario execution info.
scenarioResult ProtoScenarioResult
stream int32

ScenarioExecutionStartingRequest

Sent at start of Scenario Execution. Tells the runner to execute before_scenario hook.

Field Type Label Description
currentExecutionInfo ExecutionInfo Holds the current sceanrio execution info.
scenarioResult ProtoScenarioResult Holds the scenarion result in scenarion execution starting. / Some fields will not be populated before execution.
stream int32

ScenarioInfo

Contains details of the Scenario execution.

Field Type Label Description
name string Name of the current Scenario being executed.
isFailed bool Flag to indicate if the current Scenario execution failed.
tags string repeated Tags relevant to the current Scenario execution.

SpecDataStoreInitRequest

Request runner to initialize Spec DataStore / Spec Datastore is reset after every Spec execution.

Field Type Label Description
stream int32

SpecDetails

Field Type Label Description
details SpecDetails.SpecDetail repeated Holds a collection of Spec details.

SpecDetails.SpecDetail

Field Type Label Description
spec ProtoSpec Holds a collection of Specs that are defined in the project.
parseErrors Error repeated Holds a collection of parse errors present in the above spec.

SpecExecutionEndingRequest

Sent at end of Spec Execution. Tells the runner to execute after_spec hook.

Field Type Label Description
currentExecutionInfo ExecutionInfo Holds the current spec execution info.
specResult ProtoSpecResult Holds the specs result in spec execution ending.
stream int32

SpecExecutionStartingRequest

Sent at start of Spec Execution. Tells the runner to execute before_spec hook.

Field Type Label Description
currentExecutionInfo ExecutionInfo Holds the current spec execution info.
specResult ProtoSpecResult Holds the specs result in spec execution starting. / Some fields will not be populated before execution.
stream int32

SpecInfo

Contains details of the Spec execution.

Field Type Label Description
name string Name of the current Spec being executed.
fileName string Full File path containing the current Spec being executed.
isFailed bool Flag to indicate if the current Spec execution failed.
tags string repeated Tags relevant to the current Spec execution.

StepExecutionEndingRequest

Sent at end of Step Execution. Tells the runner to execute after_step hook.

Field Type Label Description
currentExecutionInfo ExecutionInfo Holds the current step execution info.
stepResult ProtoStepResult Holds step result in step execution ending.
stream int32

StepExecutionStartingRequest

Sent at start of Step Execution. Tells the runner to execute before_step hook.

Field Type Label Description
currentExecutionInfo ExecutionInfo Holds the current step execution info.
stepResult ProtoStepResult Holds step result in step execution starting. / Some fields will not be populated before execution.
stream int32

StepInfo

Contains details of the Step execution.

Field Type Label Description
step ExecuteStepRequest The current request to execute Step
isFailed bool Flag to indicate if the current Step execution failed.
stackTrace string The current stack trace in case of failure
errorMessage string The error message in case of failure

StepNameRequest

Request for details on a Single Step.

Field Type Label Description
stepValue string Step text to lookup the Step. / This is the parsed step value, i.e. with placeholders for parameters.

StepNameResponse

Response to StepNameRequest.

Field Type Label Description
isStepPresent bool Flag indicating if there is a match for the given Step Text.
stepName string repeated The Step name of the given step.
hasAlias bool Flag indicating if the given Step is an alias.
fileName string File name in which the step implementation exists
span Span Range of step
isExternal bool Flag indicating if the given Step defined in some external library and the source code can not be accessed.

StepNamesRequest

Requests Gauge to give all Step Names.

StepNamesResponse

Response to StepNamesRequest

Field Type Label Description
steps string repeated Collection of strings corresponding to Step texts.

StepPositionsRequest

Request for find step positions

Field Type Label Description
filePath string Get step positions for file path

StepPositionsResponse

Response for find step positions

Field Type Label Description
stepPositions StepPositionsResponse.StepPosition repeated Step Position
error string Error message

StepPositionsResponse.StepPosition

Step position for each step implementation

Field Type Label Description
stepValue string Step Value
span Span Range of step

StepValidateRequest

Request sent ot the runner to check if given Step is valid. / The runner should check if there is an implementation defined for the given Step Text.

Field Type Label Description
stepText string The text is used to lookup Step implementation
numberOfParameters int32 The number of paramters in the Step
stepValue ProtoStepValue This is use to generate step implementation template

StepValidateResponse

Response of StepValidateRequest. / The runner tells the caller if the Request was valid, / i.e. an implementation exists for given Step text. / Returns an error message if it is an error response.

Field Type Label Description
isValid bool
errorMessage string
errorType StepValidateResponse.ErrorType
suggestion string

StubImplementationCodeRequest

Request for injecting code snippet into implementation file

Field Type Label Description
implementationFilePath string Path of the file where the new stub implementation will be added
codes string repeated List of implementation codes to be appended to implementation file.

SuiteDataStoreInitRequest

Request runner to initialize Suite DataStore / Suite Datastore is reset after every Suite execution.

Field Type Label Description
stream int32

SuiteExecutionResult

Result of the Suite Execution.

Field Type Label Description
suiteResult ProtoSuiteResult

SuiteExecutionResultItem

Field Type Label Description
resultItem ProtoItem

TextDiff

A Single Replace Diff Element to be applied

Field Type Label Description
span Span Range of file to be replaced
content string New content to replace the content in the span

UnsupportedMessageResponse

Response when a unsupported message request is sent.

Field Type Label Description
message string

CacheFileRequest.FileStatus

Name Number Description
CHANGED 0 The file content was changed in the client
CLOSED 1 The file was closed in the client
CREATED 2 The file was created on the client
DELETED 3 The file was deleted on the client
OPENED 4 The file is opened in the client

Message.MessageType

Name Number Description
ExecutionStarting 0
SpecExecutionStarting 1
SpecExecutionEnding 2
ScenarioExecutionStarting 3
ScenarioExecutionEnding 4
StepExecutionStarting 5
StepExecutionEnding 6
ExecuteStep 7
ExecutionEnding 8
StepValidateRequest 9
StepValidateResponse 10
ExecutionStatusResponse 11
StepNamesRequest 12
StepNamesResponse 13
KillProcessRequest 14
SuiteExecutionResult 15
ScenarioDataStoreInit 16
SpecDataStoreInit 17
SuiteDataStoreInit 18
StepNameRequest 19
StepNameResponse 20
RefactorRequest 21
RefactorResponse 22
UnsupportedMessageResponse 23
CacheFileRequest 24
StepPositionsRequest 25
StepPositionsResponse 26
ImplementationFileListRequest 27
ImplementationFileListResponse 28
StubImplementationCodeRequest 29
FileDiff 30
ImplementationFileGlobPatternRequest 31
ImplementationFileGlobPatternResponse 32
SuiteExecutionResultItem 33
KeepAlive 34

StepValidateResponse.ErrorType

Name Number Description
STEP_IMPLEMENTATION_NOT_FOUND 0
DUPLICATE_STEP_IMPLEMENTATION 1

Top

services.proto

Documenter

Reporter services is meant for documentation plugins

Method Name Request Type Response Type Description
GenerateDocs SpecDetails Empty GenerateDocs is a RPC tell plugin to generate docs from the spec details.

Accepts a SpecDetails message and returns a Empty message. | | Kill | KillProcessRequest | Empty | Kill is a RPC tell plugin to stop grpc server and kill the plugin process.

Accepts a KillProcessRequest message and returns a Empty message. |

Reporter

Reporter services is meant for reporting plugins, or others plugins which are interested the live events

Method Name Request Type Response Type Description
NotifyExecutionStarting ExecutionStartingRequest Empty NotifyExecutionStarting is a RPC to tell plugins that the execution has started.

Accepts a ExecutionStartingRequest message and returns a Empty message | | NotifySpecExecutionStarting | SpecExecutionStartingRequest | Empty | NotifySpecExecutionStarting is a RPC to tell plugins that the specification execution has started.

Accepts a SpecExecutionStartingRequest message and returns a Empty message | | NotifyScenarioExecutionStarting | ScenarioExecutionStartingRequest | Empty | NotifyScenarioExecutionStarting is a RPC to tell plugins that the scenario execution has started.

Accepts a ScenarioExecutionStartingRequest message and returns a Empty message | | NotifyStepExecutionStarting | StepExecutionStartingRequest | Empty | NotifyStepExecutionStarting is a RPC to tell plugins that the step execution has started.

Accepts a StepExecutionStartingRequest message and returns a Empty message | | NotifyStepExecutionEnding | StepExecutionEndingRequest | Empty | NotifyStepExecutionEnding is a RPC to tell plugins that the step execution has finished.

Accepts a StepExecutionStartingRequest message and returns a Empty message | | NotifyScenarioExecutionEnding | ScenarioExecutionEndingRequest | Empty | NotifyScenarioExecutionEnding is a RPC to tell plugins that the scenario execution has finished.

Accepts a ScenarioExecutionEndingRequest message and returns a Empty message | | NotifySpecExecutionEnding | SpecExecutionEndingRequest | Empty | NotifySpecExecutionEnding is a RPC to tell plugins that the specification execution has finished.

Accepts a SpecExecutionStartingRequest message and returns a Empty message | | NotifyExecutionEnding | ExecutionEndingRequest | Empty | NotifyExecutionEnding is a RPC to tell plugins that the execution has finished.

Accepts a ExecutionEndingRequest message and returns a Empty message | | NotifySuiteResult | SuiteExecutionResult | Empty | NotifySuiteResult is a RPC to tell about the end result of execution

Accepts a SuiteExecutionResult message and returns a Empty message. | | Kill | KillProcessRequest | Empty | Kill is a RPC tell plugin to stop grpc server and kill the plugin process.

Accepts a KillProcessRequest message and returns a Empty message. |

Runner

Method Name Request Type Response Type Description
ValidateStep StepValidateRequest StepValidateResponse ValidateStep is a RPC to validate a given step.

Accepts a StepValidateRequest message and returns a StepValidateResponse message | | InitializeSuiteDataStore | SuiteDataStoreInitRequest | ExecutionStatusResponse | SuiteDataStoreInit is a RPC to initialize the suite level data store.

Accepts a Empty message and returns a ExecutionStatusResponse message | | StartExecution | ExecutionStartingRequest | ExecutionStatusResponse | ExecutionStarting is a RPC to tell runner to execute Suite level hooks.

Accepts a ExecutionStartingRequest message and returns a ExecutionStatusResponse message | | InitializeSpecDataStore | SpecDataStoreInitRequest | ExecutionStatusResponse | SpecDataStoreInit is a RPC to initialize the spec level data store.

Accepts a Empty message and returns a ExecutionStatusResponse message | | StartSpecExecution | SpecExecutionStartingRequest | ExecutionStatusResponse | SpecExecutionStarting is a RPC to tell runner to execute spec level hooks.

Accepts a SpecExecutionStartingRequest message and returns a ExecutionStatusResponse message | | InitializeScenarioDataStore | ScenarioDataStoreInitRequest | ExecutionStatusResponse | ScenarioDataStoreInit is a RPC to initialize the scenario level data store.

Accepts a Empty message and returns a ExecutionStatusResponse message | | StartScenarioExecution | ScenarioExecutionStartingRequest | ExecutionStatusResponse | ScenarioExecutionStarting is a RPC to tell runner to execute scenario level hooks.

Accepts a ScenarioExecutionStartingRequest message and returns a ExecutionStatusResponse message | | StartStepExecution | StepExecutionStartingRequest | ExecutionStatusResponse | StepExecutionStarting is a RPC to tell runner to execute step level hooks.

Accepts a StepExecutionStartingRequest message and returns a ExecutionStatusResponse message | | ExecuteStep | ExecuteStepRequest | ExecutionStatusResponse | ExecuteStep is a RPC to tell runner to execute a step .

Accepts a ExecuteStepRequest message and returns a ExecutionStatusResponse message | | FinishStepExecution | StepExecutionEndingRequest | ExecutionStatusResponse | StepExecutionEnding is a RPC to tell runner to execute step level hooks.

Accepts a StepExecutionEndingRequest message and returns a ExecutionStatusResponse message | | FinishScenarioExecution | ScenarioExecutionEndingRequest | ExecutionStatusResponse | ScenarioExecutionEnding is a RPC to tell runner to execute Scenario level hooks.

Accepts a ScenarioExecutionEndingRequest message and returns a ExecutionStatusResponse message | | FinishSpecExecution | SpecExecutionEndingRequest | ExecutionStatusResponse | SpecExecutionEnding is a RPC to tell runner to execute spec level hooks.

Accepts a SpecExecutionEndingRequest message and returns a ExecutionStatusResponse message | | FinishExecution | ExecutionEndingRequest | ExecutionStatusResponse | ExecutionEnding is a RPC to tell runner to execute suite level hooks.

Accepts a ExecutionEndingRequest message and returns a ExecutionStatusResponse message | | CacheFile | CacheFileRequest | Empty | CacheFile is a RPC to tell runner to load/reload/unload a implementation file.

Accepts a CacheFileRequest message and returns a Empty message | | GetStepName | StepNameRequest | StepNameResponse | GetStepName is a RPC to get information about the given step.

Accepts a StepNameRequest message and returns a StepNameResponse message. | | GetGlobPatterns | Empty | ImplementationFileGlobPatternResponse | GetGlobPatterns is a RPC to get the file path pattern which needs to be cached.

Accepts a Empty message and returns a ImplementationFileGlobPatternResponse message. | | GetStepNames | StepNamesRequest | StepNamesResponse | GetStepNames is a RPC to get all the available steps from the runner.

Accepts a StepNamesRequest message and returns a StepNamesResponse | | GetStepPositions | StepPositionsRequest | StepPositionsResponse | GetStepPositions is a RPC to get positions of all available steps in a given file.

Accepts a StepPositionsRequest message and returns a StepPositionsResponse message | | GetImplementationFiles | Empty | ImplementationFileListResponse | GetImplementationFiles is a RPC get all the existing implementation files.

Accepts a Empty and returns a ImplementationFileListResponse message. | | ImplementStub | StubImplementationCodeRequest | FileDiff | ImplementStub is a RPC to to ask runner to add a given implementation to given file.

Accepts a StubImplementationCodeRequest and returns a FileDiff message. | | Refactor | RefactorRequest | RefactorResponse | Refactor is a RPC to refactor a given step in implementation file.

Accepts a RefactorRequest message and returns a RefactorResponse message. | | Kill | KillProcessRequest | Empty | Kill is a RPC tell plugin to stop grpc server and kill the plugin process.

Accepts a KillProcessRequest message and returns a Empty message. |

Top

spec.proto

Error

A proto object representing an error in spec/Scenario.

Field Type Label Description
type Error.ErrorType Holds the type of error
filename string Holds the filename.
lineNumber int32 Holds the line number of the error in file.
message string Holds the error message.

Fragment

A proto object representing Fragment. / Fragments, put together make up A Step

Field Type Label Description
fragmentType Fragment.FragmentType Type of Fragment, valid values are Text, Parameter
text string Text part of the Fragment, valid only if FragmentType=Text
parameter Parameter Parameter part of the Fragment, valid only if FragmentType=Parameter

Parameter

A proto object representing Fragment.

Field Type Label Description
parameterType Parameter.ParameterType Type of the Parameter. Valid values: Static, Dynamic, Special_String, Special_Table, Table
value string Holds the value of the parameter
name string Holds the name of the parameter, used as Key to lookup the value.
table ProtoTable Holds the table value, if parameterType=Table or Special_Table

ProtoComment

A proto object representing Comment.

Field Type Label Description
text string Text representing the Comment.

ProtoConcept

Concept is a type of step, that can have multiple Steps. / But from a caller's perspective, it is still used as any other Step / A proto object representing a Concept

Field Type Label Description
conceptStep ProtoStep Represents the Step value of a Concept.
steps ProtoItem repeated Collection of Steps in the given concepts.
conceptExecutionResult ProtoStepExecutionResult Holds the execution result.

ProtoExecutionResult

A proto object representing the result of an execution

Field Type Label Description
failed bool Flag to indicate failure
recoverableError bool Flag to indicate if the error is recoverable from.
errorMessage string The actual error message.
stackTrace string Stacktrace of the error
screenShot bytes [DEPRECATED, use failureScreenshotFile] Bytes containing screenshot taken at the time of failure.
executionTime int64 Holds the time taken for executing this scenario.
message string repeated Additional information at exec time to be available on reports
errorType ProtoExecutionResult.ErrorType Type of the Error. Valid values: ASSERTION, VERIFICATION. Default: ASSERTION
failureScreenshot bytes [DEPRECATED, use failureScreenshotFile] Bytes containing screenshot taken at the time of failure.
screenshots bytes repeated [DEPRECATED, use screenshotFiles] Bytes array containing screenshots at the time of it invoked
failureScreenshotFile string Path to the screenshot file captured at the time of failure.
screenshotFiles string repeated Path to the screenshot files captured using Gauge screenshsot API.

ProtoHookFailure

A proto object representing a pre-hook failure. / Used to hold failure information for before_suite, before_spec, before_scenario and before_spec hooks.

Field Type Label Description
stackTrace string Stacktrace from the failure
errorMessage string Error message from the failure
screenShot bytes [DEPRECATED, use failureScreenshotFile] Bytes holding the screenshot taken at the time of failure.
tableRowIndex int32 Contains table row index corresponding to datatable rows
failureScreenshot bytes [DEPRECATED, use failureScreenshotFile] Bytes holding the screenshot taken at the time of failure.
failureScreenshotFile string Path to the screenshot file captured at the time of failure.

ProtoItem

Container for all valid Items under a Specification.

Field Type Label Description
itemType ProtoItem.ItemType Itemtype of the current ProtoItem
step ProtoStep Holds the Step definition. Valid only if ItemType = Step
concept ProtoConcept Holds the Concept definition. Valid only if ItemType = Concept
scenario ProtoScenario Holds the Scenario definition. Valid only if ItemType = Scenario
tableDrivenScenario ProtoTableDrivenScenario Holds the TableDrivenScenario definition. Valid only if ItemType = TableDrivenScenario
comment ProtoComment Holds the Comment definition. Valid only if ItemType = Comment
table ProtoTable Holds the Table definition. Valid only if ItemType = Table
tags ProtoTags Holds the Tags definition. Valid only if ItemType = Tags
fileName string Holds the Filename that the item belongs to

ProtoScenario

A proto object representing a Scenario

Field Type Label Description
scenarioHeading string Heading of the given Scenario
failed bool Flag to indicate if the Scenario execution failed
contexts ProtoItem repeated Collection of Context steps. The Context steps are executed before every run.
scenarioItems ProtoItem repeated Collection of Items under a scenario. These could be Steps, Comments, Tags, TableDrivenScenarios or Tables
preHookFailure ProtoHookFailure Contains a 'before' hook failure message. This happens when the before_scenario hook has an error.
postHookFailure ProtoHookFailure Contains a 'after' hook failure message. This happens when the after_scenario hook has an error.
tags string repeated Contains a list of tags that are defined at the specification level. Scenario tags are not present here.
executionTime int64 Holds the time taken for executing this scenario.
skipped bool Flag to indicate if the Scenario execution is skipped
skipErrors string repeated Holds the error messages for skipping scenario from execution
ID string Holds the unique Identifier of a scenario.
tearDownSteps ProtoItem repeated Collection of Teardown steps. The Teardown steps are executed after every run.
span Span Span(start, end) of scenario
executionStatus ExecutionStatus Execution status for the scenario
preHookMessages string repeated Additional information at pre hook exec time to be available on reports
postHookMessages string repeated Additional information at post hook exec time to be available on reports
preHookMessage string repeated [DEPRECATED, use preHookMessages] Additional information at pre hook exec time to be available on reports
postHookMessage string repeated [DEPRECATED, use postHookMessages] Additional information at post hook exec time to be available on reports
preHookScreenshots bytes repeated [DEPRECATED, use preHookScreenshotFiles] Capture Screenshot at pre hook exec time to be available on reports
postHookScreenshots bytes repeated [DEPRECATED, use postHookScreenshotFiles] Capture Screenshot at post hook exec time to be available on reports
preHookScreenshotFiles string repeated Screenshots captured on pre hook exec time to be available on reports
postHookScreenshotFiles string repeated Screenshots captured on post hook exec time to be available on reports
retriesCount int64 Number of retires

ProtoScenarioResult

A proto object representing the result of Scenario execution.

Field Type Label Description
protoItem ProtoItem Collection of scenarios in scenario execution result.
executionTime int64 Holds the time taken for executing the whole suite.
timestamp string Holds the timestamp of event starting.

ProtoSpec

A proto object representing a Specification / A specification can contain Scenarios or Steps, besides Comments

Field Type Label Description
specHeading string Heading describing the Specification
items ProtoItem repeated A collection of items that come under this step
isTableDriven bool Flag indicating if this is a Table Driven Specification. The table is defined in the context, this is different from using a table parameter.
preHookFailures ProtoHookFailure repeated Contains a 'before' hook failure message. This happens when the before_spec hook has an error.
postHookFailures ProtoHookFailure repeated Contains a 'before' hook failure message. This happens when the after_hook hook has an error.
fileName string Contains the filename for that holds this specification.
tags string repeated Contains a list of tags that are defined at the specification level. Scenario tags are not present here.
preHookMessages string repeated Additional information at pre hook exec time to be available on reports
postHookMessages string repeated Additional information at post hook exec time to be available on reports
preHookMessage string repeated [DEPRECATED, use preHookMessages] Additional information at pre hook exec time to be available on reports
postHookMessage string repeated [DEPRECATED, use postHookMessages] Additional information at post hook exec time to be available on reports
preHookScreenshots bytes repeated [DEPRECATED, use preHookScreenshotFiles] Capture Screenshot at pre hook exec time to be available on reports
postHookScreenshots bytes repeated [DEPRECATED, use postHookScreenshotFiles] Capture Screenshot at post hook exec time to be available on reports
itemCount int64 meta field to indicate the number of items in the list / used when items are sent as individual chunk
preHookScreenshotFiles string repeated Screenshots captured on pre hook exec time to be available on reports
postHookScreenshotFiles string repeated Screenshots captured on post hook exec time to be available on reports

ProtoSpecResult

A proto object representing the result of Spec execution.

Field Type Label Description
protoSpec ProtoSpec Represents the corresponding Specification
scenarioCount int32 Holds the number of Scenarios executed
scenarioFailedCount int32 Holds the number of Scenarios failed
failed bool Flag to indicate failure
failedDataTableRows int32 repeated Holds the row numbers, which caused the execution to fail.
executionTime int64 Holds the time taken for executing the spec.
skipped bool Flag to indicate if spec is skipped
scenarioSkippedCount int32 Holds the number of Scenarios skipped
skippedDataTableRows int32 repeated Holds the row numbers, for which the execution skipped.
errors Error repeated Holds parse, validation and skipped errors.
timestamp string Holds the timestamp of event starting.

ProtoStep

A proto object representing a Step

Field Type Label Description
actualText string Holds the raw text of the Step as defined in the spec file. This contains the actual parameter values.
parsedText string Contains the parsed text of the Step. This will have placeholders for the parameters.
fragments Fragment repeated Collection of a list of fragments for a Step. A fragment could be either text or parameter.
stepExecutionResult ProtoStepExecutionResult Holds the result from the execution.
preHookMessages string repeated Additional information at pre hook exec time to be available on reports
postHookMessages string repeated Additional information at post hook exec time to be available on reports
preHookScreenshots bytes repeated [DEPRECATED, use preHookScreenshotFiles] Capture Screenshot at pre hook exec time to be available on reports
postHookScreenshots bytes repeated [DEPRECATED, use postHookScreenshotFiles] Capture Screenshot at post hook exec time to be available on reports
preHookScreenshotFiles string repeated Screenshots captured on pre hook exec time to be available on reports
postHookScreenshotFiles string repeated Screenshots captured on post hook exec time to be available on reports

ProtoStepExecutionResult

A proto object representing Step Execution result

Field Type Label Description
executionResult ProtoExecutionResult The actual result of the execution
preHookFailure ProtoHookFailure Contains a 'before' hook failure message. This happens when the before_step hook has an error.
postHookFailure ProtoHookFailure Contains a 'after' hook failure message. This happens when the after_step hook has an error.
skipped bool
skippedReason string

ProtoStepResult

A proto object representing the result of Step execution.

Field Type Label Description
protoItem ProtoItem Collection of steps in step execution result.
executionTime int64 Holds the time taken for executing the whole suite.
timestamp string Holds the timestamp of event starting.

ProtoStepValue

A proto object representing a Step value.

Field Type Label Description
stepValue string The actual string value describing he Step
parameterizedStepValue string The parameterized string value describing he Step. The parameters are replaced with placeholders.
parameters string repeated A collection of strings representing the parameters.

ProtoSuiteResult

A proto object representing the result of entire Suite execution.

Field Type Label Description
specResults ProtoSpecResult repeated Contains the result from the execution
preHookFailure ProtoHookFailure Contains a 'before' hook failure message. This happens when the before_suite hook has an error
postHookFailure ProtoHookFailure Contains a 'after' hook failure message. This happens when the after_suite hook has an error
failed bool Flag to indicate failure
specsFailedCount int32 Holds the count of number of Specifications that failed.
executionTime int64 Holds the time taken for executing the whole suite.
successRate float Holds a metric indicating the success rate of the execution.
environment string The environment against which execution was done
tags string Tag expression used for filtering specification
projectName string Project name
timestamp string Timestamp of when execution started
specsSkippedCount int32
preHookMessages string repeated Additional information at pre hook exec time to be available on reports
postHookMessages string repeated Additional information at post hook exec time to be available on reports
preHookMessage string repeated [DEPRECATED, use preHookMessages] Additional information at pre hook exec time to be available on reports
postHookMessage string repeated [DEPRECATED, use postHookMessages] Additional information at post hook exec time to be available on reports
preHookScreenshots bytes repeated [DEPRECATED, use preHookScreenshotFiles] Capture Screenshot at pre hook exec time to be available on reports
postHookScreenshots bytes repeated [DEPRECATED, use postHookScreenshotFiles] Capture Screenshot at post hook exec time to be available on reports
chunked bool Indicates if the result is sent in chunks
chunkSize int64 Indicates the number of chunks to expect after this
preHookScreenshotFiles string repeated Screenshots captured on pre hook exec time to be available on reports
postHookScreenshotFiles string repeated Screenshots captured on post hook exec time to be available on reports

ProtoTable

A proto object representing Table.

Field Type Label Description
headers ProtoTableRow Contains the Headers for the table
rows ProtoTableRow repeated Contains the Rows for the table

ProtoTableDrivenScenario

A proto object representing a TableDrivenScenario

Field Type Label Description
scenario ProtoScenario Scenario under Table driven execution
tableRowIndex int32 Row Index of data table against which the current scenario is executed
scenarioTableRowIndex int32 Row Index of scenario data table against which the current scenario is executed
isSpecTableDriven bool Executed against a spec data table
isScenarioTableDriven bool Executed against a scenario data table
scenarioDataTable ProtoTable Holds the scenario data table
scenarioTableRow ProtoTable Hold the row of scenario data table.

ProtoTableRow

A proto object representing Table.

Field Type Label Description
cells string repeated Represents the cells of a given table

ProtoTags

A proto object representing Tags

Field Type Label Description
tags string repeated A collection of Tags

Span

A proto object representing a Span of content

Field Type Label Description
start int64
end int64
startChar int64
endChar int64

Error.ErrorType

Name Number Description
PARSE_ERROR 0
VALIDATION_ERROR 1

ExecutionStatus

Execution Status

Name Number Description
NOTEXECUTED 0
PASSED 1
FAILED 2
SKIPPED 3

Fragment.FragmentType

Enum representing the types of Fragment

Name Number Description
Text 0 Fragment is a Text part
Parameter 1 Fragment is a Parameter part

Parameter.ParameterType

Enum representing types of Parameter.

Name Number Description
Static 0 Static parameter. The value of the parameter is defined at the Step.
Dynamic 1 Dynamic parameter. This is a parameter placeholder, and the actual value is injected at runtime, depending on the context of the call.
Special_String 2 Special paramter, taking a string value. Special paramters are read from a file.
Special_Table 3 Special paramter, taking a Table value. This parameter is read from a csv file.
Table 4 A table parameter, used for data driven execution.

ProtoExecutionResult.ErrorType

Name Number Description
ASSERTION 0
VERIFICATION 1

ProtoItem.ItemType

Enumerates various item types that the proto item can contain. Valid types are: Step, Comment, Concept, Scenario, TableDrivenScenario, Table, Tags

Name Number Description
Step 0 Item is a Step
Comment 1 Item is a Comment
Concept 2 Item is a Concept
Scenario 3 Item is a Scenario
TableDrivenScenario 4 Item is a TableDrivenScenario, a special case of Scenario, where there is a Context Step defining a table.
Table 5 Item is a Table
Tags 6 Item is a Tag

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)