Testing
无论你是在寻找 XCTest 的扩展还是完全不同的测试方法,这些包都能帮到你。
-
swift-testing作者: The Swift Programming Language
通过表达性 API、自定义行为、灵活组织、可扩展执行和跨平台支持增强 Swift 代码测试。与 XCTest 兼容,便于迁移。
-
swift-snapshot-testing作者: Point-Free
SnapshotTesting is a delightful Swift snapshot testing library. It allows you to easily compare snapshots of views, view controllers, URL requests, and encodable values. It supports a wide range of snapshot strategies and is highly configurable.
-
swift-custom-dump作者: Point-Free
A collection of tools for debugging, diffing, and testing data structures in Swift. Includes
customDump
for refined output,diff
for textual diffs, andXCTAssertNoDifference
for test assertions. -
Quick作者: Quick
Quick 是一个用于 Swift 和 Objective-C 的行为驱动开发框架。它受到 RSpec、Specta 和 Ginkgo 的启发。它附带 Nimble,一个用于测试的匹配器框架。
-
OCMockito作者: Jon Reid
OCMockito 是 Mockito 的 Objective-C 实现,允许你创建、验证和存根模拟对象。它与其他模拟框架有一些关键区别,使测试不那么脆弱,更易于阅读。
-
OCHamcrest作者: Hamcrest
OCHamcrest 是一个 Objective-C 模块,提供用于创建灵活测试断言和用户输入验证的匹配器库。