run-module-tests
SkillProductivityIdentify and run the correct Gradle test task for a given module based on its source sets and plugin type.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the run-module-tests skill
What this skill tells your AI
The instructions your AI receives, as published by jonapoul/aktual in .claude/skills/run-module-tests/SKILL.md and read by ahel’s review.
Run the correct test task(s) for a Gradle module in this KMP project.
Arguments
$ARGUMENTSshould be the Gradle module path (e.g.,aktual-api,aktual-account:vm,aktual-app:desktop)- If omitted, infer it from the most recently discussed or edited module in conversation context
Step-by-Step Process
1. Determine what test source sets exist
Check which test source set directories exist for the module under src/:
src/commonTest/ -> shared tests (run by both androidHostTest and desktopTest tasks)
src/androidHostTest/ -> Android-specific tests (Robolectric, runs on host JVM)
src/desktopTest/ -> JVM/Desktop-specific tests
src/test/ -> Standard JVM test (JVM-only modules)
Use Glob to check: <module-path>/src/*test*/ and <module-path>/src/*Test*/
The module path on disk uses / separators (e.g., aktual-core/api/src/commonTest), but the Gradle path uses : (e.g., :aktual-api).
2. Determine the module type
Check the module's build.gradle.kts for which convention plugin it uses:
| Plugin | Module Type | Available Test Tasks |
|---|---|---|
aktual.module.kotlin | KMP | allTests, testAndroidHostTest, desktopTest |
aktual.module.compose | KMP + Compose | allTests, testAndroidHostTest, desktopTest |
aktual.module.viewmodel | KMP + Compose + VM | allTests, testAndroidHostTest, desktopTest |
aktual.module.di | KMP + DI | allTests, testAndroidHostTest, desktopTest |
aktual.module.jvm | JVM-only | test |
3. Choose the right task
For KMP modules (kotlin/compose/viewmodel/di plugins):
| Source Sets Present | Recommended Task | Why |
|---|---|---|
Only commonTest | testAndroidHostTest | commonTest is compiled into both androidHostTest and desktopTest; pick one to avoid running twice. androidHostTest is preferred as it includes Robolectric support. |
Only androidHostTest (with or without commonTest) | testAndroidHostTest | Runs commonTest + androidHostTest together |
Only desktopTest (with or without commonTest) | desktopTest | Runs commonTest + desktopTest together |
Both androidHostTest and desktopTest | allTests | Need both targets to cover all tests |
commonTest + androidHostTest + desktopTest | allTests | Need both targets |
For JVM-only modules (aktual.module.jvm):
- Always use
test
4. Run the test
Execute the Gradle task:
./gradlew :<gradle-module-path>:<task>
For example:
./gradlew :aktual-api:testAndroidHostTest./gradlew :aktual-account:vm:testAndroidHostTest./gradlew :aktual-budget:sync:vm:allTests./gradlew :aktual-app:desktop:test
5. Report results
After running, report:
- Which task was run and why it was chosen
- Test results (passed/failed/skipped counts)
- Any failures with relevant details
Important Notes
- NEVER run
allTestsortestAllat the project root level - this runs all tests across all modules and will overload the system - When only
commonTestexists, prefertestAndroidHostTestoverdesktopTestsince it has Robolectric available for any Android-dependent code - The
testAlltask (defined in ConventionTest.kt) is a convenience alias that depends on allTest-type tasks in the module - equivalent toallTestsfor KMP modules
Signals
- GitHub stars
- 34
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
run-module-tests- Source
- github.com/jonapoul/aktual