test_cases
Creates, updates, deletes or gets a test_case
resource or lists test_cases
in a region
Overview
Name | test_cases |
Type | Resource |
Description | Represents a Test Case that can be captured and executed |
Id | aws.apptest.test_cases |
Fields
Name | Datatype | Description |
---|---|---|
creation_time | string | |
description | string | |
last_update_time | string | |
latest_version | object | |
name | string | |
status | string | |
steps | array | |
tags | object | |
test_case_arn | string | |
test_case_id | string | |
test_case_version | number | |
region | string | AWS region. |
For more information, see AWS::AppTest::TestCase
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, Steps, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apptest.test_cases (
Name,
Steps,
region
)
SELECT
'{{ Name }}',
'{{ Steps }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apptest.test_cases (
Description,
Name,
Steps,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ Name }}',
'{{ Steps }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: test_case
props:
- name: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: Steps
value:
- Name: '{{ Name }}'
Description: '{{ Description }}'
Action: null
- name: Tags
value: {}
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