Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ios-testing-patterns

БесплатноБез исполняемых скриптовНе проверен

XCTest and XCUITest execution workflows and flaky test detection patterns

conorluddyот conorluddy★ 188 звёзд на GitHub19 установок в других каталогах

Об этом скилле

iOS Testing Patterns Skill

Comprehensive guide to XCTest and XCUITest execution, analysis, and flaky test detection

Overview

This skill provides patterns and workflows for executing iOS tests using XCTest and XCUITest frameworks. It covers test execution strategies, result analysis, flaky test detection, and troubleshooting common test failures.

Use this skill when:

  • Running unit tests or UI tests
  • Analyzing test failures
  • Detecting and debugging flaky tests
  • Optimizing test execution performance
  • Setting up CI/CD test pipelines

Quick Reference

Task Operation Key Parameters
Run all tests test scheme, destination
Run specific test test scheme, only_testing
Skip tests test scheme, skip_testing
Use test plan test scheme, test_plan
Parallel execution test destination (multiple)

When to Use This Skill

Use ios-testing-patterns when:

  • Executing XCTest unit tests
  • Running XCUITest UI automation tests
  • Investigating test failures
  • Detecting intermittent test failures (flaky tests)
  • Analyzing test performance and execution time
  • Setting up test schemes and test plans
  • Configuring parallel test execution
  • Debugging test-specific simulator issues

Related Skills:

  • xcode-workflows: For general build and test operations
  • simulator-workflows: For managing test simulators
  • ui-automation-workflows: For UI test interaction patterns

Key Concepts

XCTest vs XCUITest

XCTest (Unit/Integration Tests):

  • Fast execution (milliseconds to seconds)
  • Tests individual components in isolation
  • Direct access to app internals
  • No UI interaction required
  • Runs in same process as app code

XCUITest (UI Tests):

  • Slower execution (seconds to minutes)
  • Tests user-facing workflows
  • Black-box testing (no app internals)
  • Requires simulator/device UI
  • Runs in separate process

Test Execution Strategies

Sequential Execution:

  • Tests run one after another
  • Predictable, repeatable results
  • Slower overall execution
  • Better for debugging

Parallel Execution:

  • Tests run simultaneously on multiple simulators
  • Faster overall execution
  • Requires more system resources
  • May expose race conditions

Test Sharding:

  • Split test suite across multiple destinations
  • Optimal for CI/CD pipelines
  • Reduces total execution time
  • Requires careful test isolation

Workflows

1. Running Unit Tests

Basic Unit Test Execution:

{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15,OS=18.0"
}

Note: The destination parameter now supports auto-resolution! You can omit the OS version (e.g., "platform=iOS Simulator,name=iPhone 15") and the tool will automatically select the latest available OS version for that device.

Run Specific Test Class:

{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15,OS=18.0",
  "options": {
    "only_testing": ["MyAppTests/NetworkTests"]
  }
}

Run Specific Test Method:

{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15,OS=18.0",
  "options": {
    "only_testing": ["MyAppTests/NetworkTests/testAPIRequest"]
  }
}

2. Running UI Tests

Basic UI Test Execution:

{
  "operation": "test",
  "scheme": "MyAppUITests",
  "destination": "platform=iOS Simulator,name=iPhone 15"
}

UI Tests with Specific Device:

{
  "operation": "test",
  "scheme": "MyAppUITests",
  "destination": "platform=iOS Simulator,name=iPad Pro (12.9-inch)"
}

UI Tests with Test Plan:

{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15",
  "options": {
    "test_plan": "SmokeTests"
  }
}

3. Parallel Test Execution

Multiple Destinations:

Run tests on multiple simulators simultaneously:

{
  "operation": "test",
  "scheme": "MyApp",
  "destination": [
    "platform=iOS Simulator,name=iPhone 15",
    "platform=iOS Simulator,name=iPhone SE (3rd generation)"
  ],
  "options": {
    "parallel": true
  }
}

Parallel Test Benefits:

  • Reduces total execution time
  • Tests across multiple device types
  • Exposes device-specific issues
  • Better CI/CD performance

Parallel Test Considerations:

  • Requires multiple simulators
  • Higher CPU/memory usage
  • May expose race conditions
  • Test isolation critical

4. Test Filtering

Skip Specific Tests:

{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15",
  "options": {
    "skip_testing": [
      "MyAppUITests/SlowTests",
      "MyAppTests/NetworkTests/testLargeDownload"
    ]
  }
}

Run Only Fast Tests:

{
  "operation": "test",
  "
Полный SKILL.md на GitHub

Установить ios-testing-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл ios-testing-patterns?

XCTest and XCUITest execution workflows and flaky test detection patterns

Как установить скилл ios-testing-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ios-testing-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ios-testing-patterns с