CreateTestSuiteCommand

Creates a test suite.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AppTestClient, CreateTestSuiteCommand } from "@aws-sdk/client-apptest"; // ES Modules import
// const { AppTestClient, CreateTestSuiteCommand } = require("@aws-sdk/client-apptest"); // CommonJS import
const client = new AppTestClient(config);
const input = { // CreateTestSuiteRequest
  name: "STRING_VALUE", // required
  description: "STRING_VALUE",
  beforeSteps: [ // StepList
    { // Step
      name: "STRING_VALUE", // required
      description: "STRING_VALUE",
      action: { // StepAction Union: only one key present
        resourceAction: { // ResourceAction Union: only one key present
          m2ManagedApplicationAction: { // M2ManagedApplicationAction
            resource: "STRING_VALUE", // required
            actionType: "Configure" || "Deconfigure", // required
            properties: { // M2ManagedActionProperties
              forceStop: true || false,
              importDataSetLocation: "STRING_VALUE",
            },
          },
          m2NonManagedApplicationAction: { // M2NonManagedApplicationAction
            resource: "STRING_VALUE", // required
            actionType: "Configure" || "Deconfigure", // required
          },
          cloudFormationAction: { // CloudFormationAction
            resource: "STRING_VALUE", // required
            actionType: "Create" || "Delete",
          },
        },
        mainframeAction: { // MainframeAction
          resource: "STRING_VALUE", // required
          actionType: { // MainframeActionType Union: only one key present
            batch: { // Batch
              batchJobName: "STRING_VALUE", // required
              batchJobParameters: { // BatchJobParameters
                "<keys>": "STRING_VALUE",
              },
              exportDataSetNames: [ // ExportDataSetNames
                "STRING_VALUE",
              ],
            },
            tn3270: { // TN3270
              script: { // Script
                scriptLocation: "STRING_VALUE", // required
                type: "Selenium", // required
              },
              exportDataSetNames: [
                "STRING_VALUE",
              ],
            },
          },
          properties: { // MainframeActionProperties
            dmsTaskArn: "STRING_VALUE",
          },
        },
        compareAction: { // CompareAction
          input: { // Input Union: only one key present
            file: { // InputFile
              sourceLocation: "STRING_VALUE", // required
              targetLocation: "STRING_VALUE", // required
              fileMetadata: { // FileMetadata Union: only one key present
                dataSets: [ // DataSetList
                  { // DataSet
                    type: "PS", // required
                    name: "STRING_VALUE", // required
                    ccsid: "STRING_VALUE", // required
                    format: "FIXED" || "VARIABLE" || "LINE_SEQUENTIAL", // required
                    length: Number("int"), // required
                  },
                ],
                databaseCDC: { // DatabaseCDC
                  sourceMetadata: { // SourceDatabaseMetadata
                    type: "z/OS-DB2", // required
                    captureTool: "Precisely" || "AWS DMS", // required
                  },
                  targetMetadata: { // TargetDatabaseMetadata
                    type: "PostgreSQL", // required
                    captureTool: "Precisely" || "AWS DMS", // required
                  },
                },
              },
            },
          },
          output: { // Output Union: only one key present
            file: { // OutputFile
              fileLocation: "STRING_VALUE",
            },
          },
        },
      },
    },
  ],
  afterSteps: [
    {
      name: "STRING_VALUE", // required
      description: "STRING_VALUE",
      action: {//  Union: only one key present
        resourceAction: {//  Union: only one key present
          m2ManagedApplicationAction: {
            resource: "STRING_VALUE", // required
            actionType: "Configure" || "Deconfigure", // required
            properties: {
              forceStop: true || false,
              importDataSetLocation: "STRING_VALUE",
            },
          },
          m2NonManagedApplicationAction: {
            resource: "STRING_VALUE", // required
            actionType: "Configure" || "Deconfigure", // required
          },
          cloudFormationAction: {
            resource: "STRING_VALUE", // required
            actionType: "Create" || "Delete",
          },
        },
        mainframeAction: {
          resource: "STRING_VALUE", // required
          actionType: {//  Union: only one key present
            batch: {
              batchJobName: "STRING_VALUE", // required
              batchJobParameters: {
                "<keys>": "STRING_VALUE",
              },
              exportDataSetNames: [
                "STRING_VALUE",
              ],
            },
            tn3270: {
              script: {
                scriptLocation: "STRING_VALUE", // required
                type: "Selenium", // required
              },
              exportDataSetNames: [
                "STRING_VALUE",
              ],
            },
          },
          properties: {
            dmsTaskArn: "STRING_VALUE",
          },
        },
        compareAction: {
          input: {//  Union: only one key present
            file: {
              sourceLocation: "STRING_VALUE", // required
              targetLocation: "STRING_VALUE", // required
              fileMetadata: {//  Union: only one key present
                dataSets: [
                  {
                    type: "PS", // required
                    name: "STRING_VALUE", // required
                    ccsid: "STRING_VALUE", // required
                    format: "FIXED" || "VARIABLE" || "LINE_SEQUENTIAL", // required
                    length: Number("int"), // required
                  },
                ],
                databaseCDC: {
                  sourceMetadata: {
                    type: "z/OS-DB2", // required
                    captureTool: "Precisely" || "AWS DMS", // required
                  },
                  targetMetadata: {
                    type: "PostgreSQL", // required
                    captureTool: "Precisely" || "AWS DMS", // required
                  },
                },
              },
            },
          },
          output: {//  Union: only one key present
            file: {
              fileLocation: "STRING_VALUE",
            },
          },
        },
      },
    },
  ],
  testCases: { // TestCases Union: only one key present
    sequential: [ // TestCaseList
      "STRING_VALUE",
    ],
  },
  clientToken: "STRING_VALUE",
  tags: { // TagMap
    "<keys>": "STRING_VALUE",
  },
};
const command = new CreateTestSuiteCommand(input);
const response = await client.send(command);
// { // CreateTestSuiteResponse
//   testSuiteId: "STRING_VALUE", // required
//   testSuiteVersion: Number("int"), // required
// };

CreateTestSuiteCommand Input

See CreateTestSuiteCommandInput for more details

Parameter
Type
Description
name
Required
string | undefined

The name of the test suite.

testCases
Required
TestCases | undefined

The test cases in the test suite.

afterSteps
Step[] | undefined

The after steps of the test suite.

beforeSteps
Step[] | undefined

The before steps of the test suite.

clientToken
string | undefined

The client token of the test suite.

description
string | undefined

The description of the test suite.

tags
Record<string, string> | undefined

The tags of the test suite.

CreateTestSuiteCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
testSuiteId
Required
string | undefined

The suite ID of the test suite.

testSuiteVersion
Required
number | undefined

The suite version of the test suite.

Throws

Name
Fault
Details
AccessDeniedException
client

The account or role doesn't have the right permissions to make the request.

ConflictException
client

The parameters provided in the request conflict with existing resources.

InternalServerException
server

An unexpected error occurred during the processing of the request.

ServiceQuotaExceededException
client

One or more quotas for AWS Application Testing exceeds the limit.

ThrottlingException
client

The number of requests made exceeds the limit.

ValidationException
client

One or more parameter provided in the request is not valid.

AppTestServiceException
Base exception class for all service exceptions from AppTest service.