steps
Creates, updates, deletes, gets or lists a steps
resource.
Overview
Name | steps |
Type | Resource |
Id | firebase.toolresults.steps |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. - In response: always set - In create request: always set - In update request: never set |
completionTime | object | The time when the step status was set 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) |
creationTime | object | The time when the step was created. - In response: always set - In create/update request: never set (id: Timestamp) |
description | string | A description of this tool For example: mvn clean package -D skipTests=true - In response: present if set by create/update request - In create/update request: optional |
deviceUsageDuration | object | How much the device resource is used to perform the test. This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. - In response: present if previously set. - In create request: optional - In update request: optional (id: Duration) |
dimensionValue | array | If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. The keys must exactly match the dimension_definition of the execution. For example, if the execution has dimension_definition = ['attempt', 'device'] then a step must define values for those dimensions, eg. dimension_value = ['attempt': '1', 'device': 'Nexus 6'] If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have dimension_value = ['attempt': '', 'device': 'Nexus 6'] If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. - In response: present if set by create - In create request: optional - In update request: never set |
hasImages | boolean | Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. - In response: always set - In create/update request: never set |
labels | array | Arbitrary user-supplied key/value pairs that are associated with the step. Users are responsible for managing the key namespace such that keys don't accidentally collide. An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value |
multiStep | object | Details when multiple steps are run with the same configuration as a group. These details can be used identify which group this step is part of. It also identifies the groups 'primary step' which indexes all the group members. - In response: present if previously set. - In create request: optional, set iff this step was performed more than once. - In update request: optional (id: MultiStep) |
outcome | object | Classification of the result, for example into SUCCESS or FAILURE - In response: present if set by create/update request - In create/update request: optional (id: Outcome) |
runDuration | object | How long it took for this step to run. If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional (id: Duration) |
state | string | The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE A PRECONDITION_FAILED will be returned if an invalid transition is requested. It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. - In response: always set - In create/update request: optional |
stepId | string | A unique identifier within a Execution for this Step. Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. - In response: always set - In create/update request: never set |
testExecutionStep | object | An execution of a test runner. (id: TestExecutionStep) |
toolExecutionStep | object | An execution of a tool (used for steps we don't explicitly support). (id: ToolExecutionStep) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. - In response: always set - In create request: always set - In update request: never set |
completionTime | object | The time when the step status was set 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) |
creationTime | object | The time when the step was created. - In response: always set - In create/update request: never set (id: Timestamp) |
description | string | A description of this tool For example: mvn clean package -D skipTests=true - In response: present if set by create/update request - In create/update request: optional |
deviceUsageDuration | object | How much the device resource is used to perform the test. This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. - In response: present if previously set. - In create request: optional - In update request: optional (id: Duration) |
dimensionValue | array | If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. The keys must exactly match the dimension_definition of the execution. For example, if the execution has dimension_definition = ['attempt', 'device'] then a step must define values for those dimensions, eg. dimension_value = ['attempt': '1', 'device': 'Nexus 6'] If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have dimension_value = ['attempt': '', 'device': 'Nexus 6'] If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. - In response: present if set by create - In create request: optional - In update request: never set |
hasImages | boolean | Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. - In response: always set - In create/update request: never set |
labels | array | Arbitrary user-supplied key/value pairs that are associated with the step. Users are responsible for managing the key namespace such that keys don't accidentally collide. An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value |
multiStep | object | Details when multiple steps are run with the same configuration as a group. These details can be used identify which group this step is part of. It also identifies the groups 'primary step' which indexes all the group members. - In response: present if previously set. - In create request: optional, set iff this step was performed more than once. - In update request: optional (id: MultiStep) |
outcome | object | Classification of the result, for example into SUCCESS or FAILURE - In response: present if set by create/update request - In create/update request: optional (id: Outcome) |
runDuration | object | How long it took for this step to run. If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional (id: Duration) |
state | string | The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE A PRECONDITION_FAILED will be returned if an invalid transition is requested. It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. - In response: always set - In create/update request: optional |
stepId | string | A unique identifier within a Execution for this Step. Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. - In response: always set - In create/update request: never set |
testExecutionStep | object | An execution of a test runner. (id: TestExecutionStep) |
toolExecutionStep | object | An execution of a tool (used for steps we don't explicitly support). (id: ToolExecutionStep) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectId , historyId , executionId , stepId | Gets a Step. 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 Step does not exist | |
list | select | projectId , historyId , executionId | pageToken , pageSize | Lists Steps for a given Execution. The steps are sorted by creation_time in descending order. The step_id key will be used to order the steps 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 - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist |
create | insert | projectId , historyId , executionId | requestId | Creates a Step. The returned Step 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 - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist |
patch | update | projectId , historyId , executionId , stepId | requestId | Updates an existing Step with the supplied partial entity. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist |
accessibility_clusters | exec | projectsId , historiesId , executionsId , stepsId | locale | Lists accessibility clusters for a given Step 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 - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if the locale format is incorrect - NOT_FOUND - if the containing Step does not exist |
publish_xunit_xml_files | exec | projectId , historyId , executionId , stepId | Publish xml files to an existing Step. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g. try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution 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.
Name | Datatype | Description |
---|---|---|
executionId | string | |
executionsId | string | |
historiesId | string | |
historyId | string | |
projectId | string | |
projectsId | string | |
stepId | string | |
stepsId | string | |
locale | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string |
SELECT
examples
- get
- list
Gets a Step. 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 Step does not exist
SELECT
name,
completionTime,
creationTime,
description,
deviceUsageDuration,
dimensionValue,
hasImages,
labels,
multiStep,
outcome,
runDuration,
state,
stepId,
testExecutionStep,
toolExecutionStep
FROM firebase.toolresults.steps
WHERE projectId = '{{ projectId }}' -- required
AND historyId = '{{ historyId }}' -- required
AND executionId = '{{ executionId }}' -- required
AND stepId = '{{ stepId }}' -- required;
Lists Steps for a given Execution. The steps are sorted by creation_time in descending order. The step_id key will be used to order the steps 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 - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist
SELECT
name,
completionTime,
creationTime,
description,
deviceUsageDuration,
dimensionValue,
hasImages,
labels,
multiStep,
outcome,
runDuration,
state,
stepId,
testExecutionStep,
toolExecutionStep
FROM firebase.toolresults.steps
WHERE projectId = '{{ projectId }}' -- required
AND historyId = '{{ historyId }}' -- required
AND executionId = '{{ executionId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
INSERT
examples
- create
- Manifest
Creates a Step. The returned Step 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 - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist
INSERT INTO firebase.toolresults.steps (
data__testExecutionStep,
data__toolExecutionStep,
data__stepId,
data__creationTime,
data__completionTime,
data__name,
data__description,
data__state,
data__outcome,
data__hasImages,
data__labels,
data__dimensionValue,
data__runDuration,
data__deviceUsageDuration,
data__multiStep,
projectId,
historyId,
executionId,
requestId
)
SELECT
'{{ testExecutionStep }}',
'{{ toolExecutionStep }}',
'{{ stepId }}',
'{{ creationTime }}',
'{{ completionTime }}',
'{{ name }}',
'{{ description }}',
'{{ state }}',
'{{ outcome }}',
{{ hasImages }},
'{{ labels }}',
'{{ dimensionValue }}',
'{{ runDuration }}',
'{{ deviceUsageDuration }}',
'{{ multiStep }}',
'{{ projectId }}',
'{{ historyId }}',
'{{ executionId }}',
'{{ requestId }}'
RETURNING
name,
completionTime,
creationTime,
description,
deviceUsageDuration,
dimensionValue,
hasImages,
labels,
multiStep,
outcome,
runDuration,
state,
stepId,
testExecutionStep,
toolExecutionStep
;
# Description fields are for documentation purposes
- name: steps
props:
- name: projectId
value: string
description: Required parameter for the steps resource.
- name: historyId
value: string
description: Required parameter for the steps resource.
- name: executionId
value: string
description: Required parameter for the steps resource.
- name: testExecutionStep
value: object
description: >
An execution of a test runner.
- name: toolExecutionStep
value: object
description: >
An execution of a tool (used for steps we don't explicitly support).
- name: stepId
value: string
description: >
A unique identifier within a Execution for this Step. Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. - In response: always set - In create/update request: never set
- name: creationTime
value: object
description: >
The time when the step was created. - In response: always set - In create/update request: never set
- name: completionTime
value: object
description: >
The time when the step status was set 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
- name: name
value: string
description: >
A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. - In response: always set - In create request: always set - In update request: never set
- name: description
value: string
description: >
A description of this tool For example: mvn clean package -D skipTests=true - In response: present if set by create/update request - In create/update request: optional
- name: state
value: string
description: >
The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE A PRECONDITION_FAILED will be returned if an invalid transition is requested. It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. - In response: always set - In create/update request: optional
valid_values: ['unknownState', 'pending', 'inProgress', 'complete']
- name: outcome
value: object
description: >
Classification of the result, for example into SUCCESS or FAILURE - In response: present if set by create/update request - In create/update request: optional
- name: hasImages
value: boolean
description: >
Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. - In response: always set - In create/update request: never set
- name: labels
value: array
description: >
Arbitrary user-supplied key/value pairs that are associated with the step. Users are responsible for managing the key namespace such that keys don't accidentally collide. An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value
- name: dimensionValue
value: array
description: >
If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. The keys must exactly match the dimension_definition of the execution. For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. - In response: present if set by create - In create request: optional - In update request: never set
- name: runDuration
value: object
description: >
How long it took for this step to run. If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional
- name: deviceUsageDuration
value: object
description: >
How much the device resource is used to perform the test. This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. - In response: present if previously set. - In create request: optional - In update request: optional
- name: multiStep
value: object
description: >
Details when multiple steps are run with the same configuration as a group. These details can be used identify which group this step is part of. It also identifies the groups 'primary step' which indexes all the group members. - In response: present if previously set. - In create request: optional, set iff this step was performed more than once. - In update request: optional
- name: requestId
value: string
UPDATE
examples
- patch
Updates an existing Step with the supplied partial entity. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist
UPDATE firebase.toolresults.steps
SET
data__testExecutionStep = '{{ testExecutionStep }}',
data__toolExecutionStep = '{{ toolExecutionStep }}',
data__stepId = '{{ stepId }}',
data__creationTime = '{{ creationTime }}',
data__completionTime = '{{ completionTime }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__state = '{{ state }}',
data__outcome = '{{ outcome }}',
data__hasImages = {{ hasImages }},
data__labels = '{{ labels }}',
data__dimensionValue = '{{ dimensionValue }}',
data__runDuration = '{{ runDuration }}',
data__deviceUsageDuration = '{{ deviceUsageDuration }}',
data__multiStep = '{{ multiStep }}'
WHERE
projectId = '{{ projectId }}' --required
AND historyId = '{{ historyId }}' --required
AND executionId = '{{ executionId }}' --required
AND stepId = '{{ stepId }}' --required
AND requestId = '{{ requestId}}'
RETURNING
name,
completionTime,
creationTime,
description,
deviceUsageDuration,
dimensionValue,
hasImages,
labels,
multiStep,
outcome,
runDuration,
state,
stepId,
testExecutionStep,
toolExecutionStep;
Lifecycle Methods
- accessibility_clusters
- publish_xunit_xml_files
Lists accessibility clusters for a given Step 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 - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if the locale format is incorrect - NOT_FOUND - if the containing Step does not exist
EXEC firebase.toolresults.steps.accessibility_clusters
@projectsId='{{ projectsId }}' --required,
@historiesId='{{ historiesId }}' --required,
@executionsId='{{ executionsId }}' --required,
@stepsId='{{ stepsId }}' --required,
@locale='{{ locale }}';
Publish xml files to an existing Step. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g. try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist
EXEC firebase.toolresults.steps.publish_xunit_xml_files
@projectId='{{ projectId }}' --required,
@historyId='{{ historyId }}' --required,
@executionId='{{ executionId }}' --required,
@stepId='{{ stepId }}' --required
@@json=
'{
"xunitXmlFiles": "{{ xunitXmlFiles }}"
}';