dd-sdk-ios:running-tests

Use when asked to run tests in the dd-sdk-ios project — whether a full module suite, a specific test class, or a single test method. Use when choosing between make, xcodebuild, or Xcode MCP for running iOS/tvOS/visionOS tests.

279 stars

Best use case

dd-sdk-ios:running-tests is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when asked to run tests in the dd-sdk-ios project — whether a full module suite, a specific test class, or a single test method. Use when choosing between make, xcodebuild, or Xcode MCP for running iOS/tvOS/visionOS tests.

Teams using dd-sdk-ios:running-tests should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/running-tests/SKILL.md --create-dirs "https://raw.githubusercontent.com/DataDog/dd-sdk-ios/main/.claude/skills/running-tests/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/running-tests/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How dd-sdk-ios:running-tests Compares

Feature / Agentdd-sdk-ios:running-testsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when asked to run tests in the dd-sdk-ios project — whether a full module suite, a specific test class, or a single test method. Use when choosing between make, xcodebuild, or Xcode MCP for running iOS/tvOS/visionOS tests.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Running Tests in dd-sdk-ios

## Two Approaches

### 1. Makefile — CI workflows, full module suites

Use `make` to replicate CI exactly. Always prefer this for running a full module or all modules.

**Before running:** verify available simulators and pick an appropriate device name:
```bash
xcrun simctl list devices available | grep -E "iPhone|Apple TV"
```

| Goal | Command |
|------|---------|
| All iOS unit tests | `make test-ios-all` |
| One module | `make test-ios SCHEME="<Scheme>"` |
| One module with specific device | `make test-ios SCHEME="<Scheme>" DEVICE="<Device>"` |
| All tvOS unit tests | `make test-tvos-all` |
| UI / integration tests | `make ui-test TEST_PLAN="<Plan>"` |
| Session Replay snapshots | `make sr-snapshot-test` |

**Default devices** (authoritative values from Makefile):
```bash
grep "DEFAULT_" Makefile
```

Always pass `DEVICE=` explicitly if the default simulator is not installed locally. Check `xcrun simctl list devices available` first.

**Module scheme names:** Always read the `Makefile` to get the authoritative list — it changes as modules are added or renamed:
```bash
grep "test-ios-all" Makefile -A 20  # shows all iOS schemes used in CI
```

### 2. Xcode MCP — selective, fast, single test or class

Requires **Xcode 26.3+** with the Xcode MCP server enabled in Claude Code settings.

**Before using Xcode MCP**, verify the setup:
1. Check Xcode version: `xcodebuild -version`
   - If Xcode < 26.3 → ask the user to upgrade Xcode
   - If Xcode ≥ 26.3 → check that `XcodeListWindows` is available
2. If `XcodeListWindows` is unavailable → ask the user to enable the Xcode MCP server in Xcode settings

`RunSomeTests` is limited to targets in the **currently active Xcode scheme**. The MCP has no tool to switch schemes — that must be done manually in Xcode.

**Get the tabIdentifier** (identifies the open Xcode workspace window):
```
XcodeListWindows()  # → tabIdentifier e.g. "windowtab1"
```

**Check available targets first:**
```
GetTestList(tabIdentifier: <tabIdentifier>)
# → lists targets in the active scheme only
```

**If the test is in the active scheme**, run it directly:
```
RunSomeTests(
  tabIdentifier: <tabIdentifier>,
  tests: [{
    targetName: "<targetName from GetTestList>",
    testIdentifier: "<TestClass>/<testMethod>()"
  }]
)
```

**If the test is NOT in the active scheme**, use `xcodebuild -only-testing`:
```bash
xcodebuild test \
  -workspace Datadog.xcworkspace \
  -scheme "<Module> <Platform>" \
  -destination 'platform=<Platform> Simulator,name=<Device>' \
  -only-testing:<TargetName>/<TestClass>/<testMethod>
```

