Skip to content

Feature: Robust Maestro E2E Tests for CI/CD #1909

@andrew-bierman

Description

@andrew-bierman

Feature Request: Robust Maestro E2E Tests for CI/CD

Problem Statement
The PackRat mobile app currently lacks reliable end-to-end testing in CI/CD pipelines. Manual testing is time-consuming and error-prone, while existing automated tests don't cover critical user flows on real devices/simulators.

Proposed Solution
Implement comprehensive Maestro E2E test suite that runs reliably in CI/CD environments (GitHub Actions).

Core Requirements

Test Coverage

  • Onboarding flow - First launch, permissions, initial setup
  • Authentication - Login, logout, session persistence
  • Trip Management - Create trip, edit trip, delete trip, view trip details
  • Pack Management - Create pack, add items, remove items, mark as packed
  • Catalog Browsing - Search items, filter by category, view item details
  • Offline Functionality - Core features work without network
  • Settings - Toggle preferences, update profile

CI/CD Integration

  • GitHub Actions workflow for automated test runs
  • iOS Simulator tests (iPhone 15, iOS 17+)
  • Android Emulator tests (Pixel 7 API 34)
  • Parallel test execution to reduce runtime
  • Artifacts upload - Screenshots/videos on failure
  • Slack/Discord notifications for test failures

Technical Implementation

Maestro Configuration

# .maestro/config.yaml
flows:
  - flows/onboarding/*.yaml
  - flows/auth/*.yaml
  - flows/trips/*.yaml
  - flows/packs/*.yaml
  - flows/catalog/*.yaml
  
executionOrder:
  flowsOrder:
    - flows/setup/clear-state.yaml
    - flows/onboarding/welcome-flow.yaml
    - flows/auth/login-flow.yaml
    # ... etc

Test Environment

  • Mock API server for deterministic responses
  • Test fixtures for trips, packs, catalog items
  • Environment-specific config (staging vs prod)

CI/CD Pipeline

# .github/workflows/e2e-tests.yaml
name: E2E Tests
on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]
    
jobs:
  ios-e2e:
    runs-on: macos-14
    steps:
      - uses: actions/checkout@v4
      - name: Setup Maestro
        uses: dalexanco/setup-maestro@v1
      - name: Build iOS
        run: eas build --platform ios --profile preview --non-interactive
      - name: Run E2E Tests
        run: maestro test --format junit flows/
      - name: Upload Results
        uses: actions/upload-artifact@v4
        if: failure()
        with:
          name: ios-test-results
          path: ~/.maestro/tests/

Acceptance Criteria

  1. All critical user flows have Maestro test coverage
  2. Tests run in CI on every PR and main branch push
  3. Tests complete in under 15 minutes (parallelized)
  4. Failed tests provide clear screenshots and logs
  5. Tests are stable (flakiness < 5%)

Effort Estimate

  • Initial setup: 2-3 days
  • Test writing (per flow): 2-4 hours
  • CI/CD integration: 1-2 days
  • Total: ~1-2 weeks for comprehensive coverage

Priority
High - Improves release confidence and reduces manual QA burden.

References

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions