#49, #123 - Setup UI integration and performance testing (#148)

This commit is contained in:
Stefan Ceriu
2022-08-18 16:32:29 +03:00
committed by GitHub
parent b6e1d6d1e5
commit 78df4abc7f
27 changed files with 954 additions and 78 deletions
@@ -0,0 +1,29 @@
//
// ApplicationTests.swift
// IntegrationTests
//
// Created by Stefan Ceriu on 27/07/2022.
// Copyright © 2022 Element. All rights reserved.
//
import XCTest
class ApplicationTests: XCTestCase {
func testLaunchPerformance() throws {
let parser = TestMeasurementParser()
parser.capture(testCase: self) {
self.measure(metrics: [XCTApplicationLaunchMetric()]) {
Application.launch()
}
}
guard let actualDuration = parser.valueForMetric(.appLaunch) else {
XCTFail("Couldn't retrieve app launch duration")
return
}
let expectedDuration = 2.75
XCTAssertLessThanOrEqual(actualDuration, expectedDuration)
}
}