-
-
Notifications
You must be signed in to change notification settings - Fork 295
S3 screenshot driver
The driver generates upload URLs for S3 bucket. When set up properly the following will happen when each test suite finishes:
- cypress agent reports to
director
what videos and / or failed tests screenshots are availabe. -
director
uses AWS credentials to generate- a temporary signed URL for each screenshot / video
- a read URL is saved to associated test results
- cypress agent uses the temporary URL to upload the assets
- dashboard uses the read URL to display video / screenshots
Please make sure that AWS credentials with proper access to invoke s3.getSignedUrl
are available in the environment.
You can customize certain aspects of how director
handles upload and read URLs generation by setting up environment variables.
Defines what screenshot driver to use. In order to use S3 driver set value:
SCREENSHOTS_DRIVER="../screenshots/s3.driver"
Set the bucket name to store the asset. There's no default value, you have to set it before using the driver.
S3_BUCKET="your_bucket_name"
AWS region, default value is "us-east-1"
S3_REGION="us-east-1"
ACL settings that for new S3 items. The default value is "public-read"
. Read more about S3 ACL.
S3_ACL="public-read"
The URL prefix to use when reading the screenshots / video. The default value is https://${S3_BUCKET}.s3.amazonaws.com/${key}
.
Setting S3_READ_URL_PREFIX
to http://example.com
will change the generated URL to https://example.com/${key}
.
S3_READ_URL_PREFIX=<null>
The prefix to use when uploading the screenshots.
Setting S3_IMAGE_KEY_PREFIX
to images
will change the generated S3 object key for screenshots images/${key}
.
S3_IMAGE_KEY_PREFIX=<null>
The prefix to use when uploading the videos.
Setting S3_VIDEO_KEY_PREFIX to videos
will change the generated S3 object key for videos videos/${key}
.
S3_VIDEO_KEY_PREFIX=<null>