$npx -y skills add Amplicode/spring-skills --skill run-testsRun a Gradle project's tests by test type or module — unit, integration, or all. Use this skill whenever the user wants to run, re-run, or check the project's tests (e.g. "run the unit tests", "run all tests", "run the integration tests for the vet module", "did the tests pass?")
| 1 | # Run tests |
| 2 | |
| 3 | ## Test types and modules |
| 4 | |
| 5 | Test **types** (extend as a project needs): |
| 6 | |
| 7 | | Type | Meaning | Typical Gradle tasks | |
| 8 | |------|---------|----------------------| |
| 9 | | `unit` | fast tests, no Spring/Docker | `test` | |
| 10 | | `integration` | Spring + Testcontainers | `testIntgr` or `integrationTest` | |
| 11 | | `all` | everything | `test` + `testIntgr` | |
| 12 | |
| 13 | A **module** is a Gradle subproject; prefix its path onto the task |
| 14 | (`:web:test`). A module combines with a type on the fly — build that |
| 15 | configuration when first asked and remember it. |
| 16 | |
| 17 | ## Pick the path |
| 18 | |
| 19 | Probe FIRST, here, before loading either reference — so you read only the one you |
| 20 | need. Call `steroid_list_projects` (via ToolSearch if the tool schema isn't |
| 21 | loaded): |
| 22 | |
| 23 | - It returns the repo you're in → **IDE path**: note that entry's `project_name` |
| 24 | and follow `references/ide.md` (runs tests inside the IDE, each in its own Run |
| 25 | tab). Its steps start already knowing the `project_name` — don't re-probe. |
| 26 | - It fails, or the repo isn't listed → **console Gradle path**: follow |
| 27 | `references/gradle.md` (runs Gradle in the console) and tell the user you used |
| 28 | the console fallback because the IDE wasn't reachable. |
| 29 | |
| 30 | Both paths end by collecting the result **in a Haiku subagent** that returns the |
| 31 | `references/report.md` report and nothing else — keeping the long test/build |
| 32 | output out of the main context. Act on that report in the main model. |