Command Palette

Search for a command to run...

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

mobile-testing

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

Plans, writes and reviews test strategies for Android, iOS and Flutter apps: mobile test pyramid, fakes over mocks, virtual time, Compose UI tests, XCUITest…

ahmadhussain0335от ahmadhussain0335138 установок в других каталогах

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

Mobile testing

Decide what to test at which layer, keep every test deterministic, and give the team a suite that is fast on every pull request and trusted when it fails. A good result is a test plan or review that names the layers, what each one covers, the gaps, and how CI runs it.

When to use

  • Planning tests for a new feature or app, or auditing an existing suite.
  • Choosing between a unit test, a screen test, a screenshot test and an end-to-end test.
  • Adding screenshot tests (Roborazzi, Paparazzi, swift-snapshot-testing, Flutter goldens).
  • Writing Compose UI tests, XCUITests or Flutter integration_test flows.
  • Flaky, slow or order-dependent tests; deciding on retries, quarantine and CI sharding.
  • Setting a coverage policy, or reviewing tests in a merge request.

Not for: framework syntax for one language (use mobile-kotlin, mobile-java, mobile-swift, mobile-flutter; each has a references/testing.md), pipeline YAML, signing and caching details (use mobile-ci-cd).

Workflow

  1. Map the feature: entry points, state holders, data sources, platform boundaries (network, BLE, storage, permissions, clock) and the user journeys that cost money or support tickets when they break.
  2. Read the existing tests and CI config. Note frameworks in use, test run time, known flaky tests and coverage reports. Extend what exists before adding a new framework.
  3. Assign every behavior to the lowest layer that can catch its bug (see the table below). Write the list down before writing code.
  4. Put seams at boundaries: interfaces or protocols for data sources, injected dispatchers and clocks, launch flags for UI tests. Write fakes once per boundary.
  5. Write the tests. For language-level syntax, load the matching language skill's reference by name: mobile-kotlin, references/testing.md (coroutines, Turbine, MockK, Room, Compose); mobile-java, references/testing.md (LiveData, Mockito, Espresso, IdlingResource); mobile-swift, references/testing.md (Swift Testing, confirmations, XCTest UI and performance); mobile-flutter, references/testing.md (mocktail, fake_async, Riverpod, Bloc, widget tests). For ViewModel and reducer tests, mobile-mvvm rule 11 and mobile-mvi rule 9.
  6. Screen and journey tests: load ui-tests.md.
  7. Visual regressions: load screenshot-tests.md.
  8. CI layout, sharding, retries and the flaky-test process: load ci-and-flakes.md.
  9. Run the suite twice, once in random order where the runner supports it. Report failures honestly; never mark the work done with a red or skipped-without-ticket test.
  10. Deliver the result in the output format below.

Test layers

Layer Catches Android iOS Flutter Runs
Unit Logic: validation, mapping, parsing, CRC, reducers, ViewModels JUnit, coroutines-test, Turbine Swift Testing package:test, flutter_test Every PR, seconds
Integration Real collaborators together: repository + DB, serializer + fixtures, DI graph Room in-memory, Robolectric Swift Testing with in-memory SwiftData flutter_test with in-memory fakes Every PR
Screen (UI behavior) One screen renders state and sends events Compose UI test on Robolectric or device XCUITest on a screen with fixed data testWidgets Every PR (JVM, widget), merge (device)
Screenshot Layout, theme, dark mode, large fonts, RTL Roborazzi or Paparazzi swift-snapshot-testing matchesGoldenFile Every PR, pinned image
End-to-end A critical journey across screens and process boundaries Compose UI or Espresso on emulator XCUITest integration_test Merge or nightly

Most tests sit in the first two rows. End-to-end tests are few, one per critical journey (sign-in, pairing, purchase, firmware update), never one per screen detail.

Rules

1. Test each behavior at the lowest layer that can catch its bug

A UI test that checks a validation rule is slow, flaky and points nowhere when it fails.

Kotlin:

// BAD: an instrumented UI test to prove one validation rule
composeRule.onNodeWithTag("pin").performTextInput("12")
composeRule.onNodeWithText("PIN too short").assertIsDisplayed()

// GOOD: the rule is a plain function, tested on the JVM in milliseconds
@Test fun `rejects pin shorter than six digits`() {
    assertEquals(PinError.TooShort, validatePin("12"))
}

Swift:

// BAD: XCUITest launches the app to check a parser
func testBatteryFrame() { app.launch(); /* navigate to a screen that shows the parsed value */ }

// GOOD
@Test func decodesBatteryLevel() throws {
    #expect(try FrameDecoder().decode(Fixtures.batteryFrame).battery == 87)
}

Dart:

// BAD: an integration_test on a device for a mapper
// GOOD
test('maps 0xFF to unknown battery', () {
  expect(Battery.fromRaw(0xFF), Battery.unknown);
});
  • The screen test then checks once that a
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

Plans, writes and reviews test strategies for Android, iOS and Flutter apps: mobile test pyramid, fakes over mocks, virtual time, Compose UI tests, XCUITest, Flutter integration_test, screenshot tests with Roborazzi, Paparazzi, swift-snapshot-testing and goldens, flaky-test quarantine, coverage that matters and CI sharding. Use when deciding what to test where, writing a test plan, fixing flaky or slow suites, or reviewing tests.

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

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

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

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

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

Сравнить mobile-testing с