Command Palette

Search for a command to run...

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

xcuitest

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

WHEN authoring or repairing XCTest UI automation with XCUIApplication, accessible queries, launch fixtures, permission alerts or screenshot comparisons; NOT…

mintuzот mintuz★ 38 звёзд на GitHub

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

Author Reliable XCTest UI Automation

Author UI tests in the project's existing XCTest UI target: import XCTest, XCTestCase, test… methods, XCUIApplication and XCTest assertions. Swift Testing's @Test and #expect do not supply UI automation APIs. Do not migrate frameworks merely because the tests are written in Swift.

Responsibility and proof

  • Read the requirement, existing UI target/test plan, fixtures and neighbouring tests before changing a case. Keep its agreed behaviour and scenario identity.
  • Use tdd for the failing-before/passing-after workflow. This skill owns the UI assertion and fixture design, not a replacement test runner.
  • Use xcode-dev-loop for Apple toolchain discovery, building, running, installing and inspecting results; use documented project commands if it is unavailable. Running an unchanged target alone is an execution task, not test authorship.
  • Swift Testing unit/integration authorship belongs to swift-testing. Existing non-UI XCTest unit, integration and measure tests retain their established XCTest conventions and framework-neutral TDD; this skill does not own them. Dedicated reusable non-UI XCTest authorship remains a separate gap.
  • Interactive appearance judgement belongs to visual-feedback, not unattended baseline approval. Requirement acceptance remains with the authoritative contract and acceptance-review.

State the exact public action and observable result. Ask which plausible defect would still pass: a Save button's existence does not prove saving; a seeded note seen after launch does not prove persistence. Assert the intended value, record, ordering, denial or navigation outcome, not just that the app is alive.

Isolate launch preconditions

Use the project's existing test-build seams, not invented environment keys or a new production back door. Confine DEBUG/seed/reset support to authorised test builds; a test-side repair does not grant production configuration changes.

  1. Allocate a unique per-test store/account namespace, safe across workers and simultaneous runs. Reuse existing disposable backend fixtures and their owner/run IDs and readiness checks. A unique string is isolation only if the app/backend actually scopes its mutable state to it.
  2. Set documented keys on the specific app instance's app.launchEnvironment before app.launch(). setenv in the UI test runner, an xcodebuild shell variable and the app's startup environment are separate boundaries. Do not assume automatic inheritance. Use launchArguments only where the app already interprets those arguments.
  3. Verify the selected app/backend/store through an existing observable diagnostic, fixture request log or resulting scoped data. The variable's spelling alone is not evidence that the app consumed it.
  4. Reset only the owned namespace on its initial launch. Before a persistence relaunch, remove or disable the reset key, keep the same store ID and backend, terminate the app and launch it again. Do not reseed the target value.
  5. Arrange cleanup of owned fixtures/resources on success, failure and cancellation using the suite's existing teardown facilities. Keep diagnostic evidence outside cleanup targets. Never erase a shared simulator/store, reset another worker's permissions or kill processes by name.

A DEBUG deep link may seed unrelated records for a create-form test, or establish an explicitly separate seeded-list rendering case. It cannot insert the target record in a test claiming to create it through the form. For that case, start from isolated known data, perform Add → enter fields → Save through the public UI, assert the new record, then relaunch without reset/seed and assert it again. Document any stand-in and the narrower boundary it actually exercises.

Query, wait, interact, assert

Prefer existing accessibility identifiers, scoped by element type/container: app.buttons["settings.open"], app.staticTexts["appearance.selection"]. Use a stable accessible label when that is the project contract; pin the locale and avoid ambiguous translated or dynamic strings. Inspect the hierarchy when a query is uncertain. Do not conceal duplicates with .firstMatch unless choosing the first is genuinely the requirement. Accessible queries are not a complete VoiceOver or accessibility audit.

  • Use waitForExistence(timeout:) before reading an element, and bounded XCTNSPredicateExpectation/XCTWaiter checks for properties such as isHittable, isEnabled, label/value changes or disappearance. Match the supported SDK and existing project wait helpers.
  • Wait for the state needed by the next action: existence alone does not mean a covered/disabled button is tappable. For scrolling, use bounded gestures in the identified container until the intended element becomes actionable.
  • Prefer tap(), typeText(_:) and the appropriate control API. Avoid guessed coordinates, blind swipes, f
Полный SKILL.md на GitHub

Установить xcuitest в Claude Code и Claude Desktop

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

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

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

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

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

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

Вложенные файлы

references/alert-handling.mdreferences/persistence-example.md

FAQ

Что делает скилл xcuitest?

WHEN authoring or repairing XCTest UI automation with XCUIApplication, accessible queries, launch fixtures, permission alerts or screenshot comparisons; NOT for non-UI XCTest, Swift Testing, unchanged test execution or visual taste review; provides isolated UI-test patterns and observable lifecycle assertions.

Как установить скилл xcuitest?

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

Скилл xcuitest запускает скрипты?

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

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

Сравнить xcuitest с