Skip to main content

test_cases

Creates, updates, deletes or gets a test_case resource or lists test_cases in a region

Overview

Nametest_cases
TypeResource
DescriptionRepresents a Test Case that can be captured and executed
Idaws.apptest.test_cases

Fields

NameDatatypeDescription
creation_timestring
descriptionstring
last_update_timestring
latest_versionobject
namestring
statusstring
stepsarray
tagsobject
test_case_arnstring
test_case_idstring
test_case_versionnumber
regionstringAWS region.

For more information, see AWS::AppTest::TestCase.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, Steps, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all test_cases in a region.

SELECT
region,
creation_time,
description,
last_update_time,
latest_version,
name,
status,
steps,
tags,
test_case_arn,
test_case_id,
test_case_version
FROM aws.apptest.test_cases
WHERE region = 'us-east-1';

Gets all properties from an individual test_case.

SELECT
region,
creation_time,
description,
last_update_time,
latest_version,
name,
status,
steps,
tags,
test_case_arn,
test_case_id,
test_case_version
FROM aws.apptest.test_cases
WHERE region = 'us-east-1' AND data__Identifier = '<TestCaseId>';

INSERT example

Use the following StackQL query and manifest file to create a new test_case resource, using stack-deploy.

/*+ create */
INSERT INTO aws.apptest.test_cases (
Name,
Steps,
region
)
SELECT
'{{ Name }}',
'{{ Steps }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apptest.test_cases
WHERE data__Identifier = '<TestCaseId>'
AND region = 'us-east-1';

Permissions

To operate on the test_cases resource, the following permissions are required:

Create

apptest:CreateTestCase,
apptest:GetTestCase,
apptest:ListTagsForResource

Read

apptest:GetTestCase,
apptest:ListTagsForResource

Update

apptest:UpdateTestCase,
apptest:GetTestCase,
apptest:TagResource,
apptest:UnTagResource,
apptest:ListTagsForResource

Delete

apptest:GetTestCase,
apptest:ListTagsForResource,
apptest:DeleteTestCase

List

apptest:ListTestCases