To find which module owns a test:
```
XcodeGrep(tabIdentifier: <tabIdentifier>, pattern: "func <testName>", outputMode: "filesWithMatches")
# path reveals the module: DatadogInternal/Tests/... → scheme "DatadogInternal iOS"
```

## Decision Guide

```
Need to run tests?
├── Full module or CI replication?
│   └── make test-ios SCHEME="<Module> iOS" DEVICE="<Device>"
└── Specific class or method?
    ├── Test is in the active Xcode scheme? (check GetTestList)
    │   └── RunSomeTests
    └── Test is in a different scheme?
        └── xcodebuild -only-testing (or ask user to switch scheme in Xcode)
```

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| Assuming `RunSomeTests` works for any module | It only sees targets in the active Xcode scheme — MCP cannot switch schemes |
| Not knowing which scheme owns the test | Grep for the function — file path reveals the module |
| Running full module when only one test needed | Use `RunSomeTests` or `xcodebuild -only-testing` |
| Running integration tests under feature module scheme | Integration tests use target `DatadogIntegrationTests iOS/tvOS` |

Related Skills

dd-sdk-ios:xcode-file-management

279
from DataDog/dd-sdk-ios

Use when adding, removing, moving, or renaming Swift source files in the dd-sdk-ios Xcode project. Use when the task involves file creation, deletion, or relocation in any module (DatadogRUM, DatadogLogs, DatadogCore, etc.). Use when you would otherwise reach for Write, Bash mv/mkdir/rm, or manual pbxproj editing for file management.

dd-sdk-ios:open-pr

279
from DataDog/dd-sdk-ios

Use when creating a pull request in dd-sdk-ios. Use when writing PR titles, PR body, or choosing the target branch.

dd-sdk-ios:git-commit

279
from DataDog/dd-sdk-ios

Use when committing changes in dd-sdk-ios. Use when writing commit messages, signing commits, or staging files before a commit.

dd-sdk-ios:git-branch

279
from DataDog/dd-sdk-ios

Use when creating a new branch in dd-sdk-ios for a JIRA ticket or feature. Use when choosing a branch name or base branch for development work.

fixing-flaky-e2e-tests

44152
from streamlit/streamlit

Diagnose and fix flaky Playwright e2e tests. Use when tests fail intermittently, show timeout errors, have snapshot mismatches, or exhibit browser-specific failures.

Developer ToolsClaude

run-api-e2e-tests

38786
from novuhq/novu

Run e2e tests for the API service. Use when the user wants to run API E2E tests.

odoo-automated-tests

31392
from sickn33/antigravity-awesome-skills

Write and run Odoo automated tests using TransactionCase, HttpCase, and browser tour tests. Covers test data setup, mocking, and CI integration.

creating-oracle-to-postgres-migration-integration-tests

28865
from github/awesome-copilot

Creates integration test cases for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Generates DB-agnostic xUnit tests with deterministic seed data that validate behavior consistency across both database systems. Use when creating integration tests for a migrated project, generating test coverage for data access layers, or writing Oracle-to-PostgreSQL migration validation tests.

e2e-tests-studio

22487
from mastra-ai/mastra

REQUIRED when modifying any file in packages/playground-ui or packages/playground. Triggers on: React component creation/modification/refactoring, UI changes, new playground features, bug fixes affecting studio UI. Generates Playwright E2E tests that validate PRODUCT BEHAVIOR, not just UI states.

running-tend

4242
from max-sixty/worktrunk

Worktrunk-specific guidance for tend CI workflows. Adds codecov polling, Rust test commands, labels, and review criteria on top of the generic tend-* skills. Use when operating in CI.

comfyui-running

3891
from openclaw/skills

全自动运行 ComfyUI 工作流:通过 REST API 执行工作流,支持 Windows / Linux / WSL 跨平台。By comfyui资源网 - www.comfyorg.cn

runninghub_api

3891
from openclaw/skills

RunningHub AI Platform 直接调用 - 文生图、图生图、视频生成等,支持智能存储判断和链式工作流