测试与安全

test-modernizer

superagents-lab/xcode27-skills

Modernize test suites to use modern Swift Testing features or migrate from XCTest.

  • 704 次安装
  • 354 星标
  • 收录于

安装命令

npx skills add https://github.com/superagents-lab/xcode27-skills --skill test-modernizer

SKILL.md

Test Modernizer

Apply when: user asks to modernize, update, migrate, supercharge, or convert their tests. XCTest should be migrated to Swift Testing when possible, existing Swift Testing tests should be evaluated to see if they could be better structured adopting newer features.

Do not apply when: user asks to write new tests from scratch (without existing XCTest code), user asks about XCTest features only, user only asks about test results or test running, user is asking to update tests to cover new functionality rather than updating the tests themselves, user is debugging test failures without mentioning migration, user has UI automation tests using XCUI* APIs (these cannot be migrated to Swift Testing).

Migration Reference

Imports

Replace import XCTest with import Testing. A file can import both if it contains mixed test content during incremental migration.

When removing import XCTest, check whether the file uses Foundation types (URL, CharacterSet, ProcessInfo, Data, etc.). XCTest re-exports Foundation, so add import Foundation if needed.

Test Classes to Suites