Overview › Testing
Testing
680 test files + 6 XCTestPlans + iOSSnapshotTestCase + SnapshotTesting; coverage threshold unconfirmed.
75
SCORE
Executive summary
680 test files in the iOS project plus 6 XCTestPlans including the snapshot suite (Snapshot-Tests-EN_CA / EN_US / FR_CA, plus a USA-only plan and the umbrella plan). The snapshot infrastructure uses iOSSnapshotTestCase 6.2.0 and SnapshotTesting 1.8.1. Internal mocking framework Mockey is its own SPM package. SwiftLint runs via CocoaPods.
Tooling inventory
| Layer | Tool | Source |
|---|---|---|
| Unit testing | XCTest | Apple — built in |
| Snapshots (UIKit) | iOSSnapshotTestCase 6.2.0 | uber/ios-snapshot-test-case |
| Snapshots (SwiftUI) | SnapshotTesting 1.8.1 | pointfreeco/swift-snapshot-testing |
| Mocking | Mockey (internal) | Costco-Digital/Mockey SPM package |
| UI tests | XCUITest | Apple — main target Costco-UITests not surveyed in scan |
| Lint | SwiftLint | Podfile |
| Test plans | 6 .xctestplan files | Including locale-specific snapshot plans |
Findings
PASS
Locale-specific snapshot plans
Snapshot-Tests-EN_CA, EN_US, FR_CA give per-locale visual regression coverage — better than most retail apps.
PASS
Internal Mockey package
Investing in an internal mocking abstraction is a sign of a mature test culture; verify Mockey vs hand-written fakes balance.
MEDIUM
Coverage threshold unconfirmed in CI
Xcode emits coverage data but the CI gate is unclear from the scan.
Recommendation: Publish coverage to Codecov or SonarCloud; gate PRs at 60-70% on changed files.
MEDIUM
No Quick / Nimble — XCTest only
Pure XCTest means descriptive test names live in method signatures (
testUserCannotPurchaseWithoutAddress()). Fine, but harder to read than Quick's describe/context/it.Recommendation: Standardize naming:
test_givenX_whenY_thenZ(). Or pilot Swift Testing (Apple's new framework, Xcode 16+) which supports descriptive named tests.MEDIUM
UI test coverage unclear
XCUITest target was not surveyed; verify a focused UI test suite exists for critical journeys (sign-in, DMC, checkout-equivalent).
LOW
Swift Testing — adopt incrementally
Apple's new Swift Testing framework (Xcode 16) supports descriptive names, parameterized tests, and traits.
Recommendation: Pilot Swift Testing on one new SPM package; evaluate.
No findings logged in this category yet for iOS.
Costco iOS · Code Review Report · Generated 2026-05-07 · 88 machine-curated findings