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
Use TableTest in dd-trace-api
Fix test formatting and add tabletest to java_deps
Address review comments
Merge branch 'master' into sarahchen6/use-table-test
Add params and re-org converters
Use ValueSets
Co-authored-by: sarah.chen <sarah.chen@datadoghq.com>
- Align columns with spaces so pipes line up vertically.
36
31
- Prefer single quotes for strings requiring quotes (e.g., 'a|b', '[]', '{}', ' ').
32
+
- Use value sets (`{a, b, c}`) instead of matrix-style repetition when only one dimension varies across otherwise-identical rows.
37
33
38
34
Conversions:
39
35
A) @CsvSource
@@ -42,7 +38,8 @@ A) @CsvSource
42
38
- If delimiter is ',' (default): replace ',' with '|' in rows.
43
39
44
40
B) @ValueSource
45
-
- Convert to @TableTest with header from parameter name.
41
+
- Keep single-parameter tests on `@ValueSource` (and `@NullSource` when null cases are needed).
42
+
- Otherwise convert to @TableTest with header from parameter name.
46
43
- Each value becomes one row.
47
44
- Add "scenario" column using common sense for name.
48
45
@@ -60,6 +57,11 @@ C) @MethodSource (convert only if values are representable as strings)
60
57
- '' = empty string.
61
58
- For String params that start with '[' or '{', quote to avoid collection parsing (prefer '[]'/'{}').
62
59
60
+
D) @TypeConverter
61
+
- Use `@TypeConverter` for symbolic constants used by migrated table rows (e.g. `Long.MAX_VALUE`, `DDSpanId.MAX`).
62
+
- Prefer explicit one-case-one-return mappings.
63
+
- Prefer shared converter utilities (e.g. in `utils/test-utils`) when reuse across modules is likely.
64
+
63
65
Scenario handling:
64
66
- 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