Skip to content

Swift testing conversion#145

Merged
watkyn merged 9 commits intomasterfrom
swift-testing-conversion
Apr 2, 2026
Merged

Swift testing conversion#145
watkyn merged 9 commits intomasterfrom
swift-testing-conversion

Conversation

@pmoprhy
Copy link
Copy Markdown
Contributor

@pmoprhy pmoprhy commented Apr 2, 2026

XCTest → Swift Testing Migration Plan

Problem

Convert 52 test methods across 8 test files (plus 2 helpers) from XCTest to Swift Testing. The migration should be incremental and phased, starting with one file to establish patterns and build context.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the existing PPPC Utility unit test suite from XCTest to Swift Testing as part of an incremental conversion plan, while adding repository documentation to standardize future migrations.

Changes:

  • Converted multiple test files from XCTestCase/XCTAssert* to Swift Testing @Suite/@Test with #expect/#require.
  • Updated test resource-loading patterns to work without self/XCTestCase (bundle locator approach).
  • Added migration plan documentation and Swift Testing conventions (CLAUDE.md), plus adjusted Xcode project signing settings.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
PPPC UtilityTests/TCCProfileImporterTests/TCCProfileTests.swift Converted TCC profile serialization tests to Swift Testing; updated resource loading.
PPPC UtilityTests/TCCProfileImporterTests/TCCProfileImporterTests.swift Converted importer tests to Swift Testing; updated resource URL lookup to #require.
PPPC UtilityTests/NetworkingTests/TokenTests.swift Converted token validity/decoding tests to Swift Testing (#expect, #require).
PPPC UtilityTests/NetworkingTests/NetworkAuthManagerTests.swift Converted async/auth error-path tests to Swift Testing, using #expect(throws:).
PPPC UtilityTests/NetworkingTests/JamfProAPIClientTests.swift Converted request-building test to Swift Testing.
PPPC UtilityTests/ModelTests/SemanticVersionTests.swift Converted semantic version comparison tests to Swift Testing.
PPPC UtilityTests/ModelTests/PPPCServicesManagerTests.swift Converted services manager tests to Swift Testing; replaced unwrap assertions.
PPPC UtilityTests/ModelTests/ModelTests.swift Converted comprehensive model tests to Swift Testing; introduced one parameterized test.
PPPC Utility.xcodeproj/project.pbxproj Adjusted code-signing settings (tests and app targets).
docs/plans/xctest-to-swift-testing-migration.md Added a phased migration plan and conversion patterns reference.
CLAUDE.md Added repo-specific Swift concurrency + Swift Testing migration guidelines.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ing-conversion

# Conflicts:
#	PPPC UtilityTests/ModelTests/ModelTests.swift
#	PPPC UtilityTests/ModelTests/PPPCServicesManagerTests.swift
@watkyn watkyn merged commit f800969 into master Apr 2, 2026
4 checks passed
@watkyn watkyn deleted the swift-testing-conversion branch April 2, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants