Turn Test Methods into Rows
A JUnit extension for table-driven tests in Java and Kotlin.
Same coverage. Less code.
Before — repetitive test methods
@Test
void notDivisibleBy4() {
assertFalse(Year.isLeap(2001));
}
@Test
void divisibleBy4() {
assertTrue(Year.isLeap(2004));
}
@Test
void divisibleBy100ButNotBy400() {
assertFalse(Year.isLeap(2100));
}
@Test
void divisibleBy400() {
assertTrue(Year.isLeap(2000));
}After — one method, one table
@TableTest("""
Scenario | Year | Leap?
Not divisible by 4 | 2001 | false
Divisible by 4 | 2004 | true
Divisible by 100 but not by 400 | 2100 | false
Divisible by 400 | 2000 | true
""")
void leapYear(int year, boolean leap) {
assertEquals(leap, Year.isLeap(year));
}Adopt Incrementally
Convert one test class at a time. @TableTest lives alongside @Test and @ParameterizedTest in the same project.
First-Class IDE Experience
Syntax highlighting, auto-formatting, and scenario names in your test runner. IntelliJ and VS Code extensions available.
Tests as Documentation
Scenario names describe the behaviour. Columns show the inputs and expected results. The test reads like a spec.