running_gradle_tests
Skill1.1k starsChanged 5 days agoApache-2.0View on GitHub
Executes and diagnoses Gradle tests with high-precision `--tests` filtering, surgical per-test failure isolation, and full stack traces; ALWAYS use instead of `./gradlew test` for test execution, failure investigation, and post-mortem analysis. Do NOT use for general build lifecycle tasks (use `running_gradle_builds`) or dependency auditing.
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 5 are distinctive, and 22 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
22
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
ALWAYS: use the gradle tool instead of ./gradlew via shell.
- Very specific: line 20
ALWAYS: use the --tests flag for surgical test selection to minimize feedback loops.
- Distinctive: line 22
ALWAYS: prefer foreground execution (default) unless the test suite is extremely long-running (>2 minutes) or you explicitly intend to …
- Very specific: line 23
ONLY: use background: true for managed background orchestration when context isolation and non-blocking exploration are required.
- Very specific: line 24
STRONGLY PREFERRED: Use inspect_build for all test diagnostics.
- Very specific: line 25
ALWAYS: use inspect_build with mode: "details" and testName="..." to access full test output and stack traces.
- Very specific: line 26
NEVER: use taskPath or captureTaskOutput to investigate specific test failures.
- Very specific: line 30
When tests fail, inspect_build is your most powerful diagnostic tool.
- Very specific: line 34
Use testOutcome="FAILED" to quickly see which tests failed without being overwhelmed by logs.
- Very specific: line 40
CRITICAL: ALWAYS use mode="details" and testName to see the complete stdout, stderr, and stack trace for a specific test.
- Very specific: line 48
Use testName with the default mode="summary" to see all executions of a test (e.g., across different projects or iterations).
- Very specific: line 54
Use timeout, waitFor, or waitForTask to block until a condition is met in a background test run.
- Very specific: line 57
Wait for completion: If timeout is set without a wait condition, the tool waits for the build to finish.
- Distinctive: line 61
ALWAYS use foreground for authoritative tests: If you intend to wait for results, ALWAYS use foreground execution.
- Very specific: line 63
Background ONLY for long test suites: Use background: true ONLY for test suites that take a long time to run and you explicitly intend to …
- Very specific: line 64
Foreground tests are safe: Do not fear running high-output test suites in the foreground.
- Very specific: line 65
Monitor with
inspect_build: Use inspect_build to check the status of background test runs or to retrieve structured output and stack … - Very specific: line 66
Check for environment failures: If a test run fails with a general error, use inspect_build(failures={}) to check for compilation or …
- Very specific: line 67
Investigate specifically: Use the testName option in inspect_build with mode="details" to isolate specific failure details.
- Very specific: line 110
Targeted Test Execution: When you need to run specific tests or suites using precise filters (like --tests) to minimize feedback loops.
- Distinctive: line 111
Rapid Failure Isolation: When a build has failed and you need high-resolution diagnostics, including stdout/stderr and detailed stack …
- Distinctive: line 112
Large-Scale Suite Management: When running extensive test suites that benefit from managed background execution and real-time progress …
- Very specific: line 119
Call gradle with commandLine including --tests.
- Distinctive: line 120
If the tool reports failures, review the included console output.
- Very specific: line 125
Use inspect_build(buildId=ID, testOutcome="FAILED") to list all failed tests.
- Very specific: line 126
CRITICAL: Use inspect_build(buildId=ID, mode="details", testName=TNAME) to see the full output and stack trace for a specific test.
- Very specific: line 128
DO NOT: use taskPath or captureTaskOutput for this.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Authoritative Gradle Test Execution & Diagnostics
Executes tests with deep diagnostic tools to isolate and fix failures fast, ensuring maximum code quality and build reliability.
Constitution
- ALWAYS use the
gradletool instead of./gradlewvia shell. - ALWAYS use the
--testsflag for surgical test selection to minimize feedback loops. - ALWAYS provide absolute paths for
projectRoot. - ALWAYS prefer foreground execution (default) unless the test suite is extremely long-running (>2 minutes) or you explicitly intend to perform independent research while it proceeds.
- ONLY use
background: truefor managed background orchestration when context isolation and non-blocking exploration are required. - STRONGLY PREFERRED: Use
inspect_buildfor all test diagnostics. It provides isolated output and full stack traces that are often truncated in the main console. - ALWAYS use
inspect_buildwithmode: "details"andtestName="..."to access full test output and stack traces. - NEVER use
taskPathorcaptureTaskOutputto investigate specific test failures; these provide the overall task log which is often truncated and lacks per-test isolation.
Surgical Test Inspection with inspect_build
When tests fail, inspect_build is your most powerful diagnostic tool. It provides isolated output and full stack traces that are often truncated in the main console.
1. List All Failed Tests (Summary)
Use testOutcome="FAILED" to quickly see which tests failed without being overwhelmed by logs.
- Example:
inspect_build(buildId="ID", testOutcome="FAILED")
2. Get Full Test Details (Details)
CRITICAL: ALWAYS use mode="details" and testName to see the complete stdout, stderr, and stack trace for a specific test.
- Unique Prefix Support: You can provide a unique prefix of the test name (e.g.,
testName="com.example.MyTest"instead of the full FQN). If the prefix is unique, the tool will automatically select the test. If ambiguous, it will return a list of matching names for refinement. - Example:
inspect_build(buildId="ID", mode="details", testName="com.example.MyTest.myMethod")
3. Filter by Name (Summary)
Use testName with the default mode="summary" to see all executions of a test (e.g., across different projects or iterations).
- Example:
inspect_build(buildId="ID", testName="MyTest")
4. Progress Monitoring
Use timeout, waitFor, or waitForTask to block until a condition is met in a background test run.
- Example:
inspect_build(buildId="ID", timeout=60, waitForTask=":app:test") - Wait for completion: If
timeoutis set without a wait condition, the tool waits for the build to finish.
Directives
- ALWAYS use foreground for authoritative tests: If you intend to wait for results, ALWAYS use foreground execution. It provides superior progressive disclosure and simpler control flow than starting a background build only to
immediately call
inspect_build(timeout=...). - Background ONLY for long test suites: Use
background: trueONLY for test suites that take a long time to run and you explicitly intend to perform independent research while they proceed. - Foreground tests are safe: Do not fear running high-output test suites in the foreground. The
gradletool uses progressive disclosure to provide concise summaries and structured results, keeping session history clean and efficient. - Monitor with
inspect_build: Useinspect_buildto check the status of background test runs or to retrieve structured output and stack traces for failed tests. - Check for environment failures: If a test run fails with a general error, use
inspect_build(failures={})to check for compilation or configuration issues. - Investigate specifically: Use the
testNameoption ininspect_buildwithmode="details"to isolate specific failure details. For detailed diagnostic workflows, see thetest_diagnostics.mdreference.
Authoritative Test Selection Patterns
The --tests flag supports powerful, high-precision filtering. Use these patterns to minimize execution time and context noise.
1. Simple Filters
- Exact Class:
--tests com.example.MyTest - Exact Method:
--tests com.example.MyTest.myTestMethod - Wildcard Method:
--tests com.example.MyTest.test*(Runs all methods starting with 'test')
2. Wildcard Filters (* and ?)
- Package Filter:
--tests com.example.service.*(Runs all tests in the 'service' package) - Class Prefix:
--tests *IntegrationTest(Runs all classes ending in 'IntegrationTest') - Character Wildcard:
--tests com.example.Test?(Matches Test1, TestA, etc.)
3. Syntax Rules
- No Class Path: Patterns match against the fully qualified name of the test class or method.
- Multi-Filter: You can provide multiple
--testsflags to run a specific selection of tests.gradle(commandLine=["test", "--tests", "ClassA", "--tests", "ClassB"])
Authoritative Task Path Syntax
Understanding how to target tests in a multi-project build is critical to avoid running more tests than necessary.
1. Task Selectors (Recursive)
Providing test without a leading colon executes the test task in every project (root and all subprojects) that has one.
- Example:
gradle(commandLine=["test", "--tests", "MyTest"])-> Searches for and runs 'MyTest' in all projects.
2. Absolute Task Paths (Targeted)
Providing a path with a leading colon targets a single specific project.
- Root Project Only:
gradle(commandLine=[":test", "--tests", "MyTest"]) - Subproject Only:
gradle(commandLine=[":app:test", "--tests", "MyTest"])
When to Use
- Targeted Test Execution: When you need to run specific tests or suites using precise filters (like
--tests) to minimize feedback loops. - Rapid Failure Isolation: When a build has failed and you need high-resolution diagnostics, including stdout/stderr and detailed stack traces.
- Large-Scale Suite Management: When running extensive test suites that benefit from managed background execution and real-time progress monitoring.
Workflows
Running Specific Tests
- Identify the project path (e.g.,
:app) and the test filter (e.g.,com.example.MyTestClass*). - Call
gradlewithcommandLineincluding--tests. - If the tool reports failures, review the included console output.
Investigating Failures
- Identify the
BuildIdfrom the result. - Use
inspect_build(buildId=ID, testOutcome="FAILED")to list all failed tests. - CRITICAL: Use
inspect_build(buildId=ID, mode="details", testName=TNAME)to see the full output and stack trace for a specific test.
- DO NOT use
taskPathorcaptureTaskOutputfor this. - Per-test output is authoritative, isolated, and contains full stack traces that are often omitted from the task console.
Examples
Run a single test class in a specific subproject
{
"commandLine": [":module-a:test", "--tests", "com.example.service.MyServiceTest"]
}
// Reasoning: Using an absolute task path and exact class filter for the fastest possible feedback loop.List all failed tests in a build
{
"buildId": "build_20240301_130000_def456",
"testOutcome": "FAILED"
}// Reasoning: Using inspect_build to isolate only the failures from a large test suite.
### Look up details for a specific failed test
```json
{
"buildId": "build_20240301_130000_def456",
"mode": "details",
"testName": "com.example.a.MyTest.shouldFail"
}// Reasoning: Retrieving the full stack trace and isolated stdout/stderr for a specific failure.
## Troubleshooting
- **Missing environment variables**: Set `invocationArguments: { envSource: "SHELL" }` if Gradle cannot find expected env vars (e.g., `JAVA_HOME`).
## Resources
- [Test Diagnostics](./references/test_diagnostics.md)Trending
Quiet since September.about the whole repository
Who's talking about Kotlin/kotlinx-rpc
- bright-room/mindstock“fix(deps): update kotlinx.rpc to v0.10.4”GitHub · Sep 25, 2026
- bright-room/mindstock“fix(deps): update kotlinx.rpc to v0.10.3”GitHub · Jul 10, 2026
- modelix/modelix.editor“fix(deps): update kotlinx.rpc to v0.10.4”GitHub · Jul 6, 2026
- ktorio/ktor-plugin-registry“Bump the all-gradle group with 11 updates”GitHub · Jun 30, 2026
- DerTyp7214/synara-api“chore(deps): bump kotlinx-rpc from 0.10.2 to 0.10.3”GitHub · Jun 27, 2026
The biggest 5 of 16 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 16
Talked about on GitHub (16 times).
On GitHub · 16
- Sep 25, 2026fix(deps): update kotlinx.rpc to v0.10.4 — bright-room/mindstock0 reactions · 1 comment
- Jul 10, 2026fix(deps): update kotlinx.rpc to v0.10.3 — bright-room/mindstock0 reactions
- Jul 6, 2026fix(deps): update kotlinx.rpc to v0.10.4 — modelix/modelix.editor0 reactions · 1 comment
- Jun 30, 2026Bump the all-gradle group with 11 updates — ktorio/ktor-plugin-registry0 reactions
- Jun 27, 2026chore(deps): bump kotlinx-rpc from 0.10.2 to 0.10.3 — DerTyp7214/synara-api0 reactions · 1 comment
11 more on GitHub
- May 3, 2026Add compiler plugin implementation and Kotlin External FIR Support — TBSten/cream0 reactions
- Mar 30, 2026build(deps): bump kotlinx-rpc from 0.10.1 to 0.10.2 — modelix/modelix.editor0 reactions · 5 comments
- Jan 17, 2026chore(deps): bump kotlinx-rpc from 0.10.1 to 0.10.2 — DerTyp7214/synara-api0 reactions · 2 comments
- Dec 20, 2025build(deps): bump org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client from 0.10.0 to 0.10.1 — DerTyp7214/synara-api0 reactions · 1 comment
- Dec 20, 2025build(deps): bump org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server from 0.10.0 to 0.10.1 — DerTyp7214/synara-api0 reactions · 1 comment
- Jul 3, 2025Update kxrpc tutorial to 0.8.0 — ktorio/ktor-documentation0 reactions · 2 comments
- Jul 3, 2025Update kxrpc to 0.8.0 — ktorio/ktor-plugin-registry0 reactions · 1 comment
- Apr 4, 2025Update kxrpc to 0.6.0 — ktorio/ktor-plugin-registry0 reactions · 1 comment
- Jan 28, 2025Update kxrpc to 0.5.0 — ktorio/ktor-plugin-registry0 reactions
- Jan 7, 2025Migrate cloud-run server to RPC ProtoBuf — ashdavies/playground.ashdavies.dev0 reactions
- May 26, 2024KotlinでRemote Procedure Calls (RPC) を簡単に行えるライブラリkotlinx.rpc — AndroidDagashi/AndroidDagashi0 reactions
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- commit-changesSkill
- file-youtrack-issueSkill
- fix-issueSkill
- gh-stackSkill
- gradle_expertSkill
- interacting_with_project_runtimeSkill
- introspecting_gradle_projectsSkill
- managing_gradle_dependenciesSkill
- researching_gradle_internalsSkill
- run-local-verificationsSkill
- running_gradle_buildsSkill
- searching_dependency_sourcesSkill
- update-docSkill
- update-shimSkill
- use-develocitySkill
- use-teamcitySkill
- use-youtrackSkill
- verify-compiler-plugin-compatibilitySkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

