Skip to content

Instantly share code, notes, and snippets.

@ChrisMash
Created May 8, 2025 19:38
Show Gist options
  • Save ChrisMash/c8a2cb6f941c9bf6f5f7322c9b93cddd to your computer and use it in GitHub Desktop.
Save ChrisMash/c8a2cb6f941c9bf6f5f7322c9b93cddd to your computer and use it in GitHub Desktop.
Skipping UI tests when too many have failed with XCTestObservation
override func setUpWithError() throws {
continueAfterFailure = false
if TestObserver.shared.shouldSkipAllTests {
throw XCTSkip("Too many tests have failed, skipping remainder")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment