# kylef/Mockingjay

An elegant library for stubbing HTTP requests with ease in Swift

Repository: https://github.com/kylef/Mockingjay
Canonical: https://ross.abutalabs.com/products/mockingjay
Language: Swift
License: BSD-3-Clause
License Family: permissive
Last push: 2023-10-13T20:53:30+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4242, "days_push": 1055, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1486, forks 173 (observed 2026-08-28T04:04:51.959315+00:00)

## What it is
Mockingjay is a Swift library for stubbing HTTP/HTTPS requests made via NSURLConnection or NSURLSession, including requests from libraries like Alamofire and AFNetworking. It integrates with XCTest and Quick, letting tests register matchers and response builders that unload automatically.

## Use cases
- stub http requests in swift unit tests
- mock alamofire responses in xctest
- test network error handling in ios app
- stub api endpoints with uri templates
- mock json api responses in swift tests

## When to choose
- you write Swift/iOS tests needing HTTP request stubbing
- you use XCTest or Quick and want automatic stub cleanup
- you want simple matcher/builder syntax with URI templates

## When to avoid
- your project uses Swift concurrency or modern networking stacks it may not intercept
- you need actively developed tooling with frequent updates
- you test non-Apple platforms

## Facets
- artifact type: library
- maturity: maintenance
- function: mocking, testing, http-client
- domain: testing, developer-tools, web-development
- platform: -
- tags: http-stubbing, xctest, unit-testing, cocoapods, swift, ios, macos

## Member repositories
- kylef/Mockingjay (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:51.959315+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:33:52.120249+00:00, confidence not recorded.
  - readme: https://github.com/kylef/Mockingjay (fetched 2026-08-28T04:04:51.959315+00:00, sha e5be69a0bc7d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
