Important
|
This feature only becomes available when Selenoid is compiled with $ go build -tags s3 |
Selenoid can upload recorded video and log files for every running session to S3-compatible storage.
To enable this feature you need to specify S3 access information as follows:
$ ./selenoid -s3-endpoint https://s3.us-east-2.amazonaws.com -s3-region us-east-2 -s3-bucket-name my-bucket -s3-access-key <your-access-key> -s3-secret-key <your-secret-key>
Note
|
If you omit -s3-access-key and -s3-secret-key flags then environment variables and shared credentials file are automatically tried as a fallback.
|
By default uploaded file name is preserved, i.e. S3 path is /<session-id>.log
or /myCustomVideo.mp4
. You can optionally provide your custom key pattern using -s3-key-pattern
flag and a set of placeholders:
Placeholder | Meaning |
---|---|
$browserName |
Replaced by Selenium browser name capability value |
$browserVersion |
Replaced by Selenium browser version capability value |
$date |
Replaced by current date, e.g. |
$fileName |
Replaced by source file name |
$fileExtension |
Replaced by source file extension |
$fileType |
Replaced by |
$platformName |
Replaced by Selenium platform capability value |
$quota |
Replaced by quota name (usually coming from Ggr) |
$sessionId |
Replaced by Selenium session ID |
For example, when launching Selenoid with -s3-key-pattern $browserName/$sessionId/log.txt
files will be accessible as firefox/0ee0b48b-e29b-6749-b4f1-2277b8f8d6c5/log.txt
. You can also override key pattern for every session with s3KeyPattern
capability.
Sometimes you may want to upload only video files or files matching some complicated pattern or to not upload some files. To achieve this use -s3-include-files
and -s3-exclude-files
flags. These flags accept globs such as *.mp4
.