ADHTuanCanUITestsLaunchTests.swift 810 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // ADHTuanCanUITestsLaunchTests.swift
  3. // ADHTuanCanUITests
  4. //
  5. // Created by 敖德亨 on 2023/9/27.
  6. //
  7. import XCTest
  8. final class ADHTuanCanUITestsLaunchTests: XCTestCase {
  9. override class var runsForEachTargetApplicationUIConfiguration: Bool {
  10. true
  11. }
  12. override func setUpWithError() throws {
  13. continueAfterFailure = false
  14. }
  15. func testLaunch() throws {
  16. let app = XCUIApplication()
  17. app.launch()
  18. // Insert steps here to perform after app launch but before taking a screenshot,
  19. // such as logging into a test account or navigating somewhere in the app
  20. let attachment = XCTAttachment(screenshot: app.screenshot())
  21. attachment.name = "Launch Screen"
  22. attachment.lifetime = .keepAlways
  23. add(attachment)
  24. }
  25. }