From 4e45927d214c36909852a7bc4cb31f4dff61a4f3 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 30 Aug 2026 17:20:59 +0200 Subject: [PATCH] docs: drop hardcoded test-class counts from the review guides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLAUDE.md and .github/skills/code-review/SKILL.md each stated how many test classes use the JUnit 3 and JUnit 4 styles. Both were already stale: the XWorkTestCase count reads ~114 and 117 against an actual 117, and the org.junit.Test count reads ~210 and 212 against an actual 215. The numbers carry no review weight — what matters is that both styles are current, that a new test must match the file it joins, and that there are zero org.junit.jupiter imports. That last one is load-bearing and stays. The class counts only ever move in one direction, in two files, with nothing watching them, so remove them rather than resync them. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01AtyHU8BzNmeZNncXRu7yjB --- .github/skills/code-review/SKILL.md | 6 ++++-- CLAUDE.md | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/skills/code-review/SKILL.md b/.github/skills/code-review/SKILL.md index 1524fd707f..0d8680a500 100644 --- a/.github/skills/code-review/SKILL.md +++ b/.github/skills/code-review/SKILL.md @@ -26,12 +26,14 @@ Deeper references, when a review needs them: `org.junit.jupiter` imports. Two styles coexist and a new test must match the style already in the file it joins: -- **JUnit 3 style** — around 117 classes extend `XWorkTestCase`, which extends +- **JUnit 3 style** — classes extending `XWorkTestCase`, which extends `junit.framework.TestCase`. Test methods must be named `testXxx()`. A Jupiter `@Test` annotation added to one of these **silently never runs** — it does not fail, it is simply not collected. Flag this as blocking whenever you see `org.junit.jupiter` in a diff. -- **JUnit 4 style** — around 212 classes use `import org.junit.Test`. +- **JUnit 4 style** — classes using `import org.junit.Test`. + +Both styles are widespread and neither is being migrated away from. AssertJ assertions and Mockito mocks are both available and widely used. Introducing JUnit 5 is a build-infrastructure change that needs its own `WW-` diff --git a/CLAUDE.md b/CLAUDE.md index 98e8f53826..7d113577f9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -79,10 +79,13 @@ Run with `mvn test -DskipAssembly`. **Tests are JUnit 4 — there is no JUnit 5 anywhere in this repo.** `parent/pom.xml` declares `junit:junit:4.13.2`; there are zero `org.junit.jupiter` imports. Two styles coexist: -- **JUnit 3 style** — ~114 classes extend `XWorkTestCase` (which extends `junit.framework.TestCase`). +- **JUnit 3 style** — classes extending `XWorkTestCase` (which extends `junit.framework.TestCase`). Methods must be named `testXxx()`. A Jupiter `@Test` annotation added to one of these **silently never runs** — it does not fail, it is simply not collected. -- **JUnit 4 style** — ~210 classes use `import org.junit.Test`. +- **JUnit 4 style** — classes using `import org.junit.Test`. + +Both styles are widespread and neither is being migrated away from; `grep -rl` for either marker +gives the current split. Before adding a test, open the target file and match the style already there. AssertJ assertions and Mockito mocks are both available and widely used. Introducing Jupiter is a build-infrastructure change