Receber por email
← Voltar para o catálogo

Mobile Testing Frameworks

Experiência abrangente em frameworks de teste mobile.

1.4kestrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add a5c-ai/babysitter

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/mobile-testing-frameworks/svg)](https://www.skillteca.com.br/skills/mobile-testing-frameworks)

Skills relacionadas

Ver todas de Automação →

Alerta por categoria

Receba novas skills de Automação toda segunda

1 email curto, só com as skills novas de Automação. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Mobile Testing Frameworks Skill

Overview

This skill provides comprehensive expertise in mobile testing frameworks across platforms. It enables E2E testing with Detox and Maestro, native testing with XCUITest and Espresso, and cross-platform testing with Appium.

Allowed Tools

  • bash - Execute test commands and framework CLIs
  • read - Analyze test files and configurations
  • write - Generate test cases and configurations
  • edit - Update existing tests
  • glob - Search for test files
  • grep - Search for patterns in test code

Capabilities

Detox (React Native)

  1. Configuration
  2. Set up Detox configurations
  3. Configure iOS and Android builds
  4. Set up device/simulator targets
  5. Configure test runners (Jest)
  1. Test Writing
  2. Write element matchers
  3. Implement actions (tap, type, scroll)
  4. Configure expectations
  5. Handle synchronization
  1. Advanced Features
  2. Mock native modules
  3. Handle permissions
  4. Configure network mocking
  5. Implement visual regression

Maestro

  1. Flow Configuration
  2. Write YAML test flows
  3. Configure app launch
  4. Set up device targets
  5. Handle environment variables
  1. Actions and Assertions
  2. Tap, type, swipe gestures
  3. Assert element visibility
  4. Take screenshots
  5. Run JavaScript assertions

XCUITest (iOS)

  1. Test Setup
  2. Configure test schemes
  3. Set up test plans
  4. Configure device targets
  5. Handle launch arguments
  1. UI Testing
  2. Element queries with XCUIElement
  3. Actions (tap, swipe, pinch)
  4. Accessibility identifier usage
  5. Keyboard handling

Espresso (Android)

  1. Test Configuration
  2. Set up instrumentation tests
  3. Configure test runner
  4. Handle Hilt injection
  5. Configure Compose testing
  1. UI Testing
  2. ViewMatchers and ViewActions
  3. Compose semantics testing
  4. IdlingResources for async
  5. Intent verification

Appium

  1. Cross-Platform Testing
  2. Configure capabilities
  3. Set up driver sessions
  4. Handle multiple platforms
  5. Configure cloud testing

Device Farms

  1. Cloud Testing
  2. AWS Device Farm integration
  3. Firebase Test Lab setup
  4. BrowserStack configuration
  5. Test distribution

Target Processes

This skill integrates with the following processes:

  • mobile-testing-strategy.js - Testing strategy implementation
  • mobile-accessibility-implementation.js - Accessibility testing
  • mobile-security-implementation.js - Security testing

Dependencies

Required

  • Node.js (for Detox, Maestro)
  • Xcode (for XCUITest)
  • Android Studio (for Espresso)
  • Platform-specific SDKs

Optional

  • Appium
  • Device farm accounts
  • CI/CD platform

Configuration

Detox Configuration

// .detoxrc.js
module.exports = {
  testRunner: {
    args: {
      $0: 'jest',
      config: 'e2e/jest.config.js',
    },
    jest: {
      setupTimeout: 120000,
    },
  },
  apps: {
    'ios.debug': {
      type: 'ios.app',
      binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/MyApp.app',
      build: 'xcodebuild -workspace ios/MyApp.xcworkspace -scheme MyApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build',
    },
    'ios.release': {
      type: 'ios.app',
      binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/MyApp.app',
      build: 'xcodebuild -workspace ios/MyApp.xcworkspace -scheme MyApp -configuration Release -sdk iphonesimulator -derivedDataPath ios/build',
    },
    'android.debug': {
      type: 'android.apk',
      binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
      build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',
      reversePorts: [8081],
    },
    'android.release': {
      type: 'android.apk',
      binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
      build: 'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release',
    },
  },
  devices: {
    simulator: {
      type: 'ios.simulator',
      device: { type: 'iPhone 15 Pro' },
    },
    emulator: {
      type: 'android.emulator',
      device: { avdName: 'Pixel_7_API_34' },
    },
  },
  configurations: {
    'ios.sim.debug': {
      device: 'simulator',
      app: 'ios.debug',
    },
    'ios.sim.release': {
      device: 'simulator',
      app: 'ios.release',
    },
    'android.emu.debug': {
      device: 'emulator',
      app: 'android.debug',
    },
    'android.emu.release': {
      device: 'emulator',
      app: 'android.release',
    },
  },
};

Usage Examples

Detox Test

// e2e/login.test.ts
import { device, element, by, expect } from 'detox';

describe('Login Flow', () => {
  beforeAll(async () => {
    await device.launchApp({
      newInstance: true,
      permissions: { notifications: 'YES' },
    });
  });

  beforeEach(async () => {
    await device.reloadReactNative();
  });

  it('should show login screen on first launch', async () => {
    await expect(element(by.id('login-screen'))).toBeVisible();
    await expect(element(by.id('email-input'))).toBeVisible();
    await expect(element(by.id('password-input'))).toBeVisible();
  });

  it('should show error for invalid credentials', async () => {
    await element(by.id('email-input')).typeText('invalid@example.com');
    await element(by.id('password-input')).typeText('wrongpassword');
    await element(by.id('login-button')).tap();

    await expect(element(by.id('error-message'))).toBeVisible();
    await expect(element(by.text('Invalid credentials'))).toBeVisible();
  });

  it('should navigate to home on successful login', async () => {
    await element(by.id('email-input')).typeText('test@example.com');
    await element(by.id('password-input')).typeText('password123');
    await element(by.id('login-button')).tap();

    await waitFor(element(by.id('home-screen')))
      .toBeVisible()
      .withTimeout(5000);

    await expect(element(by.id('welcome-message'))).toBeVisible();
  });

  it('should handle scroll in long list', async () => {
    // Login first
    await element(by.id('email-input')).typeText('test@example.com');
    await element(by.id('password-input')).typeText('password123');
    await element(by.id('login-button')).tap();

    await waitFor(element(by.id('home-screen'))).toBeVisible().withTimeout(5000);

    // Scroll to bottom of list
    await element(by.id('item-list')).scrollTo('bottom');
    await expect(element(by.id('item-50'))).toBeVisible();

    // Scroll back to top
    await element(by.id('item-list')).scrollTo('top');
    await expect(element(by.id('item-1'))).toBeVisible();
  });
});

Maestro Flow

# flows/login.yaml
appId: com.example.myapp
---
- launchApp:
    clearState: true

- assertVisible: "Welcome"

- tapOn: "Email"
- inputText: "test@example.com"

- tapOn: "Password"
- inputText: "password123"

- tapOn: "Sign In"

- assertVisible: "Home"
- takeScreenshot: "home_after_login"

# Test logout flow
- tapOn: "Profile"
- tapOn: "Sign Out"
- assertVisible: "Welcome"

XCUITest

// MyAppUITests/LoginTests.swift
import XCTest

final class LoginTests: XCTestCase {
    var app: XCUIApplication!

    override func setUpWithError() throws {
        continueAfterFailure = false
        app = XCUIApplication()
        app.launchArguments = ["--uitesting"]
        app.launch()
    }

    override func tearDownWithError() throws {
        app = nil
    }

    func testLoginScreenElements() throws {
        XCTAssertTrue(app.textFields["email-input"].exists)
        XCTAssertTrue(app.secureTextFields["password-input"].exists)
        XCTAssertTrue(app.buttons["login-button"].exists)
    }

    func testSuccessfulLogin() throws {
        let emailField = app.textFields["email-input"]
        let passwordField = app.secureTextFields["password-input"]
        let loginButton = app.buttons["login-button"]

        emailFi
Compartilhar X LinkedIn