KulexiuForStudentUITestsLaunchTests.m 904 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // KulexiuForStudentUITestsLaunchTests.m
  3. // KulexiuForStudentUITests
  4. //
  5. // Created by Kyle on 2022/3/16.
  6. //
  7. #import <XCTest/XCTest.h>
  8. @interface KulexiuForStudentUITestsLaunchTests : XCTestCase
  9. @end
  10. @implementation KulexiuForStudentUITestsLaunchTests
  11. + (BOOL)runsForEachTargetApplicationUIConfiguration {
  12. return YES;
  13. }
  14. - (void)setUp {
  15. self.continueAfterFailure = NO;
  16. }
  17. - (void)testLaunch {
  18. XCUIApplication *app = [[XCUIApplication alloc] init];
  19. [app launch];
  20. // Insert steps here to perform after app launch but before taking a screenshot,
  21. // such as logging into a test account or navigating somewhere in the app
  22. XCTAttachment *attachment = [XCTAttachment attachmentWithScreenshot:XCUIScreen.mainScreen.screenshot];
  23. attachment.name = @"Launch Screen";
  24. attachment.lifetime = XCTAttachmentLifetimeKeepAlways;
  25. [self addAttachment:attachment];
  26. }
  27. @end