Snapshots and video
You may want screenshots or video captured for tests to know exactly why they failed. Captured artifacts will be part of Allure report or platform specific report.
You configure iOS and Android capturing strategies in a slightly different way.
iOS#
Available capturing strategies preferredScreenCaptureFormat
:
- screenshots
- video
Default capturing strategy is not set.
Available lifetime strategies testAttachmentLifetime
:
- deleteOnSuccess
- captured artifacts will be pruned if test succeeds
- keepNever
- artifacts will not be captured
- keepAlways
- captured artifacts will be presented for all tests
Default lifetime strategy is deleteOnSuccess
.
tests:
configurations:
- platform: ios
#...
preferredScreenCaptureFormat: screenshots
testAttachmentLifetime: deleteOnSuccess
Video recording is supported since Xcode 15.0
Android#
Available lifetime strategies videoRecordStrategy
:
- record_on_fail
- record screen only for failed tests
- record_all
- record screen for each tests
- record_none
- do not record screen
tests:
configurations:
- platform: android
#...
screenRecordConfiguration:
videoRecordStrategy: record_on_fail
Default lifetime strategy is record_none
.