Basic Usage
Annotate your method with@ParameterizedTest and provide values via @ValueSource. The first parameter of your method receives each value in turn.
Supported Value Types
@ValueSource supports six primitive array types. Set exactly one array field per annotation.
ints
ints
strings
strings
doubles
doubles
longs
longs
floats
floats
booleans
booleans
Combining with Context Injection
The parameterized value is always the first parameter. Additional parameters are injected by HRTK as usual.The parameterized value must be the first parameter in the method signature. Context types (
TestContext, WorldTestContext, etc.) must come after.How Results Are Reported
Each parameter value produces a separateTestResult with a display name that includes the index and value:
--fail-fast is set and one parameterized invocation fails, the remaining values are skipped.
Practical Example: Tier Damage Scaling
Next Steps
- Timeouts & Repetition - repeat tests and set time limits
- Async & Tick Waiting - handle tick-based timing
- Filtering & Tags - run parameterized tests by tag