Swiftpack.co -  andyfinnell/TestKit as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Personal set of Swift testing utilities
.package(url: "https://github.com/andyfinnell/TestKit.git", from: "0.0.1")


Build Swift Package Manager compatible

TestKit is a Swift package to make testing with XCTest a tiny bit more ergonomic. It's an extraction of my personal set of testing utils so I don't have to copy-pasta them across projects.


  • Swift 5.3 or greater
  • iOS/tvOS 13 or greater OR macOS 10.15 or greater


Currently, TestKit is only available as a Swift Package.

...using a Package.swift file

Open the Package.swift file and edit it:

  1. Add TestKit repo to the dependencies array.
  2. Add TestKit as a dependency of the target that will use it
// swift-tools-version:5.3

import PackageDescription

let package = Package(
  // ...snip...
  dependencies: [
    .package(url: "https://github.com/andyfinnell/TestKit.git", from: "0.0.1")
  targets: [
    .target(name: "MyTarget", dependencies: ["TestKit"])

Then build to pull down the dependencies:

$ swift build

...using Xcode

Use the Swift Packages tab on the project to add TestKit:

  1. Open the Xcode workspace or project that you want to add TestKit to
  2. In the file browser, select the project to show the list of projects/targets on the right
  3. In the list of projects/targets on the right, select the project
  4. Select the "Swift Packages" tab
  5. Click on the "+" button to add a package
  6. In the "Choose Package Repository" sheet, search for "https://github.com/andyfinnell/TestKit.git"
  7. Click "Next"
  8. Choose the version rule you want
  9. Click "Next"
  10. Choose the target you want to add TestKit to
  11. Click "Finish"


Stars: 0
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Initial version
3 weeks ago

Some basic faking types:

  • FakeMethodCall faking method calls on a type
  • FakeProperty faking properties on a type

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API