SPB Git

Repository Public

LaunchPerfTests.swift 935 B 22 lines swift

1// SP Drive iOS2// File: UITests/LaunchPerfTests.swift3// Description: Cold launch to first frame, measured by XCTest's application-launch metric on the dedicated simulator. The app is launched4//              signed in to the test backend, like the other tests, so this measurement leaves the Files location and the session alone.5//6// Author: Simon-Pierre Boucher7// Contact: contact@spboucher.ai8import XCTest910final class LaunchPerfTests: DriveUITestCase {11    @MainActor func testColdLaunchToFirstFrame() throws {12        let options = XCTMeasureOptions()13        options.iterationCount = 514        let environment = ["SPDRIVE_BASE_URL": baseURL, "SPDRIVE_UITEST": "1", "SPDRIVE_RESET": "0", "SPDRIVE_TEST_TOKEN": token]15        measure(metrics: [XCTApplicationLaunchMetric()], options: options) {16            let app = XCUIApplication()17            app.launchEnvironment = environment18            app.launch()19        }20    }21}22
Files main
Menu

Theme