lifetime
Indicates whether the attachment is kept or discarded when its associated test passes.
Declaration
var lifetime: XCTAttachment.Lifetime { get set }Mentioned in
Discussion
Defaults to XCTAttachment.Lifetime.deleteOnSuccess, indicating that the attachment should be discarded when its test passes successfully, to save on storage space. Set this property to XCTAttachment.Lifetime.keepAlways to persist an attachment even when its test passes.