Revamp test suite across Kotlin Multiplatform apps (CLI, Compose, watch, sharedLib)
Session from pi-coding-sessions on Hugging Face by championswimmer · MIT · condensed by Coders Talk
Overhaul the project's test suite by deleting trivial tests and adding tests for complex flows, using parallel sub-agents to cover cliApp, composeApp, watchApp, and sharedLib.
- +0Prompt · +0Revamp testing across the whole codebase: delete trivial tests, add tests for complex flows, use parallel sub-agents per module (cli, compose, android, ios, watch), mock coordinators/backup providers, commit in small pieces, track plan in .agents/plans.
- +0mAgent did · +0mExplored codebase structure, created 4 sub-agents (sharedLib, composeApp, cliApp, watchApp), hit a 404 on an unavailable model name for the first parallel run.
- +0mFail · +0mSub-agent invocation failed: unknown agent name and 404 error for model claude-3-5-sonnet-20241022 not found.
- +0mAgent did · +0mReran sub-agents with corrected model (claude-3-7-sonnet), all 4 succeeded: trimmed trivial tests, added mocked/complex-flow tests for sharedLib, composeApp, cliApp; verified with per-module gradle check runs and committed fixes for unresolved test references.
- +9mPrompt · +9mThere are watchApp test revamp plans that weren't completed yet — please finish that too, again with parallel sub-agents.
- +9mAgent did · +9mInvestigated watchApp source (datalayer, otp, presentation), wrote WatchOtpProviderTest covering OTP generation/state parsing, fixed a data-model mismatch in the test, ran and passed testDebugUnitTest, updated the plan doc, and committed the new test and plan update.
- +12mPrompt · +12mCheck if testGetAllAccountsSeparatesIssuerFromDisplayLabel is passing; if not, fix it and commit.
- +13mFail · +13mFound the test had stale assertions checking issuer embedded in the raw label string instead of the properly split accountLabel/issuer fields.
- +13mAgent did · +13mUpdated the test assertions to match the new split accountLabel/issuer model, reran sharedLib check to confirm the build passed, and committed the fix.
- +14mOutcome · +14mTesting revamp completed across sharedLib, composeApp, cliApp, and watchApp with 6 commits made (trivial test cleanup, new complex-flow tests, watchApp OTP tests, and a stale-assertion fix), all module `check` tasks passing.
Next time I'd ask for the parallel sub-agent model to be verified up front, since the first run wasted a cycle on a 404 for a non-existent model name. The correction that actually mattered was catching that watchApp had been skipped entirely in the first pass, and later that a specific test had stale assertions from before a data-model split — pointing that out directly let the agent fix it in one pass. Overall it worked well once the model issue was sorted, delivering real coverage additions and cleanups across four modules with small, verifiable commits.