Skip to content

Testing Agents

Ali Sadeghi edited this page Jan 27, 2026 · 6 revisions

Testing Agents

Specialized agents for generating comprehensive test suites.

Overview

Testing Agents work together to provide full coverage across all layers:

  • test-orchestrator - Coordinates test generation across all layers
  • test-fixtures - Generate model fixtures with sensible defaults
  • test-datasource - Generate DataSource tests with MockEngine
  • test-repository - Generate Repository tests with Mokkery
  • test-viewmodel - Generate ViewModel tests with Turbine
  • test-ui - Generate Compose UI tests
  • test-integration - Generate E2E integration tests

Invocation

Use the /feature-test command:

/feature-test login

Test Pyramid

        ┌──────────┐
        │ E2E      │  test-integration
        ├──────────┤
        │  UI      │  test-ui
        ├──────────┤
        │ViewModel│  test-viewmodel
        ├──────────┤
        │Repository│  test-repository
        ├──────────┤
        │DataSource│  test-datasource
        └──────────┘
        Fixtures   ← test-fixtures (shared)

Agents

Master coordinator that:

  1. Analyzes feature implementation
  2. Extracts models, DataSource, Repository, ViewModel, Screens
  3. Spawns 6 specialized test agents in parallel
  4. Ensures test consistency

Generates reusable test data builders with sensible defaults.

Creates:

object LoginFixtures {
    fun loginRequest(...)
    fun loginResponse(...)
    fun user(...)
}

Generates DataSource layer tests using MockEngine.

Tests:

  • HTTP response handling
  • Error scenarios
  • Status codes
  • JSON serialization

Generates Repository layer tests using Mokkery mocking.

Tests:

  • DataSource delegation
  • Error propagation
  • Data transformation
  • Cache behavior

Generates ViewModel tests using Turbine for Flow testing.

Tests:

  • State transitions
  • Event handling
  • Side effects
  • Loading states

Generates Compose UI tests.

Tests:

  • Component rendering
  • User interactions
  • State display
  • Navigation events

Generates end-to-end integration tests (MockEngine → ViewModel).

Tests:

  • Full flow from API to UI state
  • Real repository/datasource integration
  • Error handling across layers

Back to Agents

Clone this wiki locally