Experimental
@aws-cdk/integ-tests-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
IntegTestProps Struct
Integration test properties.
Example
declare const app: App;
declare const stack: Stack;
declare const sm: IStateMachine;
const testCase = new IntegTest(app, 'IntegTest', {
testCases: [stack],
});
// Start an execution
const start = testCase.assertions.awsApiCall('StepFunctions', 'startExecution', {
stateMachineArn: sm.stateMachineArn,
});
// describe the results of the execution
const describe = testCase.assertions.awsApiCall('StepFunctions', 'describeExecution', {
executionArn: start.getAttString('executionArn'),
});
// assert the results
describe.expect(ExpectedResult.objectLike({
status: 'SUCCEEDED',
}));
Properties
allowDeleteFailuresoptionalbooleanallow_delete_failuresoptionalboolallowDeleteFailuresoptionalBooleanAllowDeleteFailuresoptionalboolAllowDeleteFailuresoptional*bool= false#When false, the test will fail if CloudFormation skips deleting a resource during a stack update. When true, only a warning is printed.
allowDestroyoptionalstring[]allow_destroyoptionaltyping.List[str]allowDestroyoptionalList<String>AllowDestroyoptionalstring[]AllowDestroyoptional*[]*string#Default: do not allow destruction of any resources on update
notes
This list should only include resources that for this specific integration test we are sure will not cause errors or an outage if destroyed. For example, maybe we know that a new resource will be created first before the old resource is destroyed which prevents any outage.
e.g. ['AWS::IAM::Role']
assertionStackoptionalStackassertion_stackoptionalStackassertionStackoptionalStackAssertionStackoptionalStackAssertionStackoptionalStack#Default: a stack is created for you
cdkCommandOptionsoptionalCdkCommandscdk_command_optionsoptionalCdkCommandscdkCommandOptionsoptionalCdkCommandsCdkCommandOptionsoptionalCdkCommandsCdkCommandOptionsoptionalCdkCommands#Default: runner default options
diffAssetsoptionalbooleandiff_assetsoptionalbooldiffAssetsoptionalBooleanDiffAssetsoptionalboolDiffAssetsoptional*bool= false#For example any tests involving custom resources or bundling
enableLookupsoptionalbooleanenable_lookupsoptionalboolenableLookupsoptionalBooleanEnableLookupsoptionalboolEnableLookupsoptional*bool= false#If lookups are enabled then stackUpdateWorkflow must be set to false. Lookups should only be enabled when you are explicitly testing lookups.
Default: no hooks
e.g. { postDeploy: ['yarn', 'test'] }
providerLogLeveloptionalApplicationLogLevelprovider_log_leveloptionalApplicationLogLevelproviderLogLeveloptionalApplicationLogLevelProviderLogLeveloptionalApplicationLogLevelProviderLogLeveloptionalApplicationLogLevel= ApplicationLogLevel.FATAL#regionsoptionalstring[]regionsoptionaltyping.List[str]regionsoptionalList<String>Regionsoptionalstring[]Regionsoptional*[]*string#Default: can run in any region
stackUpdateWorkflowoptionalbooleanstack_update_workflowoptionalboolstackUpdateWorkflowoptionalBooleanStackUpdateWorkflowoptionalboolStackUpdateWorkflowoptional*bool= true#