Testing,
Made Simple.
Typed SwiftUI navigation for UI tests.
HarnessKit 1.0
HarnessKit 1.0: four targets, one package.
Declare the Project
A PathProject lists its folders. That declaration drives the UI and every test path.
One declaration drives the whole tree.
Folders as Enums
Each case ties a view to a label. Switch on self for the body. The compiler keeps every screen covered.
One case per screen. Switch on self.
Navigate from a Test
Call navigate(app:) on a folder case. HarnessKit taps each level from the project root to the screen.
navigate(app:) walks the path from the root.
Technical Specs
Typed Paths End to End.
PathProject, PathFolder, navigate(app:). One tree drives previews and UI tests.
Exhaustive Enums
Compiler covers every screen at compile time.
Single Declaration
One source drives the UI, the test paths, and the screenshot runs.
No XCUI Tap Stack
navigate(app:) collapses manual taps into one typed call.
Pure SwiftUI
Builds a NavigationStack from the project tree. No private API.
Typed Tree
PathProject and PathFolder model the hierarchy as a typed tree.
Capabilities
More Than a Harness.
Testing, screenshots, and screenshot testing sit on top of the core protocols.
HarnessKit
Core protocols, the path resolver, and HarnessView.
HarnessKitScreenshots
Screenshot metadata backend: name, appearance, OS version, orientation.
HarnessKitTesting
navigate(app:) for any PathFolder case. tvOS goes through XCUIRemote.
HarnessKitScreenshotTesting
Set appearance and orientation, then trigger the capture.
Typed Paths
PathResolver, PathComponent, and PathFolder. Protocols you can extend.
Implementation
Add the Package.
Drop in the dependency, declare the tree, render HarnessView. Your test target picks up navigate(app:).
GitHub / HarnessKit
File issues and shape the roadmap.
DocC Documentation
Protocols, types, and the navigate API.
Swift Package Index
Build status across every Apple platform.
HarnessKit is open source under the MIT License.