ExampleCodeUITestsLaunchTests.swift 701 B

12345678910111213141516171819202122232425
  1. import XCTest
  2. final class ExampleCodeUITestsLaunchTests: XCTestCase {
  3. override class var runsForEachTargetApplicationUIConfiguration: Bool {
  4. true
  5. }
  6. override func setUpWithError() throws {
  7. continueAfterFailure = false
  8. }
  9. func testLaunch() throws {
  10. let app = XCUIApplication()
  11. app.launch()
  12. // Insert steps here to perform after app launch but before taking a screenshot,
  13. // such as logging into a test account or navigating somewhere in the app
  14. let attachment = XCTAttachment(screenshot: app.screenshot())
  15. attachment.name = "Launch Screen"
  16. attachment.lifetime = .keepAlways
  17. add(attachment)
  18. }
  19. }