]> git.r.bdr.sh - rbdr/captura/blame_incremental - CapturaUITests/CapturaUITests.swift
Add license and contributing
[rbdr/captura] / CapturaUITests / CapturaUITests.swift
... / ...
CommitLineData
1/*
2 Copyright (C) 2024 Rubén Beltrán del Río
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see https://captura.tranquil.systems.
16 */
17
18import XCTest
19
20final class CapturaUITests: XCTestCase {
21
22 override func setUpWithError() throws {
23 // Put setup code here. This method is called before the invocation of each test method in the class.
24
25 // In UI tests it is usually best to stop immediately when a failure occurs.
26 continueAfterFailure = false
27
28 // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
29 }
30
31 override func tearDownWithError() throws {
32 // Put teardown code here. This method is called after the invocation of each test method in the class.
33 }
34
35 func testExample() throws {
36 // UI tests must launch the application that they test.
37 let app = XCUIApplication()
38 app.launch()
39
40 // Use XCTAssert and related functions to verify your tests produce the correct results.
41 }
42
43 func testLaunchPerformance() throws {
44 if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
45 // This measures how long it takes to launch your application.
46 measure(metrics: [XCTApplicationLaunchMetric()]) {
47 XCUIApplication().launch()
48 }
49 }
50 }
51}