Skip to content

Commit

Permalink
test: Enable App Launch Profiling UI tests (#3665)
Browse files Browse the repository at this point in the history
Enable the app launch profiling UI tests again to ensure the feature works correctly.
  • Loading branch information
philipphofmann authored Feb 20, 2024
1 parent 08e472f commit 9f0d9e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ jobs:

- name: Run Fastlane
run: fastlane ui_tests_ios_swift device:"${{matrix.device}}"
shell: sh

- name: Archiving Raw Test Logs
uses: actions/upload-artifact@v4
Expand Down
17 changes: 1 addition & 16 deletions Samples/iOS-Swift/iOS-SwiftUITests/ProfilingUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ import XCTest
class ProfilingUITests: BaseUITest {
override var automaticallyLaunchAndTerminateApp: Bool { false }

// this will run before the non-async BaseUITest.setUp, so we can bail out before running any of the logic in there
override func setUp() async throws {
try await super.setUp()
try checkEnvironment()
}

func testProfiledAppLaunches() throws {
app.launchArguments.append("--io.sentry.wipe-data")
launchApp()
Expand Down Expand Up @@ -46,6 +40,7 @@ class ProfilingUITests: BaseUITest {
*/
func testProfilingGPUInfo() throws {
app.launchArguments.append("--disable-swizzling") // we're only interested in the manual transaction, the automatic stuff messes up how we try to retrieve the target profile info
app.launchArguments.append("--io.sentry.wipe-data")
launchApp()

goToTransactions()
Expand Down Expand Up @@ -73,16 +68,6 @@ class ProfilingUITests: BaseUITest {

@available(iOS 16, *)
extension ProfilingUITests {
// We don't need to test these on multiple OSes right now, and older versions seem to have issues; older devices or VM images running simulators might just be slower. Latest OS is enough coverage for our needs for now.
func checkEnvironment() throws {
#if !targetEnvironment(simulator)
throw XCTSkip("Currently doesn't work on SauceLabs.")
#endif

guard #available(iOS 16.0, *) else {
throw XCTSkip("iOS version too old for profiling test.")
}
}

enum Error: Swift.Error {
case missingFile
Expand Down

0 comments on commit 9f0d9e0

Please sign in to comment.