Skip to main content

executions

Creates, updates, deletes, gets or lists an executions resource.

Overview​

Nameexecutions
TypeResource
Idfirebase.toolresults.executions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
completionTimeobjectThe time when the Execution status transitioned to COMPLETE. This value will be set automatically when state transitions to COMPLETE. - In response: set if the execution state is COMPLETE. - In create/update request: never set (id: Timestamp)
creationTimeobjectThe time when the Execution was created. This value will be set automatically when CreateExecution is called. - In response: always set - In create/update request: never set (id: Timestamp)
dimensionDefinitionsarrayThe dimensions along which different steps in this execution may vary. This must remain fixed over the life of the execution. Returns INVALID_ARGUMENT if this field is set in an update request. Returns INVALID_ARGUMENT if the same name occurs in more than one dimension_definition. Returns INVALID_ARGUMENT if the size of the list is over 100. - In response: present if set by create - In create request: optional - In update request: never set
executionIdstringA unique identifier within a History for this Execution. Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. - In response always set - In create/update request: never set
outcomeobjectClassify the result, for example into SUCCESS or FAILURE - In response: present if set by create/update request - In create/update request: optional (id: Outcome)
specificationobjectLightweight information about execution request. - In response: present if set by create - In create: optional - In update: optional (id: Specification)
statestringThe initial state is IN_PROGRESS. The only legal state transitions is from IN_PROGRESS to COMPLETE. A PRECONDITION_FAILED will be returned if an invalid transition is requested. The state can only be set to COMPLETE once. A FAILED_PRECONDITION will be returned if the state is set to COMPLETE multiple times. If the state is set to COMPLETE, all the in-progress steps within the execution will be set as COMPLETE. If the outcome of the step is not set, the outcome will be set to INCONCLUSIVE. - In response always set - In create/update request: optional (unknownState, pending, inProgress, complete)
testExecutionMatrixIdstringTestExecution Matrix ID that the TestExecutionService uses. - In response: present if set by create - In create: optional - In update: never set

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectId, historyId, executionIdGets an Execution. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist
listselectprojectId, historyIdpageToken, pageSizeLists Executions for a given History. The executions are sorted by creation_time in descending order. The execution_id key will be used to order the executions with the same creation_time. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist
createinsertprojectId, historyIdrequestIdCreates an Execution. The returned Execution will have the id set. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist
patchupdateprojectId, historyId, executionIdrequestIdUpdates an existing Execution with the supplied partial entity. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
executionIdstring
historyIdstring
projectIdstring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples​

Gets an Execution. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist

SELECT
completionTime,
creationTime,
dimensionDefinitions,
executionId,
outcome,
specification,
state,
testExecutionMatrixId
FROM firebase.toolresults.executions
WHERE projectId = '{{ projectId }}' -- required
AND historyId = '{{ historyId }}' -- required
AND executionId = '{{ executionId }}' -- required
;

INSERT examples​

Creates an Execution. The returned Execution will have the id set. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist

INSERT INTO firebase.toolresults.executions (
data__executionId,
data__completionTime,
data__dimensionDefinitions,
data__specification,
data__outcome,
data__testExecutionMatrixId,
data__creationTime,
data__state,
projectId,
historyId,
requestId
)
SELECT
'{{ executionId }}',
'{{ completionTime }}',
'{{ dimensionDefinitions }}',
'{{ specification }}',
'{{ outcome }}',
'{{ testExecutionMatrixId }}',
'{{ creationTime }}',
'{{ state }}',
'{{ projectId }}',
'{{ historyId }}',
'{{ requestId }}'
RETURNING
completionTime,
creationTime,
dimensionDefinitions,
executionId,
outcome,
specification,
state,
testExecutionMatrixId
;

UPDATE examples​

Updates an existing Execution with the supplied partial entity. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist

UPDATE firebase.toolresults.executions
SET
data__executionId = '{{ executionId }}',
data__completionTime = '{{ completionTime }}',
data__dimensionDefinitions = '{{ dimensionDefinitions }}',
data__specification = '{{ specification }}',
data__outcome = '{{ outcome }}',
data__testExecutionMatrixId = '{{ testExecutionMatrixId }}',
data__creationTime = '{{ creationTime }}',
data__state = '{{ state }}'
WHERE
projectId = '{{ projectId }}' --required
AND historyId = '{{ historyId }}' --required
AND executionId = '{{ executionId }}' --required
AND requestId = '{{ requestId}}'
RETURNING
completionTime,
creationTime,
dimensionDefinitions,
executionId,
outcome,
specification,
state,
testExecutionMatrixId;