← スキル一覧に戻る

watchos-testing
by fotescodev
⌚ Claude Watch The first wearable interface for AI-assisted coding. Approve code changes from your wrist. No phone. No laptop. Just tap.
⭐ 0🍴 0📅 2026年1月24日
SKILL.md
name: watchos-testing description: watchOS and iOS testing expert for unit tests, UI tests, and test-driven development. Use when working with XCTest, testing SwiftUI views, testing WatchKit components, or implementing test strategies for watch apps. allowed-tools: Read, Grep, Glob, Bash(xcodebuild:), Bash(xcrun simctl:)
watchOS Testing Expert
Instructions
When helping with watchOS/iOS testing:
- Analyze existing test coverage
- Identify untested code paths
- Generate comprehensive test cases
- Use XCTest and Swift Testing frameworks appropriately
watchOS-Specific Testing
Challenges
- Limited UI testing on watchOS
- Notification testing requires mocking
- WebSocket testing needs stub servers
- Complication testing is complex
Approaches
- Use dependency injection for testability
- Mock network services (WebSocket, APNs)
- Test view models separately from views
- Use
@testable importfor internal access
Test Patterns
Unit Test Template
import XCTest
@testable import ClaudeWatch
final class WatchServiceTests: XCTestCase {
var sut: WatchService!
override func setUp() {
super.setUp()
sut = WatchService()
}
override func tearDown() {
sut = nil
super.tearDown()
}
func testExample() {
// Given
// When
// Then
XCTAssertNotNil(sut)
}
}
Async Test Pattern
func testAsyncOperation() async throws {
// Given
let expectation = XCTestExpectation(description: "Async operation")
// When
let result = try await sut.performAsyncAction()
// Then
XCTAssertTrue(result)
}
Best Practices
- Test behavior, not implementation details
- Use dependency injection for all external services
- Mock WebSocket connections for network tests
- Target 80%+ coverage for critical paths (Services, ViewModels)
- Use
@MainActorannotation for UI-related tests
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です