interface CustomTestOptions
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.Synthetics.CustomTestOptions | 
|  Java | software.amazon.awscdk.services.synthetics.CustomTestOptions | 
|  Python | aws_cdk.aws_synthetics.CustomTestOptions | 
|  TypeScript (source) | @aws-cdk/aws-synthetics»CustomTestOptions | 
Properties for specifying a test.
Example
const canary = new synthetics.Canary(this, 'MyCanary', {
  schedule: synthetics.Schedule.rate(Duration.minutes(5)),
  test: synthetics.Test.custom({
    code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
    handler: 'index.handler',
  }),
  runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_1,
  environmentVariables: {
    stage: 'prod',
  },
});
Properties
| Name | Type | Description | 
|---|---|---|
| code | Code | The code of the canary script. | 
| handler | string | The handler for the code. | 
code
Type:
Code
The code of the canary script.
handler
Type:
string
The handler for the code.
Must end with .handler.
