Skip to content

Commit d085341

Browse files
amarzialidevflow.devflow-routing-intake
andauthored
Improve test strategy on claude.md (#11270)
Improve test strategy on claude.md Update .claude/CLAUDE.md Co-authored-by: Bruce Bujon <PerfectSlayer@users.noreply.github.com> Update AGENTS.md Co-authored-by: Bruce Bujon <PerfectSlayer@users.noreply.github.com> suggestion Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
1 parent 860f4df commit d085341

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.claude/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
## Claude Code workflow
44

55
- Before creating a pull request, run `/techdebt` to check for technical debt, code duplication, and unnecessary complexity in the branch changes.
6+
- Always write new unit tests using JUnit 5 and Java. If the target test file is `.groovy`, run the `/migrate-groovy-to-java` skill on it first.

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ docs/ Developer documentation (see below)
5858
- **Formatting**: google-java-format enforced via Spotless. Run `./gradlew spotlessApply` before committing.
5959
- **Instrumentation layout**: `dd-java-agent/instrumentation/{framework}/{framework}-{minVersion}/`
6060
- **Instrumentation pattern**: Type matching → Method matching → Advice class (bytecode advice, not AOP)
61-
- **Test frameworks**: JUnit 5 (preferred for unit tests), Spock 2 (for complex scenarios needing Groovy)
61+
- **Test frameworks**: Always use JUnit 5. **Do not write new Groovy / Spock tests** and migrate the existing one to JUnit 5 if it is written in Groovy.
6262
- **Forked tests**: Use `ForkedTest` suffix when tests need a separate JVM
6363
- **Flaky tests**: Annotate with `@Flaky` — they are skipped in CI by default
6464

0 commit comments

Comments
 (0)