@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:39.695Z") @Stability(value=Experimental) public class IntegTestCase extends Construct
Allows the definition of test properties that apply to all stacks under this case.
Example:
public class StackUnderTestProps extends StackProps {
private Architecture architecture;
public Architecture getArchitecture() {
return this.architecture;
}
public StackUnderTestProps architecture(Architecture architecture) {
this.architecture = architecture;
return this;
}
}
public class StackUnderTest extends Stack {
public StackUnderTest(Construct scope, String id, StackUnderTestProps props) {
super(scope, id, props);
Function.Builder.create(this, "Handler")
.runtime(Runtime.NODEJS_12_X)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "lambda-handler")))
.architecture(props.getArchitecture())
.build();
}
}
// Beginning of the test suite
App app = new App();
Stack stack = new Stack(app, "stack");
IntegTestCase differentArchsCase = IntegTestCase.Builder.create(stack, "DifferentArchitectures")
.stacks(List.of(
new StackUnderTest(app, "Stack1", new StackUnderTestProps()
.architecture(Architecture.ARM_64)
),
new StackUnderTest(app, "Stack2", new StackUnderTestProps()
.architecture(Architecture.X86_64)
)))
.build();
// There must be exactly one instance of TestCase per file
// There must be exactly one instance of TestCase per file
IntegTest.Builder.create(app, "integ-test")
// Register as many test cases as you want here
.testCases(List.of(differentArchsCase))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
IntegTestCase.Builder
(experimental) A fluent builder for
IntegTestCase. |
software.amazon.jsii.JsiiObject.InitializationModeIConstruct.Jsii$Default, IConstruct.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
IntegTestCase(Construct scope,
String id,
IntegTestCaseProps props) |
protected |
IntegTestCase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
IntegTestCase(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
IntegManifest |
getManifest()
(experimental) The integration test manifest for this test case.
|
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected IntegTestCase(software.amazon.jsii.JsiiObjectRef objRef)
protected IntegTestCase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public IntegTestCase(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
IntegTestCaseProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public IntegManifest getManifest()
Manifests are used by the integration test runner.
Copyright © 2022. All rights reserved.