@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:39.697Z") @Stability(value=Experimental) public interface IntegTestCaseProps extends software.amazon.jsii.JsiiSerializable, TestOptions
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 | Interface and Description |
|---|---|
static class |
IntegTestCaseProps.Builder
A builder for
IntegTestCaseProps |
static class |
IntegTestCaseProps.Jsii$Proxy
An implementation for
IntegTestCaseProps |
| Modifier and Type | Method and Description |
|---|---|
static IntegTestCaseProps.Builder |
builder() |
List<Stack> |
getStacks()
(experimental) Stacks to be deployed during the test.
|
getAllowDestroy, getCdkCommandOptions, getDiffAssets, getHooks, getRegions, getStackUpdateWorkflow@Stability(value=Experimental) @NotNull List<Stack> getStacks()
@Stability(value=Experimental) static IntegTestCaseProps.Builder builder()
builder in interface TestOptionsIntegTestCaseProps.Builder of IntegTestCasePropsCopyright © 2022. All rights reserved.