Skip to main content

test_cases

Creates, updates, deletes, gets or lists a test_cases resource.

Overview

Nametest_cases
TypeResource
Idgoogle.integrations.test_cases

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Auto-generated primary key.
createTimestring (google-datetime)Auto-generated.
creatorEmailstringOptional. The creator's email address. Generated based on the End User Credentials/LOAS role of the user making the call.
databasePersistencePolicystringOptional. Various policies for how to persist the test execution info including execution info, execution export info, execution metadata index and execution param index..
descriptionstringOptional. Description of the test case.
displayNamestringRequired. The display name of test case.
lastModifierEmailstringThe last modifier's email address. Generated based on the End User Credentials/LOAS role of the user making the call.
lockHolderEmailstringOptional. The edit lock holder's email address. Generated based on the End User Credentials/LOAS role of the user making the call.
testInputParametersarrayOptional. 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.
testTaskConfigsarrayOptional. However, the test case doesn't mock or assert anything without test_task_configs.
triggerConfigobjectConfiguration detail of a trigger. (id: GoogleCloudIntegrationsV1alphaTriggerConfig)
triggerIdstringRequired. This defines the trigger ID in workflow which is considered to be executed as starting point of the test case
updateTimestring (google-datetime)Auto-generated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_integrations_versions_test_cases_getselectprojectsId, locationsId, integrationsId, versionsId, testCasesIdGet a test case
projects_locations_integrations_versions_test_cases_listselectprojectsId, locationsId, integrationsId, versionsIdfilter, pageSize, pageToken, orderBy, readMaskLists all the test cases that satisfy the filters.
projects_locations_integrations_versions_test_cases_createinsertprojectsId, locationsId, integrationsId, versionsIdtestCaseIdCreates a new test case
projects_locations_integrations_versions_test_cases_patchupdateprojectsId, locationsId, integrationsId, versionsId, testCasesIdupdateMaskUpdates a test case
projects_locations_integrations_versions_test_cases_deletedeleteprojectsId, locationsId, integrationsId, versionsId, testCasesIdDeletes a test case
projects_locations_integrations_versions_test_cases_execute_testexecprojectsId, locationsId, integrationsId, versionsId, testCasesIdExecutes functional test
projects_locations_integrations_versions_test_cases_uploadexecprojectsId, locationsId, integrationsId, versionsIdUploads 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.
projects_locations_integrations_versions_test_cases_downloadexecprojectsId, locationsId, integrationsId, versionsId, testCasesIdfileFormatDownloads a test case. Retrieves the TestCase for a given test_case_id and returns the response as a string.
projects_locations_integrations_versions_test_cases_takeover_edit_lockexecprojectsId, locationsId, integrationsId, versionsId, testCasesIdClear the lock fields and assign them to current user
projects_locations_integrations_versions_test_cases_executeexecprojectsId, locationsId, integrationsId, versionsIdExecutes all test cases in an integration version.

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
integrationsIdstring
locationsIdstring
projectsIdstring
testCasesIdstring
versionsIdstring
fileFormatstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
readMaskstring (google-fieldmask)
testCaseIdstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}';