'Firebase TestLab XCTest Succeed, but no screenshoots
I run a XCTest (UI Test) via Firebase TestLab, it's succeed。But no screenshoot
In the case, I make a attachment via "XCTAttachment"
- (void)testHomeButton {
XCUIApplication *app = [[XCUIApplication alloc] init];
[app launch];
// click button2
XCUIElement *button2 = app.buttons[@"button2"];
[button2 tap];
// get button2 screenshoot
XCTAttachment *attachment1 = [XCTAttachment attachmentWithScreenshot:XCUIScreen.mainScreen.screenshot];
attachment1.name = @"button2 Screen";
attachment1.lifetime = XCTAttachmentLifetimeKeepAlways;
[self addAttachment:attachment1];
// click button3
XCUIElement *button3 = app.buttons[@"button3"];
[button3 tap];
// get button3 screenshoot
XCTAttachment *attachment2 = [XCTAttachment attachmentWithScreenshot:XCUIScreen.mainScreen.screenshot];
attachment2.name = @"button3 Screen";
attachment2.lifetime = XCTAttachmentLifetimeKeepAlways;
[self addAttachment:attachment2];
// click testview
XCUIElement *testview = [app.otherElements.element childrenMatchingType:XCUIElementTypeAny][@"testvc_view"];
[testview tap];
}
I have got screenshoot successfully via xcode test (command + U) xcode test result
However the test result of firebase has no screenshoot attachments, only contains logs and videos
What should I do to get the screenshot?
Thanks a lot!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
