Skip to main content
skill CX Codex

mobile-app-testing · secondsky — Claude Code skill: mobile app testing

A skill for testing mobile apps: unit tests, UI automation, E2E and performance. Useful when you need to set up test infrastructure.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add secondsky/claude-skills --skill mobile-app-testing -a claude-code
Open on GitHub

What mobile-app-testing does

The skill lays out a testing pyramid for mobile apps: unit level on Jest, XCTest and JUnit, integration on Detox and Espresso, E2E on Appium and Detox. Inside are ready examples for React Native, iOS and Android. For React Native it shows a unit test for a cart service and a Detox login E2E flow, for iOS an XCTest case, for Android an Espresso one.

Alongside the code there is a list of practices: test business logic first, mock external dependencies, cover both success and failure paths, automate critical user flows. It also lists what to avoid: testing implementation details, hardcoded test data, interdependent tests. It advises keeping coverage above 80% and running tests on real devices periodically.

The skill does not replace the frameworks themselves: for the examples to run, Jest, Detox, XCTest or Espresso have to be in place already. That is worth checking before you ask the agent to write tests.

What it helps with

  • split tests across the pyramid levels
  • write a Detox E2E login flow
  • cover cart business logic with unit tests
  • move UI checks from manual runs to Espresso
  • break the coupling between tests

Example prompts for the agent

  • set up React Native tests: Jest unit and Detox E2E
  • write a Detox E2E login test for our app
  • map our tests to the pyramid and tell me what is missing

How to install mobile-app-testing

1Skills CLI (Vercel)

npx skills add secondsky/claude-skills --skill mobile-app-testing -a claude-code

2Manually: put the files in place

~/.claude/skills/mobile-app-testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/mobile-app-testing/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about mobile-app-testing

How do I install mobile-app-testing in Claude?

Run npx skills add secondsky/claude-skills --skill mobile-app-testing -a claude-code. The skill then lives at ~/.claude/skills/mobile-app-testing/SKILL.md.

What does mobile-app-testing do?

It describes a testing strategy for mobile apps: unit, integration and E2E tests, with examples for React Native, iOS and Android.

Which test frameworks does the skill cover?

The examples use Jest and Detox for React Native, XCTest for iOS, Espresso and Appium for Android. Those frameworks need to be set up in your project first.

Source text

SKILL.md · MIT
---
name: mobile-app-testing
description: Mobile app testing with unit tests, UI automation, performance testing. Use for test infrastructure, E2E tests, testing standards, or encountering test framework setup, device farms, flaky tests, platform-specific test errors.
metadata:
  keywords: "mobile testing, unit testing, UI automation, E2E testing, Jest, XCTest, JUnit, Detox, Espresso, Appium, React Native testing, iOS testing, Android testing, test framework, device farms, flaky tests, mobile test automation, integration testing, testing pyramid, test coverage"
license: MIT
---

# Mobile App Testing

Implement comprehensive testing strategies for mobile applications.

## Testing Pyramid

| Level | Tools | Coverage |
|-------|-------|----------|
| Unit | Jest, XCTest, JUnit | 70% |
| Integration | Detox, Espresso | 20% |
| E2E | Appium, Detox | 10% |

## React Native (Jest + Detox)

```javascript
// Unit test
describe('CartService', () => {
  it('calculates total correctly', () => {
    const cart = new CartService();
    cart.addItem({ price: 10, quantity: 2 });
    expect(cart.getTotal()).toBe(20);
  });
});

// E2E test (Detox)
describe('Login flow', () => {
  beforeEach(async () => {
    await device.reloadReactNative();
  });

  it('should login successfully', async () => {
    await element(by.id('email-input')).typeText('[email protected]');
    await element(by.id('password-input')).typeText('password123');
    await element(by.id('login-button')).tap();
    await expect(element(by.id('dashboard'))).toBeVisible();
  });
});
```

## iOS (XCTest)

```swift
func testLoginSuccess() {
    let app = XCUIApplication()
    app.launch()

    app.textFields["email"].tap()
    app.textFields["email"].typeText("[email protected]")
    app.secureTextFields["password"].typeText("password123")
    app.buttons["Login"].tap()

    XCTAssertTrue(app.staticTexts["Welcome"].exists)
}
```

## Android (Espresso)

```kotlin
@Test
fun loginSuccess() {
    onView(withId(R.id.email)).perform(typeText("[email protected]"))
    onView(withId(R.id.password)).perform(typeText("password123"))
    onView(withId(R.id.loginButton)).perform(click())
    onView(withId(R.id.dashboard)).check(matches(isDisplayed()))
}
```

## Best Practices

- Test business logic first (unit tests)
- Mock external dependencies
- Test both success and failure paths
- Automate critical user flows
- Maintain >80% code coverage
- Test on real devices periodically

## Avoid

- Testing implementation details
- Hardcoded test data
- Interdependent tests
- Skipping error case testing

© secondsky · MIT · secondsky/claude-skills

Similar skills

All skills for Testing and QA →

mobile-app-testing by other authors comes first.

From the same set94

architecture-patterns A skill that gives your agent backend architecture templates: Clean Architecture layers, ports and adapters, and Domain-Driven Design building blocks. CX Codex +1 493installs api-rate-limiting A skill that walks you through rate limiting an API with token bucket, sliding window and Redis-backed counters. Useful when you open an endpoint to the public or split access by plan. CX Codex +1 491installs design-system-creation A skill that walks the agent through building a design system: tokens, typography, components and their docs. Useful when UI standards need to be settled before code. CX Codex +1 481installs technical-specification This skill walks the agent through a technical spec template: requirements, architecture, API design, rollout plan, tests and risks. Useful before a feature turns into code. CX Codex +1 470installs bun-test-basics A skill that feeds your agent the bun:test syntax: assertions, describe/it, skip/only/each modifiers and how to run the suite. CX Codex +1 458installs threejs A skill with reference files and working examples for Three.js: scenes, materials, lighting, shaders, GLTF loading. Useful when you build 3D in the browser. CX Codex +1 460installs ml-model-training A skill that walks the agent through the full model training cycle: data prep, splitting, training and evaluation. Useful when you need a classifier or regressor without skipping steps. CX Codex +1 457installs payment-gateway-integration A skill for wiring Stripe, PayPal or Square into your app: payment intents, subscriptions, webhooks and refunds. Useful when you build checkout or billing. CX Codex +1 454installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor