talira

iOS integration testing that drives your UI from XCTest

open sourceApache-2.0free

KIF (Keep It Functional) is an iOS integration testing framework that automates an app through the accessibility attributes iOS exposes, imitating real user input with tap events. Tests run in a standard XCTest unit test target, synchronously on the main thread, so they work with Xcode's Test Navigator, command-line builds and CI reports. It was first written at Square and is now maintained by the kif-framework organization; it supports Xcode 16 and iOS 15.

Problems it solves

  • write UI acceptance tests for my iOS app that run inside XCTest
  • automate taps and text entry in an iOS app from unit tests
  • run iOS integration tests in CI with xcodebuild

Features

  • drives the app's UI through accessibility attributes
  • imitates user input with tap events
  • runs in an XCTest unit test target, in-process
  • works with Xcode's Test Navigator and command-line builds
  • installed with Swift Package Manager

Limitations

  • Uses undocumented Apple APIs, so it must never ship in production code or the App Store will reject the app.1
  • Has to be added to the unit test target, not the UI test target.1
  • CocoaPods installation is no longer supported or updated.1

Alternatives

The same job

These do what KIF does.

  1. agent-sim iOS simulators for AI agents, on Linux
  2. Detox Gray-box end-to-end testing framework for React Native apps on iOS and Android
  3. ViewInspector Unit testing for SwiftUI views by inspecting the view hierarchy at runtime

Compare KIF with the top 3