firebase testlab xctest成功,但没有屏幕截图
我通过firebase testlab运行了xctest(UI测试),它已经成功了,但
在情况下没有屏幕截图,我通过“ 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];
}
我通过Xcode Test(命令 + U)成功地进行了屏幕检查。 xcode测试结果
但是,firebase的测试结果没有屏幕截图,只包含日志和视频
。我应该做屏幕截图吗?
非常感谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论