Installation
TableTest is available on Maven Central. Add it to your project as a test-scoped dependency alongside JUnit.
Requirements
Before installing TableTest, ensure your project meets these requirements:
- Kotlin or Java 21 or above
- JUnit 5.11 or above
Setup
pom.xml
<dependencies>
<!-- TableTest -->
<dependency>
<groupId>org.tabletest</groupId>
<artifactId>tabletest-junit</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
<!-- JUnit -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>6.0.3</version>
<scope>test</scope>
</dependency>
</dependencies>build.gradle
dependencies {
testImplementation 'org.tabletest:tabletest-junit:1.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter:6.0.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
}build.gradle.kts
dependencies {
testImplementation("org.tabletest:tabletest-junit:1.0.0")
testImplementation("org.junit.jupiter:junit-jupiter:6.0.3")
testImplementation(kotlin("test"))
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.test {
useJUnitPlatform()
}Framework Compatibility
TableTest works with popular Java frameworks:
- Spring Boot 3.4.0 and above
- Quarkus 3.21.2 and above
Verification
Create a simple test to verify TableTest is working:
import org.tabletest.junit.TableTest;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class VerificationTest {
@TableTest("""
Input | Expected
1 | 1
2 | 2
3 | 3
""")
public void verifyTableTestWorks(int input, int expected) {
assertEquals(expected, input);
}
}Run your tests. If you see three passing test executions, TableTest is correctly configured!
IDE Support
For an enhanced development experience, consider installing the TableTest IntelliJ Plugin, which provides:
- Automatic table formatting
- Syntax highlighting
- Visual feedback for invalid syntax
- Code assistance
Install from the JetBrains Marketplace.
Next Steps
With TableTest installed, you’re ready to write your first test →