test_cases
Creates, updates, deletes, gets or lists a test_cases
resource.
Overview
Name | test_cases |
Type | Resource |
Id | google.integrations.test_cases |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_integrations_versions_test_cases_get
- projects_locations_integrations_versions_test_cases_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Auto-generated primary key. |
createTime | string (google-datetime) | Auto-generated. |
creatorEmail | string | Optional. The creator's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
databasePersistencePolicy | string | Optional. Various policies for how to persist the test execution info including execution info, execution export info, execution metadata index and execution param index.. |
description | string | Optional. Description of the test case. |
displayName | string | Required. The display name of test case. |
lastModifierEmail | string | The last modifier's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
lockHolderEmail | string | Optional. The edit lock holder's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
testInputParameters | array | Optional. Parameters that are expected to be passed to the test case when the test case is triggered. This gives the user the ability to provide default values. This should include all the output variables of the trigger as input variables. |
testTaskConfigs | array | Optional. However, the test case doesn't mock or assert anything without test_task_configs. |
triggerConfig | object | Configuration detail of a trigger. (id: GoogleCloudIntegrationsV1alphaTriggerConfig) |
triggerId | string | Required. This defines the trigger ID in workflow which is considered to be executed as starting point of the test case |
updateTime | string (google-datetime) | Auto-generated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Auto-generated primary key. |
createTime | string (google-datetime) | Auto-generated. |
creatorEmail | string | Optional. The creator's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
databasePersistencePolicy | string | Optional. Various policies for how to persist the test execution info including execution info, execution export info, execution metadata index and execution param index.. |
description | string | Optional. Description of the test case. |
displayName | string | Required. The display name of test case. |
lastModifierEmail | string | The last modifier's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
lockHolderEmail | string | Optional. The edit lock holder's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
testInputParameters | array | Optional. Parameters that are expected to be passed to the test case when the test case is triggered. This gives the user the ability to provide default values. This should include all the output variables of the trigger as input variables. |
testTaskConfigs | array | Optional. However, the test case doesn't mock or assert anything without test_task_configs. |
triggerConfig | object | Configuration detail of a trigger. (id: GoogleCloudIntegrationsV1alphaTriggerConfig) |
triggerId | string | Required. This defines the trigger ID in workflow which is considered to be executed as starting point of the test case |
updateTime | string (google-datetime) | Auto-generated. |
Methods
The following methods are available for this resource:
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 |
---|---|---|
integrationsId | string | |
locationsId | string | |
projectsId | string | |
testCasesId | string | |
versionsId | string | |
fileFormat | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
readMask | string (google-fieldmask) | |
testCaseId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_integrations_versions_test_cases_get
- projects_locations_integrations_versions_test_cases_list
Get a test case
SELECT
name,
createTime,
creatorEmail,
databasePersistencePolicy,
description,
displayName,
lastModifierEmail,
lockHolderEmail,
testInputParameters,
testTaskConfigs,
triggerConfig,
triggerId,
updateTime
FROM google.integrations.test_cases
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND integrationsId = '{{ integrationsId }}' -- required
AND versionsId = '{{ versionsId }}' -- required
AND testCasesId = '{{ testCasesId }}' -- required;
Lists all the test cases that satisfy the filters.
SELECT
name,
createTime,
creatorEmail,
databasePersistencePolicy,
description,
displayName,
lastModifierEmail,
lockHolderEmail,
testInputParameters,
testTaskConfigs,
triggerConfig,
triggerId,
updateTime
FROM google.integrations.test_cases
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND integrationsId = '{{ integrationsId }}' -- required
AND versionsId = '{{ versionsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND readMask = '{{ readMask }}';
INSERT
examples
- projects_locations_integrations_versions_test_cases_create
- Manifest
Creates a new test case
INSERT INTO google.integrations.test_cases (
data__displayName,
data__description,
data__triggerId,
data__testInputParameters,
data__testTaskConfigs,
data__databasePersistencePolicy,
data__creatorEmail,
data__createTime,
data__lastModifierEmail,
data__updateTime,
data__lockHolderEmail,
data__triggerConfig,
projectsId,
locationsId,
integrationsId,
versionsId,
testCaseId
)
SELECT
'{{ displayName }}',
'{{ description }}',
'{{ triggerId }}',
'{{ testInputParameters }}',
'{{ testTaskConfigs }}',
'{{ databasePersistencePolicy }}',
'{{ creatorEmail }}',
'{{ createTime }}',
'{{ lastModifierEmail }}',
'{{ updateTime }}',
'{{ lockHolderEmail }}',
'{{ triggerConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ integrationsId }}',
'{{ versionsId }}',
'{{ testCaseId }}'
RETURNING
name,
createTime,
creatorEmail,
databasePersistencePolicy,
description,
displayName,
lastModifierEmail,
lockHolderEmail,
testInputParameters,
testTaskConfigs,
triggerConfig,
triggerId,
updateTime
;
# Description fields are for documentation purposes
- name: test_cases
props:
- name: projectsId
value: string
description: Required parameter for the test_cases resource.
- name: locationsId
value: string
description: Required parameter for the test_cases resource.
- name: integrationsId
value: string
description: Required parameter for the test_cases resource.
- name: versionsId
value: string
description: Required parameter for the test_cases resource.
- name: displayName
value: string
description: >
Required. The display name of test case.
- name: description
value: string
description: >
Optional. Description of the test case.
- name: triggerId
value: string
description: >
Required. This defines the trigger ID in workflow which is considered to be executed as starting point of the test case
- name: testInputParameters
value: array
description: >
Optional. Parameters that are expected to be passed to the test case when the test case is triggered. This gives the user the ability to provide default values. This should include all the output variables of the trigger as input variables.
- name: testTaskConfigs
value: array
description: >
Optional. However, the test case doesn't mock or assert anything without test_task_configs.
- name: databasePersistencePolicy
value: string
description: >
Optional. Various policies for how to persist the test execution info including execution info, execution export info, execution metadata index and execution param index..
valid_values: ['DATABASE_PERSISTENCE_POLICY_UNSPECIFIED', 'DATABASE_PERSISTENCE_DISABLED', 'DATABASE_PERSISTENCE_ASYNC']
- name: creatorEmail
value: string
description: >
Optional. The creator's email address. Generated based on the End User Credentials/LOAS role of the user making the call.
- name: createTime
value: string
description: >
Auto-generated.
- name: lastModifierEmail
value: string
description: >
The last modifier's email address. Generated based on the End User Credentials/LOAS role of the user making the call.
- name: updateTime
value: string
description: >
Auto-generated.
- name: lockHolderEmail
value: string
description: >
Optional. The edit lock holder's email address. Generated based on the End User Credentials/LOAS role of the user making the call.
- name: triggerConfig
value: object
description: >
Configuration detail of a trigger.
- name: testCaseId
value: string
UPDATE
examples
- projects_locations_integrations_versions_test_cases_patch
Updates a test case
UPDATE google.integrations.test_cases
SET
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__triggerId = '{{ triggerId }}',
data__testInputParameters = '{{ testInputParameters }}',
data__testTaskConfigs = '{{ testTaskConfigs }}',
data__databasePersistencePolicy = '{{ databasePersistencePolicy }}',
data__creatorEmail = '{{ creatorEmail }}',
data__createTime = '{{ createTime }}',
data__lastModifierEmail = '{{ lastModifierEmail }}',
data__updateTime = '{{ updateTime }}',
data__lockHolderEmail = '{{ lockHolderEmail }}',
data__triggerConfig = '{{ triggerConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND integrationsId = '{{ integrationsId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND testCasesId = '{{ testCasesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
creatorEmail,
databasePersistencePolicy,
description,
displayName,
lastModifierEmail,
lockHolderEmail,
testInputParameters,
testTaskConfigs,
triggerConfig,
triggerId,
updateTime;
DELETE
examples
- projects_locations_integrations_versions_test_cases_delete
Deletes a test case
DELETE FROM google.integrations.test_cases
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND integrationsId = '{{ integrationsId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND testCasesId = '{{ testCasesId }}' --required;
Lifecycle Methods
- projects_locations_integrations_versions_test_cases_execute_test
- projects_locations_integrations_versions_test_cases_upload
- projects_locations_integrations_versions_test_cases_download
- projects_locations_integrations_versions_test_cases_takeover_edit_lock
- projects_locations_integrations_versions_test_cases_execute
Executes functional test
EXEC google.integrations.test_cases.projects_locations_integrations_versions_test_cases_execute_test
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@integrationsId='{{ integrationsId }}' --required,
@versionsId='{{ versionsId }}' --required,
@testCasesId='{{ testCasesId }}' --required
@@json=
'{
"inputParameters": "{{ inputParameters }}"
}';
Uploads a test case. The content can be a previously downloaded test case. Performs the same function as CreateTestCase, but accepts input in a string format, which holds the complete representation of the TestCase content.
EXEC google.integrations.test_cases.projects_locations_integrations_versions_test_cases_upload
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@integrationsId='{{ integrationsId }}' --required,
@versionsId='{{ versionsId }}' --required
@@json=
'{
"content": "{{ content }}",
"fileFormat": "{{ fileFormat }}"
}';
Downloads a test case. Retrieves the TestCase
for a given test_case_id
and returns the response as a string.
EXEC google.integrations.test_cases.projects_locations_integrations_versions_test_cases_download
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@integrationsId='{{ integrationsId }}' --required,
@versionsId='{{ versionsId }}' --required,
@testCasesId='{{ testCasesId }}' --required,
@fileFormat='{{ fileFormat }}';
Clear the lock fields and assign them to current user
EXEC google.integrations.test_cases.projects_locations_integrations_versions_test_cases_takeover_edit_lock
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@integrationsId='{{ integrationsId }}' --required,
@versionsId='{{ versionsId }}' --required,
@testCasesId='{{ testCasesId }}' --required;
Executes all test cases in an integration version.
EXEC google.integrations.test_cases.projects_locations_integrations_versions_test_cases_execute
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@integrationsId='{{ integrationsId }}' --required,
@versionsId='{{ versionsId }}' --required;