docs: add build & test guidance for coding agents (AGENTS.md)#2
Draft
milamberspace wants to merge 1 commit into
Draft
docs: add build & test guidance for coding agents (AGENTS.md)#2milamberspace wants to merge 1 commit into
milamberspace wants to merge 1 commit into
Conversation
Document the JMeter build/test essentials so any coding agent knows how to build, run, and test the project — independent of any agent framework: - core gradlew tasks (build, test, check, runGui, createDist, style) - JDK selection for build and tests via -PjdkBuildVersion / -PjdkTestVersion / -PjdkTestVendor (the test-JDK flag), with an example - dependency-checksum refresh, coverage, and RAT tasks - pointer to the CI matrix and the Error Prone job Addresses the dev@ suggestion to give agents JMeter-specific build context (e.g. how to trigger tests under a specific JDK version). Generated-by: Claude Opus 4.8
vlsi
suggested changes
Jul 7, 2026
vlsi
left a comment
There was a problem hiding this comment.
I would avoid writing "common sense" in agents.md
| @@ -1 +1,46 @@ | |||
| Security model: [SECURITY.md](./SECURITY.md) | |||
|
|
|||
| ## Building and testing (for coding agents) | |||
There was a problem hiding this comment.
Suggested change
| ## Building and testing (for coding agents) | |
| ## Building and testing |
Comment on lines
+5
to
+16
| JMeter builds with Gradle. Use the wrapper `./gradlew` (or `gw` from | ||
| [gdub](https://github.com/dougborg/gdub)). The full command list is in | ||
| [`gradle.md`](gradle.md), and toolchain details are in the | ||
| [Test builds](README.md#test-builds) section of `README.md`. The essentials: | ||
|
|
||
| - **Build everything (incl. tests + static checks):** `./gradlew build` | ||
| - **Unit tests only:** `./gradlew test` — single module, e.g. `./gradlew :src:core:test` | ||
| - **All checks (tests, checkstyle, spotless, …):** `./gradlew check` | ||
| - **Run the GUI from source:** `./gradlew runGui` | ||
| - **Assemble a runnable dist:** `./gradlew createDist && ./bin/jmeter` | ||
| - **Format before committing:** `./gradlew style` (spotlessApply + checkstyleAll); check-only: `./gradlew spotlessCheck checkstyleAll` | ||
| - **Skip tests:** append `-x test` |
There was a problem hiding this comment.
Suggested change
| JMeter builds with Gradle. Use the wrapper `./gradlew` (or `gw` from | |
| [gdub](https://github.com/dougborg/gdub)). The full command list is in | |
| [`gradle.md`](gradle.md), and toolchain details are in the | |
| [Test builds](README.md#test-builds) section of `README.md`. The essentials: | |
| - **Build everything (incl. tests + static checks):** `./gradlew build` | |
| - **Unit tests only:** `./gradlew test` — single module, e.g. `./gradlew :src:core:test` | |
| - **All checks (tests, checkstyle, spotless, …):** `./gradlew check` | |
| - **Run the GUI from source:** `./gradlew runGui` | |
| - **Assemble a runnable dist:** `./gradlew createDist && ./bin/jmeter` | |
| - **Format before committing:** `./gradlew style` (spotlessApply + checkstyleAll); check-only: `./gradlew spotlessCheck checkstyleAll` | |
| - **Skip tests:** append `-x test` | |
| JMeter builds with Gradle. Use `./gradlew --quiet ...` to reduce output verbosity. | |
| After modifying Java code, before reporting the change as done (handing control back to the user), run `./gradlew --quiet classes style` and fix any reported issues. |
Agents already know Gradle commands. There's no point in duplicating them like ./gradlew build.
Comment on lines
+20
to
+35
| JMeter uses Gradle [toolchains](https://docs.gradle.org/current/userguide/toolchains.html), | ||
| so JDKs are found locally or auto-provisioned. The default build JDK is 17 | ||
| (artifacts target Java 8). To build or test under a specific JDK — the way CI | ||
| runs its matrix — pass build parameters: | ||
|
|
||
| - `-PjdkBuildVersion=<n>` — JDK to build with (e.g. `21`) | ||
| - `-PjdkTestVersion=<n>` — JDK to run **tests** with; `0` means "use the current Java" | ||
| - `-PjdkTestVendor=<vendor>` / `-PjdkTestImplementation=<impl>` — pin the vendor / VM implementation | ||
|
|
||
| Example — run the test suite on JDK 21 (Corretto): | ||
|
|
||
| ```sh | ||
| ./gradlew test -PjdkTestVersion=21 -PjdkTestVendor=corretto | ||
| ``` | ||
|
|
||
| List every available build parameter with `./gradlew parameters`. |
There was a problem hiding this comment.
Suggested change
| JMeter uses Gradle [toolchains](https://docs.gradle.org/current/userguide/toolchains.html), | |
| so JDKs are found locally or auto-provisioned. The default build JDK is 17 | |
| (artifacts target Java 8). To build or test under a specific JDK — the way CI | |
| runs its matrix — pass build parameters: | |
| - `-PjdkBuildVersion=<n>` — JDK to build with (e.g. `21`) | |
| - `-PjdkTestVersion=<n>` — JDK to run **tests** with; `0` means "use the current Java" | |
| - `-PjdkTestVendor=<vendor>` / `-PjdkTestImplementation=<impl>` — pin the vendor / VM implementation | |
| Example — run the test suite on JDK 21 (Corretto): | |
| ```sh | |
| ./gradlew test -PjdkTestVersion=21 -PjdkTestVendor=corretto | |
| ``` | |
| List every available build parameter with `./gradlew parameters`. | |
| JMeter uses Gradle toolchains; JDKs are found locally or auto-provisioned. The code targets JDK 17. To test under a specific JDK pass build parameters: | |
| - `-PjdkTestVersion=<n>` — JDK to run **tests** with; `0` means "use the current Java" | |
| - `-PjdkTestVendor=<vendor>` / `-PjdkTestImplementation=<impl>` — pin the vendor / VM implementation (jdkTestVersion is enough for most cases) | |
| List every available build parameter with `./gradlew parameters`. |
Comment on lines
+43
to
+46
|
|
||
| CI mirrors these across a JDK × vendor × OS × timezone × locale matrix (see | ||
| [`.github/workflows/main.yml`](.github/workflows/main.yml)); the Error Prone | ||
| static-analysis job runs on JDK 21. |
There was a problem hiding this comment.
Suggested change
| CI mirrors these across a JDK × vendor × OS × timezone × locale matrix (see | |
| [`.github/workflows/main.yml`](.github/workflows/main.yml)); the Error Prone | |
| static-analysis job runs on JDK 21. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a short "Building and testing (for coding agents)" section to
AGENTS.mdso any AI coding agent has JMeter's build context up front —independent of any agent framework.
Follows the suggestion on the dev@ DISCUSS thread
to give agents JMeter-specific build knowledge (in particular, how to run
tests under a specific JDK version).
Contents
gradlewtasks:build,test,:src:core:test,check,runGui,createDist,style.-PjdkBuildVersion/-PjdkTestVersion/-PjdkTestVendor, with a copy-paste example(run the suite on JDK 21 / Corretto) — the exact flag agents were
missing.
-PupdateExpectedJars check), coverage,and RAT tasks.
Pure documentation; no code or build changes. Points to the existing
gradle.mdandREADME.md"Test builds" section rather than duplicatingthem.
🤖 Generated with Claude Code