-
Notifications
You must be signed in to change notification settings - Fork 0
Testing Agents
Ali Sadeghi edited this page May 18, 2026
·
6 revisions
Six specialized agents that generate a comprehensive test suite for a feature. Spawned by Feature-Test (/feature-test {featurename}), which pre-computes a YAML context once and hands a focused slice to each agent — workers do not re-read source files.
| Agent | Output | Color |
|---|---|---|
| Test-Fixtures |
{Feature}Fixtures.kt + {Feature}UiFixtures.kt
|
purple |
| Test-DataSource | {Feature}RemoteDataSourceTest.kt |
blue |
| Test-Repository | {Feature}RepositoryImplTest.kt |
cyan |
| Test-ViewModel | {Feature}ViewModelTest.kt |
orange |
| Test-UI |
{Feature}ScreenTest.kt (targets ScreenRoot) |
yellow |
| Test-Integration | {Feature}IntegrationTest.kt |
red |
All test files land in commonTest — the previous androidTest split is gone. Tests run on the desktopTest target.
┌───────────────────┐
│ Integration │ test-integration
├───────────────────┤
│ UI │ test-ui (ScreenRoot)
├───────────────────┤
│ ViewModel │ test-viewmodel
├───────────────────┤
│ Repository │ test-repository
├───────────────────┤
│ DataSource │ test-datasource
└───────────────────┘
Fixtures (shared) ← test-fixtures
The /feature-test command spawns agents in three waves to keep memory usage safe (max 3 parallel):
Wave 1: test-fixtures ← runs alone, others depend on it
Wave 2: test-datasource + test-repository ← parallel
Wave 3: test-viewmodel + test-ui + test-integration ← parallel
feature/{name}/src/commonTest/kotlin/{pkg}/{name}/
├── fixtures/
│ ├── {Feature}Fixtures.kt
│ └── {Feature}UiFixtures.kt
├── data/
│ ├── datasource/{Feature}RemoteDataSourceTest.kt
│ └── {Feature}RepositoryImplTest.kt
├── presentation/
│ ├── {Feature}ViewModelTest.kt
│ └── ui/{Feature}ScreenTest.kt # targets ScreenRoot
└── integration/
└── {Feature}IntegrationTest.kt
-
ErrorConsteverywhere —ErrorConst.NoNetwork,ErrorConst.Unauthorized,ErrorConst.ServerUnknownError(code),ErrorConst.SerializationError. -
JSON error format —
{"detail": "...", "code": ...}matchesNetworkErrorModel. -
UI tests target
ScreenRoot— the ViewModel-independent composable. TheScreenwrapper is not tested. -
advanceUntilIdle()is called after a coroutine-launching method, never immediately aftercreateViewModel().
See Feature-Test for the orchestration that ties them together.
Back to Agents