You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/migrate-junit-source-to-tabletest/SKILL.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,6 @@ Process (do in this order):
11
11
4) Write each modified file once in full using Write (no incremental per-test edits).
12
12
5) Run module tests once and verify "BUILD SUCCESSFUL". If failed, inspect JUnit XML report.
13
13
14
-
Dependency:
15
-
-@TableTest should be in `gradle/java_deps.gradle` as `testImplementation libs.tabletest` where Java modules inherit it via `gradle/java.gradle`.
16
-
- As a fallback, add module-specific `testImplementation(libs.tabletest)` or `testImplementation libs.tabletest`.
17
-
18
14
Import: `import org.tabletest.junit.TableTest;`
19
15
20
16
JDK 8 rules:
@@ -41,7 +37,8 @@ A) @CsvSource
41
37
- If delimiter is ',' (default): replace ',' with '|' in rows.
42
38
43
39
B) @ValueSource
44
-
- Convert to @TableTest with header from parameter name.
40
+
- Keep single-parameter tests on `@ValueSource` (and `@NullSource` when null cases are needed).
41
+
- Otherwise convert to @TableTest with header from parameter name.
45
42
- Each value becomes one row.
46
43
- Add "scenario" column using common sense for name.
47
44
@@ -59,6 +56,11 @@ C) @MethodSource (convert only if values are representable as strings)
59
56
- '' = empty string.
60
57
- For String params that start with '[' or '{', quote to avoid collection parsing (prefer '[]'/'{}').
61
58
59
+
D) @TypeConverter
60
+
- Use `@TypeConverter` for symbolic constants used by migrated table rows (e.g. `Long.MAX_VALUE`, `DDSpanId.MAX`).
61
+
- Prefer explicit one-case-one-return mappings.
62
+
- Prefer shared converter utilities (e.g. in `utils/test-utils`) when reuse across modules is likely.
63
+
62
64
Scenario handling:
63
65
- If MethodSource includes a leading description string OR @ParameterizedTest(name=...) uses {0}, convert that to a scenario column and remove that parameter from method signature.
0 commit comments